summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/am/ActiveServices.java7
-rw-r--r--services/core/java/com/android/server/am/AppStartInfoTracker.java5
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/ApplicationStartInfoTest.java5
3 files changed, 6 insertions, 11 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 7ea82b095533..e47d416f9318 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -5725,14 +5725,11 @@ public final class ActiveServices {
bringDownServiceLocked(r, enqueueOomAdj);
return msg;
}
- mAm.mProcessList.getAppStartInfoTracker().handleProcessServiceStart(startTimeNs, app, r,
- true);
+ mAm.mProcessList.getAppStartInfoTracker().handleProcessServiceStart(startTimeNs, app,
+ r);
if (isolated) {
r.isolationHostProc = app;
}
- } else {
- mAm.mProcessList.getAppStartInfoTracker().handleProcessServiceStart(startTimeNs, app, r,
- false);
}
if (r.fgRequired) {
diff --git a/services/core/java/com/android/server/am/AppStartInfoTracker.java b/services/core/java/com/android/server/am/AppStartInfoTracker.java
index 5686b3d545b3..2be1fe26628e 100644
--- a/services/core/java/com/android/server/am/AppStartInfoTracker.java
+++ b/services/core/java/com/android/server/am/AppStartInfoTracker.java
@@ -315,7 +315,7 @@ public final class AppStartInfoTracker {
}
public void handleProcessServiceStart(long startTimeNs, ProcessRecord app,
- ServiceRecord serviceRecord, boolean cold) {
+ ServiceRecord serviceRecord) {
synchronized (mLock) {
if (!mEnabled) {
return;
@@ -325,8 +325,7 @@ public final class AppStartInfoTracker {
start.setStartupState(ApplicationStartInfo.STARTUP_STATE_STARTED);
start.addStartupTimestamp(
ApplicationStartInfo.START_TIMESTAMP_LAUNCH, startTimeNs);
- start.setStartType(cold ? ApplicationStartInfo.START_TYPE_COLD
- : ApplicationStartInfo.START_TYPE_WARM);
+ start.setStartType(ApplicationStartInfo.START_TYPE_COLD);
// TODO: handle possible alarm service start.
start.setReason(serviceRecord.permission != null
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/ApplicationStartInfoTest.java b/services/tests/mockingservicestests/src/com/android/server/am/ApplicationStartInfoTest.java
index 4618cf77a910..c1f4feee9c57 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/ApplicationStartInfoTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/ApplicationStartInfoTest.java
@@ -321,8 +321,7 @@ public class ApplicationStartInfoTest {
app1PackageName); // packageName
ServiceRecord service = ServiceRecord.newEmptyInstanceForTest(mAms);
- mAppStartInfoTracker.handleProcessServiceStart(appStartTimestampService, app, service,
- false);
+ mAppStartInfoTracker.handleProcessServiceStart(appStartTimestampService, app, service);
list.clear();
mAppStartInfoTracker.getStartInfo(app1PackageName, app1Uid, 0, 0, list);
assertEquals(list.size(), 2);
@@ -336,7 +335,7 @@ public class ApplicationStartInfoTest {
app1ProcessName, // processName
ApplicationStartInfo.START_REASON_SERVICE, // reason
ApplicationStartInfo.STARTUP_STATE_STARTED, // startup state
- ApplicationStartInfo.START_TYPE_WARM, // state type
+ ApplicationStartInfo.START_TYPE_COLD, // state type
ApplicationStartInfo.LAUNCH_MODE_STANDARD); // launch mode
// Case 5: Create an instance of app1 with a different user started for a broadcast