Migrate to new overlay-stopping flag
Bug: 62196835 Test: Started an accessibility service that displays an app overlay and verified that it disappears when approving an accessibility service's capabilities. Change-Id: I7c8d8b4143a5dd1cb684c31c4503608c8d5be0e3
This commit is contained in:
@@ -48,8 +48,6 @@ import com.android.settingslib.accessibility.AccessibilityUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.android.settings.Utils.setOverlayAllowed;
|
||||
|
||||
public class ToggleAccessibilityServicePreferenceFragment
|
||||
extends ToggleFeaturePreferenceFragment implements DialogInterface.OnClickListener {
|
||||
|
||||
@@ -72,8 +70,6 @@ public class ToggleAccessibilityServicePreferenceFragment
|
||||
|
||||
private int mShownDialogId;
|
||||
|
||||
private final IBinder mToken = new Binder();
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.ACCESSIBILITY_SERVICE;
|
||||
@@ -96,18 +92,12 @@ public class ToggleAccessibilityServicePreferenceFragment
|
||||
public void onResume() {
|
||||
mSettingsContentObserver.register(getContentResolver());
|
||||
updateSwitchBarToggleSwitch();
|
||||
if (mToken != null) {
|
||||
setOverlayAllowed(getActivity(), mToken, false);
|
||||
}
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
mSettingsContentObserver.unregister(getContentResolver());
|
||||
if (mToken != null) {
|
||||
setOverlayAllowed(getActivity(), mToken, true);
|
||||
}
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user