Dynamic update a11y settings when a11y service target is disabled
Root cause: A11y settings only handle the package install/uninstall/update, but it does not observe the component status. Solution: Add onPackageModified() to refresh the list. Bug: 264697450 Test: Manual test Change-Id: I779c4ba87c6f54616e9c4c6378db91d9ff611b24
This commit is contained in:
@@ -31,6 +31,7 @@ import android.text.TextUtils;
|
||||
import android.util.ArrayMap;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
@@ -113,6 +114,11 @@ public class AccessibilitySettings extends DashboardFragment {
|
||||
sendUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPackageModified(@NonNull String packageName) {
|
||||
sendUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPackageAppeared(String packageName, int reason) {
|
||||
sendUpdate();
|
||||
|
Reference in New Issue
Block a user