OSDN Git Service

resolve merge conflicts of 8d7b18292b63 to master
authorTim Murray <timmurray@google.com>
Thu, 12 Jan 2017 01:13:44 +0000 (17:13 -0800)
committerTim Murray <timmurray@google.com>
Thu, 12 Jan 2017 01:13:44 +0000 (17:13 -0800)
Change-Id: Id59ab691bfdb98cff179dfa23e3ddb185e646f53

1  2 
services/core/java/com/android/server/am/ActivityManagerService.java

@@@ -6493,6 -6561,8 +6494,8 @@@ public class ActivityManagerService ext
              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