Add the preference controller to control accessibility button size preference
cherry picked from commit 04955b96ae
Bug: 173940869
Test: atest FloatingMenuSizePreferenceControllerTest
Change-Id: Ic206a940abde90641442df37a634c8cb3a345597
Merged-In: Ic206a940abde90641442df37a634c8cb3a345597
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settings.accessibility;
|
||||
|
||||
import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
|
||||
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL;
|
||||
|
||||
import android.accessibilityservice.AccessibilityServiceInfo;
|
||||
@@ -143,6 +144,13 @@ final class AccessibilityUtil {
|
||||
== NAV_BAR_MODE_GESTURAL;
|
||||
}
|
||||
|
||||
/** Determines if a accessibility floating menu is being used. */
|
||||
public static boolean isFloatingMenuEnabled(Context context) {
|
||||
return Settings.Secure.getInt(context.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_BUTTON_MODE, /* def= */ -1)
|
||||
== ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
|
||||
}
|
||||
|
||||
/** Determines if a touch explore is being used. */
|
||||
public static boolean isTouchExploreEnabled(Context context) {
|
||||
final AccessibilityManager am = context.getSystemService(AccessibilityManager.class);
|
||||
|
Reference in New Issue
Block a user