(2/n) Stop user from enabling OHM setting if user is using 3-button

mode

Return One-Handed mode getAvailabilityStatus to UNSUPPORTED_ON_DEVICE
when SystemNavigationMode is 3-button.

Bug: 184903678

Test: manual
Test: manual verified on Settings > System > Gesture page
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures
      .OneHandedEnablePreferenceControllerTest"
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
      "com.android.settings.gestures
      .SwipeBottomToNotificationPreferenceControllerTest"
Change-Id: I454dabb5cc267d544732fa5079f3146154d0568c
This commit is contained in:
Jason Chang
2021-04-20 21:03:22 +08:00
parent 9f24967458
commit ecb58cbbc5
5 changed files with 78 additions and 5 deletions

View File

@@ -33,7 +33,8 @@ public class SwipeBottomToNotificationPreferenceController extends TogglePrefere
@Override
public int getAvailabilityStatus() {
return OneHandedSettingsUtils.isSupportOneHandedMode() ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
return OneHandedSettingsUtils.isFeatureAvailable(mContext)
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
}
@Override