Use getActivityToken() instead of mToken in isTopOfTask

mToken could be local tokan and causes IllegalArgumentException.

bug: 29072444
Change-Id: I0f889a70a848ffea31663ed80337e1605c75223e
This commit is contained in:
Chong Zhang
2016-06-03 11:30:20 -07:00
parent c4f1bc4032
commit 6f9ae4ffc5

View File

@@ -5952,7 +5952,7 @@ public class Activity extends ContextThemeWrapper
return false;
}
try {
return ActivityManagerNative.getDefault().isTopOfTask(mToken);
return ActivityManagerNative.getDefault().isTopOfTask(getActivityToken());
} catch (RemoteException e) {
return false;
}