mHandler.sendMessageDelayed(msg, CONTENT_PROVIDER_PUBLISH_TIMEOUT);
}
-
+ checkTime(startTime, "attachApplicationLocked: before bindApplication");
++
if (!normalMode) {
Slog.i(TAG, "Launching preboot mode app: " + app);
}
profileFd = profileFd.dup();
}
ProfilerInfo profilerInfo = profileFile == null ? null
- : new ProfilerInfo(profileFile, profileFd, samplingInterval, profileAutoStop);
+ : new ProfilerInfo(profileFile, profileFd, samplingInterval, profileAutoStop);
+
+ // We deprecated Build.SERIAL and only apps that target pre NMR1
+ // SDK can see it. Since access to the serial is now behind a
+ // permission we push down the value.
+ String buildSerial = Build.UNKNOWN;
+ // TODO: SHTOPSHIP Uncomment the check when clients migrate
+// if (appInfo.targetSdkVersion <= Build.VERSION_CODES.N_MR1) {
+ buildSerial = IDeviceIdentifiersPolicyService.Stub.asInterface(
+ ServiceManager.getService(Context.DEVICE_IDENTIFIERS_SERVICE))
+ .getSerial();
+// }
+
+ checkTime(startTime, "attachApplicationLocked: immediately before bindApplication");
thread.bindApplication(processName, appInfo, providers, app.instrumentationClass,
profilerInfo, app.instrumentationArguments, app.instrumentationWatcher,
app.instrumentationUiAutomationConnection, testMode,
mBinderTransactionTrackingEnabled, enableTrackAllocation,
isRestrictedBackupMode || !normalMode, app.persistent,
- new Configuration(mConfiguration), app.compat,
+ new Configuration(getGlobalConfiguration()), app.compat,
getCommonServicesLocked(app.isolated),
- mCoreSettingsObserver.getCoreSettingsLocked());
+ mCoreSettingsObserver.getCoreSettingsLocked(),
+ buildSerial);
+
+ checkTime(startTime, "attachApplicationLocked: immediately after bindApplication");
updateLruProcessLocked(app, false, null);
+ checkTime(startTime, "attachApplicationLocked: after updateLruProcessLocked");
app.lastRequestedGc = app.lastLowMemory = SystemClock.uptimeMillis();
} catch (Exception e) {
// todo: Yikes! What should we do? For now we will try to