summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorYi Jiang <eejiang@google.com>2021-03-15 16:25:33 -0700
committerYi Jiang <eejiang@google.com>2021-04-09 10:34:23 -0700
commit6ea16de99dfb6ef23ca2d3ac85f9119832452851 (patch)
treeacf6f85ec33cf7aafde7218bca70af2db1f1d8c1 /core/java/android
parenta9bb9e1b53336ca6c37fc98665d0a38ca1f57c5f (diff)
Grabs foreground activity's package name
Passes the foreground activity's package name to Rotation Reosolver. Test: printed package name locally and it correctly shows the foreground package. Bug:181151868 Bug:181150530 Change-Id: Ib6e6504f784283b2d4255da8e54929c6a26cb207
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/rotationresolver/RotationResolverInternal.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/rotationresolver/RotationResolverInternal.java b/core/java/android/rotationresolver/RotationResolverInternal.java
index 1f1a66c17d97..57910cb092fb 100644
--- a/core/java/android/rotationresolver/RotationResolverInternal.java
+++ b/core/java/android/rotationresolver/RotationResolverInternal.java
@@ -44,6 +44,7 @@ public abstract class RotationResolverInternal {
*
* @param callback the callback that will be called when the result is computed or an
* error is captured. {@link RotationResolverCallbackInternal}
+ * @param packageName the package name of the fore ground activity.
* @param proposedRotation the screen rotation that is proposed by the system.
* @param currentRotation the current screen rotation.
* @param timeoutMillis the timeout in millisecond for the query. If the query doesn't get
@@ -53,8 +54,10 @@ public abstract class RotationResolverInternal {
* @param cancellationSignal a cancellation signal that notifies the rotation resolver manger
*/
public abstract void resolveRotation(@NonNull RotationResolverCallbackInternal callback,
- @Surface.Rotation int proposedRotation, @Surface.Rotation int currentRotation,
- @DurationMillisLong long timeoutMillis, @NonNull CancellationSignal cancellationSignal);
+ String packageName, @Surface.Rotation int proposedRotation,
+ @Surface.Rotation int currentRotation, @DurationMillisLong long timeoutMillis,
+ @NonNull CancellationSignal cancellationSignal);
+
/**
* Internal interfaces for the rotation resolver callback.