Merge "Fix NPE in AppOpsService" into mnc-dev

This commit is contained in:
Svetoslav Ganov
2015-08-03 19:41:34 +00:00
committed by Android (Google) Code Review

View File

@@ -1718,11 +1718,15 @@ public class AppOpsService extends IAppOpsService.Stub {
}
private static String[] getPackagesForUid(int uid) {
String[] packageNames = null;
try {
return AppGlobals.getPackageManager().getPackagesForUid(uid);
packageNames= AppGlobals.getPackageManager().getPackagesForUid(uid);
} catch (RemoteException e) {
/* ignore - local call */
}
return EmptyArray.STRING;
if (packageNames == null) {
return EmptyArray.STRING;
}
return packageNames;
}
}