diff options
5 files changed, 12 insertions, 19 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index b33a2819b55d..766ad167e5b3 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -5020,7 +5020,7 @@ <string name="confirm_battery_saver">OK</string> <!-- [CHAR_LIMIT=NONE] Battery saver: Feature description, with a "learn more" link. --> - <string name="battery_saver_description_with_learn_more">Battery Saver turns on Dark theme and limits or turns off background activity, some visual effects, certain features, and some network connections.\n\n<annotation id="url">Learn more</annotation></string> + <string name="battery_saver_description_with_learn_more">Battery Saver turns on Dark theme and limits or turns off background activity, some visual effects, certain features, and some network connections.</string> <!-- [CHAR_LIMIT=NONE] Battery saver: Feature description, without a "learn more" link. --> <string name="battery_saver_description">Battery Saver turns on Dark theme and limits or turns off background activity, some visual effects, certain features, and some network connections.</string> diff --git a/packages/SystemUI/res-keyguard/values/strings.xml b/packages/SystemUI/res-keyguard/values/strings.xml index caa216688cbc..20ff424068b7 100644 --- a/packages/SystemUI/res-keyguard/values/strings.xml +++ b/packages/SystemUI/res-keyguard/values/strings.xml @@ -79,7 +79,7 @@ is not fully charged, and it's plugged into a slow charger, say that it's charging slowly. --> <string name="keyguard_plugged_in_charging_slowly"><xliff:g id="percentage">%s</xliff:g> • Charging slowly</string> - <!-- When the lock screen is showing and the phone plugged in, and the defend mode is triggered, say that it's charging temporarily limited. --> + <!-- When the lock screen is showing and the phone plugged in, and the defend mode is triggered, say that charging is temporarily limited. --> <string name="keyguard_plugged_in_charging_limited"><xliff:g id="percentage">%s</xliff:g> • Charging temporarily limited</string> <!-- When the lock screen is showing and the battery is low, warn user to plug diff --git a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java index 98d02776fb30..a781520c48d9 100644 --- a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java +++ b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java @@ -80,7 +80,6 @@ import android.content.pm.IncrementalStatesInfo; import android.content.pm.dex.ArtManagerInternal; import android.content.pm.dex.PackageOptimizationInfo; import android.metrics.LogMaker; -import android.os.Binder; import android.os.Handler; import android.os.Looper; import android.os.SystemClock; @@ -508,21 +507,12 @@ class ActivityMetricsLogger { } /** - * If the caller is found in an active transition, it will be considered as consecutive launch - * and coalesced into the active transition. - * - * @see #notifyActivityLaunching(Intent, ActivityRecord, int) - */ - LaunchingState notifyActivityLaunching(Intent intent, @Nullable ActivityRecord caller) { - return notifyActivityLaunching(intent, caller, Binder.getCallingUid()); - } - - /** * Notifies the tracker at the earliest possible point when we are starting to launch an * activity. The caller must ensure that {@link #notifyActivityLaunched} will be called later - * with the returned {@link LaunchingState}. + * with the returned {@link LaunchingState}. If the caller is found in an active transition, + * it will be considered as consecutive launch and coalesced into the active transition. */ - private LaunchingState notifyActivityLaunching(Intent intent, @Nullable ActivityRecord caller, + LaunchingState notifyActivityLaunching(Intent intent, @Nullable ActivityRecord caller, int callingUid) { final long transitionStartTimeNs = SystemClock.elapsedRealtimeNanos(); TransitionInfo existingInfo = null; diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index 66e55e04d198..e2ef82b81a18 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -617,8 +617,10 @@ class ActivityStarter { final LaunchingState launchingState; synchronized (mService.mGlobalLock) { final ActivityRecord caller = ActivityRecord.forTokenLocked(mRequest.resultTo); + final int callingUid = mRequest.realCallingUid == Request.DEFAULT_REAL_CALLING_UID + ? Binder.getCallingUid() : mRequest.realCallingUid; launchingState = mSupervisor.getActivityMetricsLogger().notifyActivityLaunching( - mRequest.intent, caller); + mRequest.intent, caller, callingUid); } // If the caller hasn't already resolved the activity, we're willing diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java index 349270ff708a..beff3862df01 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java @@ -306,7 +306,8 @@ public class ActivityMetricsLaunchObserverTests extends WindowTestsBase { private void notifyActivityLaunching(Intent intent) { final ActivityMetricsLogger.LaunchingState previousState = mLaunchingState; mLaunchingState = mActivityMetricsLogger.notifyActivityLaunching(intent, - mLaunchTopByTrampoline ? mTrampolineActivity : null /* caller */); + mLaunchTopByTrampoline ? mTrampolineActivity : null /* caller */, + mLaunchTopByTrampoline ? mTrampolineActivity.getUid() : 0); if (mLaunchTopByTrampoline) { // The transition of TrampolineActivity has not been completed, so when the next // activity is starting from it, the same launching state should be returned. @@ -429,7 +430,7 @@ public class ActivityMetricsLaunchObserverTests extends WindowTestsBase { .setCreateTask(true) .build(); mActivityMetricsLogger.notifyActivityLaunching(activityOnNewTask.intent, - mTrampolineActivity /* caller */); + mTrampolineActivity /* caller */, mTrampolineActivity.getUid()); notifyActivityLaunched(START_SUCCESS, activityOnNewTask); transitToDrawnAndVerifyOnLaunchFinished(activityOnNewTask); @@ -453,7 +454,7 @@ public class ActivityMetricsLaunchObserverTests extends WindowTestsBase { // Before TopActivity is drawn, it launches another activity on a different display. mActivityMetricsLogger.notifyActivityLaunching(activityOnNewDisplay.intent, - mTopActivity /* caller */); + mTopActivity /* caller */, mTopActivity.getUid()); notifyActivityLaunched(START_SUCCESS, activityOnNewDisplay); // There should be 2 events instead of coalescing as one event. |