Loading
AppOps: Prevent deadlock when making note of applications
If noteOperation() is called with ActivityManagerService locked, AppOpsService won't be able to show the PermissionDialog, causing noteOperation() to wait indefinitely. Keep a reference to the current ActivityManagerService instance so that we can check whether showing the PermissionDialog is safe or not. Even though there's currently no code path that causes startOperation() to be called with ActivityManagerService locked, add the same check there to prevent the same from happening in future. BUGBASH-17 Change-Id: I118aac6ddf91774a038d73047162cfdb8395e58d