Enable(visible) or Disabled(invisible) all one-handed settings
preference by System Property flag configuration. To check System Property flag "support_one_handed_mode" configuration then enable(visible) or disable(invisible) all one-handed settings preference. Bug: 154290458 Test: manual Test: RunSettingsRoboTests Change-Id: Ib6ed12dd65e66747e53b6333574ba0ad5be3c6e0
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.gestures;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.SystemProperties;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
@@ -27,13 +28,17 @@ import com.android.settings.core.TogglePreferenceController;
|
||||
**/
|
||||
public class OneHandedEnablePreferenceController extends TogglePreferenceController {
|
||||
|
||||
static final String SUPPORT_ONE_HANDED_MODE = "ro.support_one_handed_mode";
|
||||
|
||||
public OneHandedEnablePreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return BasePreferenceController.AVAILABLE;
|
||||
return SystemProperties.getBoolean(SUPPORT_ONE_HANDED_MODE, false)
|
||||
? BasePreferenceController.AVAILABLE
|
||||
: BasePreferenceController.UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user