Loading services/core/java/com/android/server/am/ActivityManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -8086,6 +8086,12 @@ public class ActivityManagerService extends IActivityManager.Stub } int checkContentProviderUriPermission(Uri uri, int userId, int callingUid, int modeFlags) { if (Thread.holdsLock(mActivityTaskManager.getGlobalLock())) { Slog.wtf(TAG, new IllegalStateException("Unable to check Uri permission" + " because caller is holding WM lock; assuming permission denied")); return PackageManager.PERMISSION_DENIED; } final String name = uri.getAuthority(); final long ident = Binder.clearCallingIdentity(); ContentProviderHolder holder = null; Loading services/core/java/com/android/server/wm/ActivityStarter.java +3 −6 Original line number Diff line number Diff line Loading @@ -640,13 +640,10 @@ class ActivityStarter { } // If the caller hasn't already resolved the activity, we're willing // to do so here, but because that may require acquiring the AM lock // as part of calculating the NeededUriGrants, we must never hold // the WM lock here to avoid deadlocking. // to do so here. If the caller is already holding the WM lock here, // and we need to check dynamic Uri permissions, then we're forced // to assume those permissions are denied to avoid deadlocking. if (mRequest.activityInfo == null) { if (Thread.holdsLock(mService.mGlobalLock)) { Slog.wtf(TAG, new IllegalStateException("Caller must not hold WM lock")); } mRequest.resolveActivity(mSupervisor); } Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -8086,6 +8086,12 @@ public class ActivityManagerService extends IActivityManager.Stub } int checkContentProviderUriPermission(Uri uri, int userId, int callingUid, int modeFlags) { if (Thread.holdsLock(mActivityTaskManager.getGlobalLock())) { Slog.wtf(TAG, new IllegalStateException("Unable to check Uri permission" + " because caller is holding WM lock; assuming permission denied")); return PackageManager.PERMISSION_DENIED; } final String name = uri.getAuthority(); final long ident = Binder.clearCallingIdentity(); ContentProviderHolder holder = null; Loading
services/core/java/com/android/server/wm/ActivityStarter.java +3 −6 Original line number Diff line number Diff line Loading @@ -640,13 +640,10 @@ class ActivityStarter { } // If the caller hasn't already resolved the activity, we're willing // to do so here, but because that may require acquiring the AM lock // as part of calculating the NeededUriGrants, we must never hold // the WM lock here to avoid deadlocking. // to do so here. If the caller is already holding the WM lock here, // and we need to check dynamic Uri permissions, then we're forced // to assume those permissions are denied to avoid deadlocking. if (mRequest.activityInfo == null) { if (Thread.holdsLock(mService.mGlobalLock)) { Slog.wtf(TAG, new IllegalStateException("Caller must not hold WM lock")); } mRequest.resolveActivity(mSupervisor); } Loading