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:
Bill Lin
2021-03-12 18:27:10 +08:00
parent 3525843554
commit 49ba85dc8a
12 changed files with 148 additions and 104 deletions

View File

@@ -27,8 +27,6 @@ import com.android.settings.core.TogglePreferenceController;
**/
public class SwipeBottomToNotificationPreferenceController extends TogglePreferenceController {
private static final String PREF_KEY = "gesture_swipe_bottom_to_notification";
public SwipeBottomToNotificationPreferenceController(Context context, String key) {
super(context, key);
}
@@ -51,7 +49,7 @@ public class SwipeBottomToNotificationPreferenceController extends TogglePrefere
@Override
public boolean setChecked(boolean isChecked) {
if (isChecked) {
OneHandedSettingsUtils.setSettingsOneHandedModeEnabled(mContext, false);
OneHandedSettingsUtils.setOneHandedModeEnabled(mContext, false);
}
OneHandedSettingsUtils.setSwipeDownNotificationEnabled(mContext, isChecked);
return true;