am 339a9bbf: Merge "Use realActivity as indicator for task locking" into mnc-dev
* commit '339a9bbf6d6544b516d6dbbae874d02f3ef7a6a4': Use realActivity as indicator for task locking
This commit is contained in:
@@ -786,7 +786,8 @@ final class TaskRecord {
|
||||
}
|
||||
|
||||
boolean isLockTaskWhitelistedLocked() {
|
||||
if (mCallingPackage == null) {
|
||||
String pkg = (realActivity != null) ? realActivity.getPackageName() : null;
|
||||
if (pkg == null) {
|
||||
return false;
|
||||
}
|
||||
String[] packages = mService.mLockTaskPackages.get(userId);
|
||||
@@ -794,7 +795,7 @@ final class TaskRecord {
|
||||
return false;
|
||||
}
|
||||
for (int i = packages.length - 1; i >= 0; --i) {
|
||||
if (mCallingPackage.equals(packages[i])) {
|
||||
if (pkg.equals(packages[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user