Home | History | Annotate | Download | only in am

Lines Matching refs:active

730         // If this service is active, make sure it is stopped.
926 ArrayList<ActiveForegroundApp> active = null;
948 if (active == null) {
949 active = new ArrayList<>();
951 if (DEBUG_FOREGROUND_SERVICE) Slog.d(TAG, "Adding active: pkg="
953 active.add(aa);
979 if (active != null) {
980 for (int i = 0; i < active.size(); i++) {
981 ActiveForegroundApp aa = active.get(i);
1000 if (active.size() == 1) {
1002 intent.setData(Uri.fromParts("package", active.get(0).mPackageName, null));
1004 R.string.foreground_service_app_in_background, active.get(0).mLabel);
1006 pkgs = new String[] { active.get(0).mPackageName };
1007 oldestStartTime = active.get(0).mStartTime;
1010 pkgs = new String[active.size()];
1011 for (int i = 0; i < active.size(); i++) {
1012 pkgs[i] = active.get(i).mPackageName;
1013 oldestStartTime = Math.min(oldestStartTime, active.get(i).mStartTime);
1017 R.string.foreground_service_apps_in_background, active.size());
1018 msg = active.get(0).mLabel.toString();
1019 for (int i = 1; i < active.size(); i++) {
1021 msg, active.get(i).mLabel);
1062 ActiveForegroundApp active = smap.mActiveForegroundApps.get(r.packageName);
1063 if (active != null) {
1064 active.mNumActive--;
1065 if (active.mNumActive <= 0) {
1066 active.mEndTime = SystemClock.elapsedRealtime();
1068 if (foregroundAppShownEnoughLocked(active, active.mEndTime)) {
1069 // Have been active for long enough that we will remove it immediately.
1073 } else if (active.mHideTime < Long.MAX_VALUE){
1074 requestUpdateActiveForegroundAppsLocked(smap, active.mHideTime);
1094 ActiveForegroundApp active = smap.mActiveForegroundApps.valueAt(j);
1095 if (active.mEndTime == 0) {
1096 if (!active.mShownWhileScreenOn) {
1097 active.mShownWhileScreenOn = true;
1098 active.mStartVisibleTime = nowElapsed;
1101 if (!active.mShownWhileScreenOn
1102 && active.mStartVisibleTime == active.mStartTime) {
1106 active.mEndTime = active.mStartVisibleTime = nowElapsed;
1108 if (foregroundAppShownEnoughLocked(active, nowElapsed)) {
1109 // Have been active for long enough that we will remove it
1111 smap.mActiveForegroundApps.remove(active.mPackageName);
1115 if (active.mHideTime < nextUpdateTime) {
1116 nextUpdateTime = active.mHideTime;
1137 ActiveForegroundApp active = smap.mActiveForegroundApps.valueAt(j);
1138 if (active.mUid == uidRec.uid) {
1140 if (!active.mAppOnTop) {
1141 active.mAppOnTop = true;
1144 active.mShownWhileTop = true;
1145 } else if (active.mAppOnTop) {
1146 active.mAppOnTop = false;
1249 ActiveForegroundApp active = smap.mActiveForegroundApps.get(r.packageName);
1250 if (active == null) {
1251 active = new ActiveForegroundApp();
1252 active.mPackageName = r.packageName;
1253 active.mUid = r.appInfo.uid;
1254 active.mShownWhileScreenOn = mScreenOn;
1256 active.mAppOnTop = active.mShownWhileTop =
1260 active.mStartTime = active.mStartVisibleTime
1262 smap.mActiveForegroundApps.put(r.packageName, active);
1265 active.mNumActive++;
1331 // First check to see if this app has any other active foreground services
3821 pw.println(" User " + user + " active services:");
4051 pw.print("Active foreground apps - user ");