am 0de66314: am 6916c6ee: Merge "Do not hang in pm clear on an invalid package name" into jb-mr2-dev

* commit '0de6631450fedca4071513d90cfaa5eec4c57d6c':
  Do not hang in pm clear on an invalid package name
This commit is contained in:
Christopher Tate
2013-03-08 02:08:50 +00:00
committed by Android Git Automerger
2 changed files with 9 additions and 5 deletions

View File

@ -3515,7 +3515,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(