Merge "Add BAL log info" into udc-dev
This commit is contained in:
@@ -406,6 +406,8 @@ class ActivityStarter {
|
|||||||
PendingIntentRecord originatingPendingIntent;
|
PendingIntentRecord originatingPendingIntent;
|
||||||
BackgroundStartPrivileges backgroundStartPrivileges;
|
BackgroundStartPrivileges backgroundStartPrivileges;
|
||||||
|
|
||||||
|
final StringBuilder logMessage = new StringBuilder();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The error callback token passed in {@link android.window.WindowContainerTransaction}
|
* The error callback token passed in {@link android.window.WindowContainerTransaction}
|
||||||
* for TaskFragment operation error handling via
|
* for TaskFragment operation error handling via
|
||||||
@@ -734,7 +736,14 @@ class ActivityStarter {
|
|||||||
if (res != START_SUCCESS) {
|
if (res != START_SUCCESS) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
res = executeRequest(mRequest);
|
|
||||||
|
try {
|
||||||
|
res = executeRequest(mRequest);
|
||||||
|
} finally {
|
||||||
|
mRequest.logMessage.append(" result code=").append(res);
|
||||||
|
Slog.i(TAG, mRequest.logMessage.toString());
|
||||||
|
mRequest.logMessage.setLength(0);
|
||||||
|
}
|
||||||
|
|
||||||
Binder.restoreCallingIdentity(origId);
|
Binder.restoreCallingIdentity(origId);
|
||||||
|
|
||||||
@@ -933,8 +942,14 @@ class ActivityStarter {
|
|||||||
? UserHandle.getUserId(aInfo.applicationInfo.uid) : 0;
|
? UserHandle.getUserId(aInfo.applicationInfo.uid) : 0;
|
||||||
final int launchMode = aInfo != null ? aInfo.launchMode : 0;
|
final int launchMode = aInfo != null ? aInfo.launchMode : 0;
|
||||||
if (err == ActivityManager.START_SUCCESS) {
|
if (err == ActivityManager.START_SUCCESS) {
|
||||||
Slog.i(TAG, "START u" + userId + " {" + intent.toShortString(true, true, true, false)
|
request.logMessage.append("START u").append(userId).append(" {")
|
||||||
+ "} with " + launchModeToString(launchMode) + " from uid " + callingUid);
|
.append(intent.toShortString(true, true, true, false))
|
||||||
|
.append("} with ").append(launchModeToString(launchMode))
|
||||||
|
.append(" from uid ").append(callingUid);
|
||||||
|
if (callingUid != realCallingUid
|
||||||
|
&& realCallingUid != Request.DEFAULT_REAL_CALLING_UID) {
|
||||||
|
request.logMessage.append(" (realCallingUid=").append(realCallingUid).append(")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ActivityRecord sourceRecord = null;
|
ActivityRecord sourceRecord = null;
|
||||||
@@ -1103,6 +1118,11 @@ class ActivityStarter {
|
|||||||
request.backgroundStartPrivileges,
|
request.backgroundStartPrivileges,
|
||||||
intent,
|
intent,
|
||||||
checkedOptions);
|
checkedOptions);
|
||||||
|
if (balCode != BAL_ALLOW_DEFAULT) {
|
||||||
|
request.logMessage.append(" (").append(
|
||||||
|
BackgroundActivityStartController.balCodeToString(balCode))
|
||||||
|
.append(")");
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
|
Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ public class BackgroundActivityStartController {
|
|||||||
// anything that has fallen through would currently be aborted
|
// anything that has fallen through would currently be aborted
|
||||||
Slog.w(
|
Slog.w(
|
||||||
TAG,
|
TAG,
|
||||||
"Background activity start [callingPackage: "
|
"Background activity launch blocked [callingPackage: "
|
||||||
+ callingPackage
|
+ callingPackage
|
||||||
+ "; callingUid: "
|
+ "; callingUid: "
|
||||||
+ callingUid
|
+ callingUid
|
||||||
@@ -502,7 +502,7 @@ public class BackgroundActivityStartController {
|
|||||||
}
|
}
|
||||||
builder.append("Activity start allowed: " + msg + ". callingUid: " + callingUid + ". ");
|
builder.append("Activity start allowed: " + msg + ". callingUid: " + callingUid + ". ");
|
||||||
builder.append("BAL Code: ");
|
builder.append("BAL Code: ");
|
||||||
builder.append(code);
|
builder.append(balCodeToString(code));
|
||||||
Slog.d(TAG, builder.toString());
|
Slog.d(TAG, builder.toString());
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
|
|||||||
Reference in New Issue
Block a user