Merge "Remove everything from under the lock." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4895062eac
@@ -9556,11 +9556,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isProtectedBroadcast(String actionName) {
|
public boolean isProtectedBroadcast(String actionName) {
|
||||||
// allow instant applications
|
if (actionName != null) {
|
||||||
synchronized (mProtectedBroadcasts) {
|
|
||||||
if (mProtectedBroadcasts.contains(actionName)) {
|
|
||||||
return true;
|
|
||||||
} else if (actionName != null) {
|
|
||||||
// TODO: remove these terrible hacks
|
// TODO: remove these terrible hacks
|
||||||
if (actionName.startsWith("android.net.netmon.lingerExpired")
|
if (actionName.startsWith("android.net.netmon.lingerExpired")
|
||||||
|| actionName.startsWith("com.android.server.sip.SipWakeupTimer")
|
|| actionName.startsWith("com.android.server.sip.SipWakeupTimer")
|
||||||
@@ -9569,8 +9565,10 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// allow instant applications
|
||||||
|
synchronized (mProtectedBroadcasts) {
|
||||||
|
return mProtectedBroadcasts.contains(actionName);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -15215,9 +15213,10 @@ public class PackageManagerService extends IPackageManager.Stub
|
|||||||
if (DEBUG_PACKAGE_SCANNING) Log.d(TAG, " Instrumentation: " + r);
|
if (DEBUG_PACKAGE_SCANNING) Log.d(TAG, " Instrumentation: " + r);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pkg.getProtectedBroadcasts().isEmpty()) {
|
final List<String> protectedBroadcasts = pkg.getProtectedBroadcasts();
|
||||||
|
if (!protectedBroadcasts.isEmpty()) {
|
||||||
synchronized (mProtectedBroadcasts) {
|
synchronized (mProtectedBroadcasts) {
|
||||||
mProtectedBroadcasts.addAll(pkg.getProtectedBroadcasts());
|
mProtectedBroadcasts.addAll(protectedBroadcasts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user