Loading core/java/android/view/accessibility/AccessibilityManager.java +8 −12 Original line number Diff line number Diff line Loading @@ -2095,9 +2095,7 @@ public final class AccessibilityManager { * {@link android.view.Display#DEFAULT_DISPLAY}, is or lower than * {@link android.view.Display#INVALID_DISPLAY}, or is already being proxy-ed. * * @throws SecurityException if the app does not hold the * {@link Manifest.permission#MANAGE_ACCESSIBILITY} permission or the * {@link Manifest.permission#CREATE_VIRTUAL_DEVICE} permission. * @throws SecurityException if the app does not hold the required permissions. * * @hide */ Loading Loading @@ -2125,9 +2123,7 @@ public final class AccessibilityManager { * * @return {@code true} if the proxy is successfully unregistered. * * @throws SecurityException if the app does not hold the * {@link Manifest.permission#MANAGE_ACCESSIBILITY} permission or the * {@link Manifest.permission#CREATE_VIRTUAL_DEVICE} permission. * @throws SecurityException if the app does not hold the required permissions. * * @hide */ Loading Loading @@ -2180,8 +2176,8 @@ public final class AccessibilityManager { try { return service.startFlashNotificationSequence(context.getOpPackageName(), reason, mBinder); } catch (RemoteException re) { Log.e(LOG_TAG, "Error while start flash notification sequence", re); } catch (RemoteException | SecurityException e) { Log.e(LOG_TAG, "Error while start flash notification sequence", e); return false; } } Loading Loading @@ -2210,8 +2206,8 @@ public final class AccessibilityManager { try { return service.stopFlashNotificationSequence(context.getOpPackageName()); } catch (RemoteException re) { Log.e(LOG_TAG, "Error while stop flash notification sequence", re); } catch (RemoteException | SecurityException e) { Log.e(LOG_TAG, "Error while stop flash notification sequence", e); return false; } } Loading @@ -2238,8 +2234,8 @@ public final class AccessibilityManager { try { return service.startFlashNotificationEvent(context.getOpPackageName(), reason, reasonPkg); } catch (RemoteException re) { Log.e(LOG_TAG, "Error while start flash notification event", re); } catch (RemoteException | SecurityException e) { Log.e(LOG_TAG, "Error while start flash notification event", e); return false; } } Loading core/java/android/view/accessibility/IAccessibilityManager.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -157,13 +157,13 @@ interface IAccessibilityManager { @EnforcePermission("INJECT_EVENTS") void injectInputEventToInputFilter(in InputEvent event); @RequiresNoPermission @EnforcePermission("MANAGE_ACCESSIBILITY") boolean startFlashNotificationSequence(String opPkg, int reason, IBinder token); @RequiresNoPermission @EnforcePermission("MANAGE_ACCESSIBILITY") boolean stopFlashNotificationSequence(String opPkg); @RequiresNoPermission @EnforcePermission("MANAGE_ACCESSIBILITY") boolean startFlashNotificationEvent(String opPkg, int reason, String reasonPkg); @RequiresNoPermission Loading services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +13 −27 Original line number Diff line number Diff line Loading @@ -4903,40 +4903,26 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub } @Override @RequiresNoPermission public boolean startFlashNotificationSequence(String opPkg, @FlashNotificationReason int reason, IBinder token) { final long identity = Binder.clearCallingIdentity(); try { return mFlashNotificationsController.startFlashNotificationSequence(opPkg, reason, token); } finally { Binder.restoreCallingIdentity(identity); } @EnforcePermission(MANAGE_ACCESSIBILITY) public boolean startFlashNotificationSequence(String opPkg, @FlashNotificationReason int reason, IBinder token) { startFlashNotificationSequence_enforcePermission(); return mFlashNotificationsController.startFlashNotificationSequence(opPkg, reason, token); } @Override @RequiresNoPermission @EnforcePermission(MANAGE_ACCESSIBILITY) public boolean stopFlashNotificationSequence(String opPkg) { final long identity = Binder.clearCallingIdentity(); try { stopFlashNotificationSequence_enforcePermission(); return mFlashNotificationsController.stopFlashNotificationSequence(opPkg); } finally { Binder.restoreCallingIdentity(identity); } } @Override @RequiresNoPermission public boolean startFlashNotificationEvent(String opPkg, @FlashNotificationReason int reason, String reasonPkg) { final long identity = Binder.clearCallingIdentity(); try { return mFlashNotificationsController.startFlashNotificationEvent(opPkg, reason, reasonPkg); } finally { Binder.restoreCallingIdentity(identity); } @EnforcePermission(MANAGE_ACCESSIBILITY) public boolean startFlashNotificationEvent(String opPkg, @FlashNotificationReason int reason, String reasonPkg) { startFlashNotificationEvent_enforcePermission(); return mFlashNotificationsController.startFlashNotificationEvent(opPkg, reason, reasonPkg); } @Override Loading Loading
core/java/android/view/accessibility/AccessibilityManager.java +8 −12 Original line number Diff line number Diff line Loading @@ -2095,9 +2095,7 @@ public final class AccessibilityManager { * {@link android.view.Display#DEFAULT_DISPLAY}, is or lower than * {@link android.view.Display#INVALID_DISPLAY}, or is already being proxy-ed. * * @throws SecurityException if the app does not hold the * {@link Manifest.permission#MANAGE_ACCESSIBILITY} permission or the * {@link Manifest.permission#CREATE_VIRTUAL_DEVICE} permission. * @throws SecurityException if the app does not hold the required permissions. * * @hide */ Loading Loading @@ -2125,9 +2123,7 @@ public final class AccessibilityManager { * * @return {@code true} if the proxy is successfully unregistered. * * @throws SecurityException if the app does not hold the * {@link Manifest.permission#MANAGE_ACCESSIBILITY} permission or the * {@link Manifest.permission#CREATE_VIRTUAL_DEVICE} permission. * @throws SecurityException if the app does not hold the required permissions. * * @hide */ Loading Loading @@ -2180,8 +2176,8 @@ public final class AccessibilityManager { try { return service.startFlashNotificationSequence(context.getOpPackageName(), reason, mBinder); } catch (RemoteException re) { Log.e(LOG_TAG, "Error while start flash notification sequence", re); } catch (RemoteException | SecurityException e) { Log.e(LOG_TAG, "Error while start flash notification sequence", e); return false; } } Loading Loading @@ -2210,8 +2206,8 @@ public final class AccessibilityManager { try { return service.stopFlashNotificationSequence(context.getOpPackageName()); } catch (RemoteException re) { Log.e(LOG_TAG, "Error while stop flash notification sequence", re); } catch (RemoteException | SecurityException e) { Log.e(LOG_TAG, "Error while stop flash notification sequence", e); return false; } } Loading @@ -2238,8 +2234,8 @@ public final class AccessibilityManager { try { return service.startFlashNotificationEvent(context.getOpPackageName(), reason, reasonPkg); } catch (RemoteException re) { Log.e(LOG_TAG, "Error while start flash notification event", re); } catch (RemoteException | SecurityException e) { Log.e(LOG_TAG, "Error while start flash notification event", e); return false; } } Loading
core/java/android/view/accessibility/IAccessibilityManager.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -157,13 +157,13 @@ interface IAccessibilityManager { @EnforcePermission("INJECT_EVENTS") void injectInputEventToInputFilter(in InputEvent event); @RequiresNoPermission @EnforcePermission("MANAGE_ACCESSIBILITY") boolean startFlashNotificationSequence(String opPkg, int reason, IBinder token); @RequiresNoPermission @EnforcePermission("MANAGE_ACCESSIBILITY") boolean stopFlashNotificationSequence(String opPkg); @RequiresNoPermission @EnforcePermission("MANAGE_ACCESSIBILITY") boolean startFlashNotificationEvent(String opPkg, int reason, String reasonPkg); @RequiresNoPermission Loading
services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +13 −27 Original line number Diff line number Diff line Loading @@ -4903,40 +4903,26 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub } @Override @RequiresNoPermission public boolean startFlashNotificationSequence(String opPkg, @FlashNotificationReason int reason, IBinder token) { final long identity = Binder.clearCallingIdentity(); try { return mFlashNotificationsController.startFlashNotificationSequence(opPkg, reason, token); } finally { Binder.restoreCallingIdentity(identity); } @EnforcePermission(MANAGE_ACCESSIBILITY) public boolean startFlashNotificationSequence(String opPkg, @FlashNotificationReason int reason, IBinder token) { startFlashNotificationSequence_enforcePermission(); return mFlashNotificationsController.startFlashNotificationSequence(opPkg, reason, token); } @Override @RequiresNoPermission @EnforcePermission(MANAGE_ACCESSIBILITY) public boolean stopFlashNotificationSequence(String opPkg) { final long identity = Binder.clearCallingIdentity(); try { stopFlashNotificationSequence_enforcePermission(); return mFlashNotificationsController.stopFlashNotificationSequence(opPkg); } finally { Binder.restoreCallingIdentity(identity); } } @Override @RequiresNoPermission public boolean startFlashNotificationEvent(String opPkg, @FlashNotificationReason int reason, String reasonPkg) { final long identity = Binder.clearCallingIdentity(); try { return mFlashNotificationsController.startFlashNotificationEvent(opPkg, reason, reasonPkg); } finally { Binder.restoreCallingIdentity(identity); } @EnforcePermission(MANAGE_ACCESSIBILITY) public boolean startFlashNotificationEvent(String opPkg, @FlashNotificationReason int reason, String reasonPkg) { startFlashNotificationEvent_enforcePermission(); return mFlashNotificationsController.startFlashNotificationEvent(opPkg, reason, reasonPkg); } @Override Loading