am 6916c6ee
: Merge "Do not hang in pm clear on an invalid package name" into jb-mr2-dev
* commit '6916c6ee105e7e91f494ec79c24152fb64d8eed1': Do not hang in pm clear on an invalid package name
This commit is contained in:
@ -1149,10 +1149,7 @@ public final class Pm {
|
||||
|
||||
ClearDataObserver obs = new ClearDataObserver();
|
||||
try {
|
||||
if (!ActivityManagerNative.getDefault().clearApplicationUserData(pkg, obs, userId)) {
|
||||
System.err.println("Failed");
|
||||
}
|
||||
|
||||
ActivityManagerNative.getDefault().clearApplicationUserData(pkg, obs, userId);
|
||||
synchronized (obs) {
|
||||
while (!obs.finished) {
|
||||
try {
|
||||
|
@ -3499,7 +3499,14 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
if (pkgUid == -1) {
|
||||
Slog.w(TAG, "Invalid packageName:" + packageName);
|
||||
Slog.w(TAG, "Invalid packageName: " + packageName);
|
||||
if (observer != null) {
|
||||
try {
|
||||
observer.onRemoveCompleted(packageName, false);
|
||||
} catch (RemoteException e) {
|
||||
Slog.i(TAG, "Observer no longer exists.");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (uid == pkgUid || checkComponentPermission(
|
||||
|
Reference in New Issue
Block a user