Loading services/java/com/android/server/PackageManagerService.java +8 −6 Original line number Original line Diff line number Diff line Loading @@ -8830,7 +8830,7 @@ class PackageManagerService extends IPackageManager.Stub { try { try { str = new FileInputStream(mBackupSettingsFilename); str = new FileInputStream(mBackupSettingsFilename); mReadMessages.append("Reading from backup settings file\n"); mReadMessages.append("Reading from backup settings file\n"); Log.i(TAG, "Reading from backup settings file!"); reportSettingsProblem(Log.INFO, "Need to read from backup settings file"); if (mSettingsFilename.exists()) { if (mSettingsFilename.exists()) { // If both the backup and settings file exist, we // If both the backup and settings file exist, we // ignore the settings since it might have been // ignore the settings since it might have been Loading @@ -8849,7 +8849,7 @@ class PackageManagerService extends IPackageManager.Stub { if (str == null) { if (str == null) { if (!mSettingsFilename.exists()) { if (!mSettingsFilename.exists()) { mReadMessages.append("No settings file found\n"); mReadMessages.append("No settings file found\n"); Slog.i(TAG, "No current settings file!"); reportSettingsProblem(Log.INFO, "No settings file; creating initial state"); return false; return false; } } str = new FileInputStream(mSettingsFilename); str = new FileInputStream(mSettingsFilename); Loading @@ -8865,7 +8865,7 @@ class PackageManagerService extends IPackageManager.Stub { if (type != XmlPullParser.START_TAG) { if (type != XmlPullParser.START_TAG) { mReadMessages.append("No start tag found in settings file\n"); mReadMessages.append("No start tag found in settings file\n"); Slog.e(TAG, "No start tag found in package manager settings"); reportSettingsProblem(Log.WARN, "No start tag found in package manager settings"); return false; return false; } } Loading Loading @@ -8928,10 +8928,12 @@ class PackageManagerService extends IPackageManager.Stub { } catch(XmlPullParserException e) { } catch(XmlPullParserException e) { mReadMessages.append("Error reading: " + e.toString()); mReadMessages.append("Error reading: " + e.toString()); reportSettingsProblem(Log.ERROR, "Error reading settings: " + e); Slog.e(TAG, "Error reading package manager settings", e); Slog.e(TAG, "Error reading package manager settings", e); } catch(java.io.IOException e) { } catch(java.io.IOException e) { mReadMessages.append("Error reading: " + e.toString()); mReadMessages.append("Error reading: " + e.toString()); reportSettingsProblem(Log.ERROR, "Error reading settings: " + e); Slog.e(TAG, "Error reading package manager settings", e); Slog.e(TAG, "Error reading package manager settings", e); } } Loading @@ -8945,7 +8947,7 @@ class PackageManagerService extends IPackageManager.Stub { (SharedUserSetting) idObj, pp.codePath, pp.resourcePath, (SharedUserSetting) idObj, pp.codePath, pp.resourcePath, pp.nativeLibraryPathString, pp.versionCode, pp.pkgFlags, true, true); pp.nativeLibraryPathString, pp.versionCode, pp.pkgFlags, true, true); if (p == null) { if (p == null) { Slog.w(TAG, "Unable to create application package for " reportSettingsProblem(Log.WARN, "Unable to create application package for " + pp.name); + pp.name); continue; continue; } } Loading @@ -8955,13 +8957,13 @@ class PackageManagerService extends IPackageManager.Stub { + " has shared uid " + pp.sharedId + " has shared uid " + pp.sharedId + " that is not a shared uid\n"; + " that is not a shared uid\n"; mReadMessages.append(msg); mReadMessages.append(msg); Slog.e(TAG, msg); reportSettingsProblem(Log.ERROR, msg); } else { } else { String msg = "Bad package setting: package " + pp.name String msg = "Bad package setting: package " + pp.name + " has shared uid " + pp.sharedId + " has shared uid " + pp.sharedId + " that is not defined\n"; + " that is not defined\n"; mReadMessages.append(msg); mReadMessages.append(msg); Slog.e(TAG, msg); reportSettingsProblem(Log.ERROR, msg); } } } } mPendingPackages.clear(); mPendingPackages.clear(); Loading services/java/com/android/server/am/ActivityStack.java +22 −18 Original line number Original line Diff line number Diff line Loading @@ -1881,7 +1881,27 @@ public class ActivityStack { String resultWho, int requestCode, String resultWho, int requestCode, int callingPid, int callingUid, boolean onlyIfNeeded, int callingPid, int callingUid, boolean onlyIfNeeded, boolean componentSpecified) { boolean componentSpecified) { Slog.i(TAG, "Starting: " + intent); int err = START_SUCCESS; ProcessRecord callerApp = null; if (caller != null) { callerApp = mService.getRecordForAppLocked(caller); if (callerApp != null) { callingPid = callerApp.pid; callingUid = callerApp.info.uid; } else { Slog.w(TAG, "Unable to find app for caller " + caller + " (pid=" + callingPid + ") when starting: " + intent.toString()); err = START_PERMISSION_DENIED; } } if (err == START_SUCCESS) { Slog.i(TAG, "Starting: " + intent + " from pid " + (callerApp != null ? callerApp.pid : callingPid)); } ActivityRecord sourceRecord = null; ActivityRecord sourceRecord = null; ActivityRecord resultRecord = null; ActivityRecord resultRecord = null; Loading Loading @@ -1916,9 +1936,7 @@ public class ActivityStack { } } } } int err = START_SUCCESS; if (err == START_SUCCESS && intent.getComponent() == null) { if (intent.getComponent() == null) { // We couldn't find a class that can handle the given Intent. // We couldn't find a class that can handle the given Intent. // That's the end of that! // That's the end of that! err = START_INTENT_NOT_RESOLVED; err = START_INTENT_NOT_RESOLVED; Loading @@ -1930,20 +1948,6 @@ public class ActivityStack { err = START_CLASS_NOT_FOUND; err = START_CLASS_NOT_FOUND; } } ProcessRecord callerApp = null; if (err == START_SUCCESS && caller != null) { callerApp = mService.getRecordForAppLocked(caller); if (callerApp != null) { callingPid = callerApp.pid; callingUid = callerApp.info.uid; } else { Slog.w(TAG, "Unable to find app for caller " + caller + " (pid=" + callingPid + ") when starting: " + intent.toString()); err = START_PERMISSION_DENIED; } } if (err != START_SUCCESS) { if (err != START_SUCCESS) { if (resultRecord != null) { if (resultRecord != null) { sendActivityResultLocked(-1, sendActivityResultLocked(-1, Loading Loading
services/java/com/android/server/PackageManagerService.java +8 −6 Original line number Original line Diff line number Diff line Loading @@ -8830,7 +8830,7 @@ class PackageManagerService extends IPackageManager.Stub { try { try { str = new FileInputStream(mBackupSettingsFilename); str = new FileInputStream(mBackupSettingsFilename); mReadMessages.append("Reading from backup settings file\n"); mReadMessages.append("Reading from backup settings file\n"); Log.i(TAG, "Reading from backup settings file!"); reportSettingsProblem(Log.INFO, "Need to read from backup settings file"); if (mSettingsFilename.exists()) { if (mSettingsFilename.exists()) { // If both the backup and settings file exist, we // If both the backup and settings file exist, we // ignore the settings since it might have been // ignore the settings since it might have been Loading @@ -8849,7 +8849,7 @@ class PackageManagerService extends IPackageManager.Stub { if (str == null) { if (str == null) { if (!mSettingsFilename.exists()) { if (!mSettingsFilename.exists()) { mReadMessages.append("No settings file found\n"); mReadMessages.append("No settings file found\n"); Slog.i(TAG, "No current settings file!"); reportSettingsProblem(Log.INFO, "No settings file; creating initial state"); return false; return false; } } str = new FileInputStream(mSettingsFilename); str = new FileInputStream(mSettingsFilename); Loading @@ -8865,7 +8865,7 @@ class PackageManagerService extends IPackageManager.Stub { if (type != XmlPullParser.START_TAG) { if (type != XmlPullParser.START_TAG) { mReadMessages.append("No start tag found in settings file\n"); mReadMessages.append("No start tag found in settings file\n"); Slog.e(TAG, "No start tag found in package manager settings"); reportSettingsProblem(Log.WARN, "No start tag found in package manager settings"); return false; return false; } } Loading Loading @@ -8928,10 +8928,12 @@ class PackageManagerService extends IPackageManager.Stub { } catch(XmlPullParserException e) { } catch(XmlPullParserException e) { mReadMessages.append("Error reading: " + e.toString()); mReadMessages.append("Error reading: " + e.toString()); reportSettingsProblem(Log.ERROR, "Error reading settings: " + e); Slog.e(TAG, "Error reading package manager settings", e); Slog.e(TAG, "Error reading package manager settings", e); } catch(java.io.IOException e) { } catch(java.io.IOException e) { mReadMessages.append("Error reading: " + e.toString()); mReadMessages.append("Error reading: " + e.toString()); reportSettingsProblem(Log.ERROR, "Error reading settings: " + e); Slog.e(TAG, "Error reading package manager settings", e); Slog.e(TAG, "Error reading package manager settings", e); } } Loading @@ -8945,7 +8947,7 @@ class PackageManagerService extends IPackageManager.Stub { (SharedUserSetting) idObj, pp.codePath, pp.resourcePath, (SharedUserSetting) idObj, pp.codePath, pp.resourcePath, pp.nativeLibraryPathString, pp.versionCode, pp.pkgFlags, true, true); pp.nativeLibraryPathString, pp.versionCode, pp.pkgFlags, true, true); if (p == null) { if (p == null) { Slog.w(TAG, "Unable to create application package for " reportSettingsProblem(Log.WARN, "Unable to create application package for " + pp.name); + pp.name); continue; continue; } } Loading @@ -8955,13 +8957,13 @@ class PackageManagerService extends IPackageManager.Stub { + " has shared uid " + pp.sharedId + " has shared uid " + pp.sharedId + " that is not a shared uid\n"; + " that is not a shared uid\n"; mReadMessages.append(msg); mReadMessages.append(msg); Slog.e(TAG, msg); reportSettingsProblem(Log.ERROR, msg); } else { } else { String msg = "Bad package setting: package " + pp.name String msg = "Bad package setting: package " + pp.name + " has shared uid " + pp.sharedId + " has shared uid " + pp.sharedId + " that is not defined\n"; + " that is not defined\n"; mReadMessages.append(msg); mReadMessages.append(msg); Slog.e(TAG, msg); reportSettingsProblem(Log.ERROR, msg); } } } } mPendingPackages.clear(); mPendingPackages.clear(); Loading
services/java/com/android/server/am/ActivityStack.java +22 −18 Original line number Original line Diff line number Diff line Loading @@ -1881,7 +1881,27 @@ public class ActivityStack { String resultWho, int requestCode, String resultWho, int requestCode, int callingPid, int callingUid, boolean onlyIfNeeded, int callingPid, int callingUid, boolean onlyIfNeeded, boolean componentSpecified) { boolean componentSpecified) { Slog.i(TAG, "Starting: " + intent); int err = START_SUCCESS; ProcessRecord callerApp = null; if (caller != null) { callerApp = mService.getRecordForAppLocked(caller); if (callerApp != null) { callingPid = callerApp.pid; callingUid = callerApp.info.uid; } else { Slog.w(TAG, "Unable to find app for caller " + caller + " (pid=" + callingPid + ") when starting: " + intent.toString()); err = START_PERMISSION_DENIED; } } if (err == START_SUCCESS) { Slog.i(TAG, "Starting: " + intent + " from pid " + (callerApp != null ? callerApp.pid : callingPid)); } ActivityRecord sourceRecord = null; ActivityRecord sourceRecord = null; ActivityRecord resultRecord = null; ActivityRecord resultRecord = null; Loading Loading @@ -1916,9 +1936,7 @@ public class ActivityStack { } } } } int err = START_SUCCESS; if (err == START_SUCCESS && intent.getComponent() == null) { if (intent.getComponent() == null) { // We couldn't find a class that can handle the given Intent. // We couldn't find a class that can handle the given Intent. // That's the end of that! // That's the end of that! err = START_INTENT_NOT_RESOLVED; err = START_INTENT_NOT_RESOLVED; Loading @@ -1930,20 +1948,6 @@ public class ActivityStack { err = START_CLASS_NOT_FOUND; err = START_CLASS_NOT_FOUND; } } ProcessRecord callerApp = null; if (err == START_SUCCESS && caller != null) { callerApp = mService.getRecordForAppLocked(caller); if (callerApp != null) { callingPid = callerApp.pid; callingUid = callerApp.info.uid; } else { Slog.w(TAG, "Unable to find app for caller " + caller + " (pid=" + callingPid + ") when starting: " + intent.toString()); err = START_PERMISSION_DENIED; } } if (err != START_SUCCESS) { if (err != START_SUCCESS) { if (resultRecord != null) { if (resultRecord != null) { sendActivityResultLocked(-1, sendActivityResultLocked(-1, Loading