Loading services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +8 −8 Original line number Original line Diff line number Diff line Loading @@ -1488,19 +1488,19 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub int serviceCount = userState.mBoundServices.size(); int serviceCount = userState.mBoundServices.size(); for (int i = 0; i < serviceCount; i++) { for (int i = 0; i < serviceCount; i++) { AccessibilityServiceConnection service = userState.mBoundServices.get(i); AccessibilityServiceConnection service = userState.mBoundServices.get(i); relevantEventTypes |= isClientInPackageWhitelist(service.getServiceInfo(), client) relevantEventTypes |= isClientInPackageAllowlist(service.getServiceInfo(), client) ? service.getRelevantEventTypes() ? service.getRelevantEventTypes() : 0; : 0; } } relevantEventTypes |= isClientInPackageWhitelist( relevantEventTypes |= isClientInPackageAllowlist( mUiAutomationManager.getServiceInfo(), client) mUiAutomationManager.getServiceInfo(), client) ? mUiAutomationManager.getRelevantEventTypes() ? mUiAutomationManager.getRelevantEventTypes() : 0; : 0; return relevantEventTypes; return relevantEventTypes; } } private static boolean isClientInPackageWhitelist( private static boolean isClientInPackageAllowlist( @Nullable AccessibilityServiceInfo serviceInfo, Client client) { @Nullable AccessibilityServiceInfo serviceInfo, Client client) { if (serviceInfo == null) return false; if (serviceInfo == null) return false; Loading @@ -1519,7 +1519,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub Slog.d(LOG_TAG, "Dropping events: " Slog.d(LOG_TAG, "Dropping events: " + Arrays.toString(clientPackages) + " -> " + Arrays.toString(clientPackages) + " -> " + serviceInfo.getComponentName().flattenToShortString() + serviceInfo.getComponentName().flattenToShortString() + " due to not being in package whitelist " + " due to not being in package allowlist " + Arrays.toString(serviceInfo.packageNames)); + Arrays.toString(serviceInfo.packageNames)); } } } } Loading Loading @@ -1914,9 +1914,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub } } private void updateLegacyCapabilitiesLocked(UserState userState) { private void updateLegacyCapabilitiesLocked(UserState userState) { // Up to JB-MR1 we had a white list with services that can enable touch // Up to JB-MR1 we had a allowlist with services that can enable touch // exploration. When a service is first started we show a dialog to the // exploration. When a service is first started we show a dialog to the // use to get a permission to white list the service. // use to get a permission to allowlist the service. final int installedServiceCount = userState.mInstalledServices.size(); final int installedServiceCount = userState.mInstalledServices.size(); for (int i = 0; i < installedServiceCount; i++) { for (int i = 0; i < installedServiceCount; i++) { AccessibilityServiceInfo serviceInfo = userState.mInstalledServices.get(i); AccessibilityServiceInfo serviceInfo = userState.mInstalledServices.get(i); Loading Loading @@ -2184,9 +2184,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub } } if (service.getServiceInfo().getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion if (service.getServiceInfo().getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion <= Build.VERSION_CODES.JELLY_BEAN_MR1) { <= Build.VERSION_CODES.JELLY_BEAN_MR1) { // Up to JB-MR1 we had a white list with services that can enable touch // Up to JB-MR1 we had a allowlist with services that can enable touch // exploration. When a service is first started we show a dialog to the // exploration. When a service is first started we show a dialog to the // use to get a permission to white list the service. // use to get a permission to allowlist the service. if (userState.mTouchExplorationGrantedServices.contains(service.mComponentName)) { if (userState.mTouchExplorationGrantedServices.contains(service.mComponentName)) { return true; return true; } else if (mEnableTouchExplorationDialog == null } else if (mEnableTouchExplorationDialog == null Loading Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +8 −8 Original line number Original line Diff line number Diff line Loading @@ -1488,19 +1488,19 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub int serviceCount = userState.mBoundServices.size(); int serviceCount = userState.mBoundServices.size(); for (int i = 0; i < serviceCount; i++) { for (int i = 0; i < serviceCount; i++) { AccessibilityServiceConnection service = userState.mBoundServices.get(i); AccessibilityServiceConnection service = userState.mBoundServices.get(i); relevantEventTypes |= isClientInPackageWhitelist(service.getServiceInfo(), client) relevantEventTypes |= isClientInPackageAllowlist(service.getServiceInfo(), client) ? service.getRelevantEventTypes() ? service.getRelevantEventTypes() : 0; : 0; } } relevantEventTypes |= isClientInPackageWhitelist( relevantEventTypes |= isClientInPackageAllowlist( mUiAutomationManager.getServiceInfo(), client) mUiAutomationManager.getServiceInfo(), client) ? mUiAutomationManager.getRelevantEventTypes() ? mUiAutomationManager.getRelevantEventTypes() : 0; : 0; return relevantEventTypes; return relevantEventTypes; } } private static boolean isClientInPackageWhitelist( private static boolean isClientInPackageAllowlist( @Nullable AccessibilityServiceInfo serviceInfo, Client client) { @Nullable AccessibilityServiceInfo serviceInfo, Client client) { if (serviceInfo == null) return false; if (serviceInfo == null) return false; Loading @@ -1519,7 +1519,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub Slog.d(LOG_TAG, "Dropping events: " Slog.d(LOG_TAG, "Dropping events: " + Arrays.toString(clientPackages) + " -> " + Arrays.toString(clientPackages) + " -> " + serviceInfo.getComponentName().flattenToShortString() + serviceInfo.getComponentName().flattenToShortString() + " due to not being in package whitelist " + " due to not being in package allowlist " + Arrays.toString(serviceInfo.packageNames)); + Arrays.toString(serviceInfo.packageNames)); } } } } Loading Loading @@ -1914,9 +1914,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub } } private void updateLegacyCapabilitiesLocked(UserState userState) { private void updateLegacyCapabilitiesLocked(UserState userState) { // Up to JB-MR1 we had a white list with services that can enable touch // Up to JB-MR1 we had a allowlist with services that can enable touch // exploration. When a service is first started we show a dialog to the // exploration. When a service is first started we show a dialog to the // use to get a permission to white list the service. // use to get a permission to allowlist the service. final int installedServiceCount = userState.mInstalledServices.size(); final int installedServiceCount = userState.mInstalledServices.size(); for (int i = 0; i < installedServiceCount; i++) { for (int i = 0; i < installedServiceCount; i++) { AccessibilityServiceInfo serviceInfo = userState.mInstalledServices.get(i); AccessibilityServiceInfo serviceInfo = userState.mInstalledServices.get(i); Loading Loading @@ -2184,9 +2184,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub } } if (service.getServiceInfo().getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion if (service.getServiceInfo().getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion <= Build.VERSION_CODES.JELLY_BEAN_MR1) { <= Build.VERSION_CODES.JELLY_BEAN_MR1) { // Up to JB-MR1 we had a white list with services that can enable touch // Up to JB-MR1 we had a allowlist with services that can enable touch // exploration. When a service is first started we show a dialog to the // exploration. When a service is first started we show a dialog to the // use to get a permission to white list the service. // use to get a permission to allowlist the service. if (userState.mTouchExplorationGrantedServices.contains(service.mComponentName)) { if (userState.mTouchExplorationGrantedServices.contains(service.mComponentName)) { return true; return true; } else if (mEnableTouchExplorationDialog == null } else if (mEnableTouchExplorationDialog == null Loading