Merge "Log last home activity and result we tried to start" into oc-dev

am: e8f1a74361

Change-Id: I9dc6c865260e783eeba32b7c86d45b31ab49688c
This commit is contained in:
Wale Ogunwale
2017-06-16 22:21:11 +00:00
committed by android-build-merger
2 changed files with 19 additions and 6 deletions

View File

@@ -24079,6 +24079,13 @@ public class ActivityManagerService extends IActivityManager.Stub
if (reason != null) {
pw.println(" Reason: " + reason);
}
pw.println(" mLastHomeActivityStartResult: "
+ mActivityStarter.mLastHomeActivityStartResult);
final ActivityRecord r = mActivityStarter.mLastHomeActivityStartRecord[0];
if (r != null) {
pw.println(" mLastHomeActivityStartRecord:");
r.dump(pw, " ");
}
pw.println();
dumpActivitiesLocked(null /* fd */, pw, null /* args */, 0 /* opti */,
true /* dumpAll */, false /* dumpClient */, null /* dumpPackage */,

View File

@@ -188,6 +188,11 @@ class ActivityStarter {
private boolean mUsingVr2dDisplay;
// Last home activity record we attempted to start
final ActivityRecord[] mLastHomeActivityStartRecord = new ActivityRecord[1];
// The result of the last home activity we attempted to start.
int mLastHomeActivityStartResult;
private void reset() {
mStartActivity = null;
mIntent = null;
@@ -592,12 +597,13 @@ class ActivityStarter {
void startHomeActivityLocked(Intent intent, ActivityInfo aInfo, String reason) {
mSupervisor.moveHomeStackTaskToTop(reason);
startActivityLocked(null /*caller*/, intent, null /*ephemeralIntent*/,
null /*resolvedType*/, aInfo, null /*rInfo*/, null /*voiceSession*/,
null /*voiceInteractor*/, null /*resultTo*/, null /*resultWho*/,
0 /*requestCode*/, 0 /*callingPid*/, 0 /*callingUid*/, null /*callingPackage*/,
0 /*realCallingPid*/, 0 /*realCallingUid*/, 0 /*startFlags*/, null /*options*/,
false /*ignoreTargetSecurity*/, false /*componentSpecified*/, null /*outActivity*/,
mLastHomeActivityStartResult = startActivityLocked(null /*caller*/, intent,
null /*ephemeralIntent*/, null /*resolvedType*/, aInfo, null /*rInfo*/,
null /*voiceSession*/, null /*voiceInteractor*/, null /*resultTo*/,
null /*resultWho*/, 0 /*requestCode*/, 0 /*callingPid*/, 0 /*callingUid*/,
null /*callingPackage*/, 0 /*realCallingPid*/, 0 /*realCallingUid*/,
0 /*startFlags*/, null /*options*/, false /*ignoreTargetSecurity*/,
false /*componentSpecified*/, mLastHomeActivityStartRecord /*outActivity*/,
null /*container*/, null /*inTask*/);
if (mSupervisor.inResumeTopActivity) {
// If we are in resume section already, home activity will be initialized, but not