2/ Make One handed mode support multiple user switch
Previously OHM did not support for multile user switch. We get current user id in settings and get/put settings value with currentUserId. Test: manual switch user and check Settings > System > Gesture > One-Handed Test: make RunSettingsRoboTests -j40 Bug: 182278800 Change-Id: I12dcc7b634ae19375358733357dc95197e81067c
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.gestures;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.os.UserHandle;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
@@ -42,6 +43,12 @@ public class OneHandedSettings extends DashboardFragment {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updatePreferenceStates() {
|
||||
OneHandedSettingsUtils.setUserId(UserHandle.myUserId());
|
||||
super.updatePreferenceStates();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.one_handed_settings;
|
||||
|
Reference in New Issue
Block a user