Merge "Pass START_ACTIVITIES_FROM_BACKGROUND permission to instrumentation test." into rvc-dev am: 7afd9b9af7
Change-Id: Ic071d3b273e234d1efadaa4e49122b982b2b7739
This commit is contained in:
@@ -4869,6 +4869,19 @@ public final class ActiveServices {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (r.app != null) {
|
||||||
|
ActiveInstrumentation instr = r.app.getActiveInstrumentation();
|
||||||
|
if (instr != null && instr.mHasBackgroundActivityStartsPermission) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final boolean hasAllowBackgroundActivityStartsToken = r.app != null
|
||||||
|
? !r.app.mAllowBackgroundActivityStartsTokens.isEmpty() : false;
|
||||||
|
if (hasAllowBackgroundActivityStartsToken) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (mAm.checkPermission(START_ACTIVITIES_FROM_BACKGROUND, callingPid, callingUid)
|
if (mAm.checkPermission(START_ACTIVITIES_FROM_BACKGROUND, callingPid, callingUid)
|
||||||
== PERMISSION_GRANTED) {
|
== PERMISSION_GRANTED) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user