diff options
| author | Vinit Nayak <peanutbutter@google.com> | 2020-05-06 13:44:29 -0700 |
|---|---|---|
| committer | Vinit Nayak <peanutbutter@google.com> | 2020-06-03 10:55:42 -0700 |
| commit | 66bf45ffa8a9e0ff2d38c0dfb276fe27f2b7040b (patch) | |
| tree | 053853e6480c6d1a5ccdd9ef45f2a5876ad300eb /core/java/android | |
| parent | 273c839a061785cea960cb4a7b74991daa777eab (diff) | |
Add new callback for when activity rotates
Launcher needs to distinguish display changes
that result naturally vs apps that launch
in a fixed portrait/landscape rotation during
the quickstep gesture.This callback helps anticipate
if a subseqent onDisplayChanged() will
have resulted from a natural rotation or not.
Bug: 154580671
Change-Id: I59ee7985a9f367e8fc5826c08476c1a25d1426b0
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/ITaskStackListener.aidl | 10 | ||||
| -rw-r--r-- | core/java/android/app/TaskStackListener.java | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/app/ITaskStackListener.aidl b/core/java/android/app/ITaskStackListener.aidl index 2d06ee8d06bc..b68639eb9ac6 100644 --- a/core/java/android/app/ITaskStackListener.aidl +++ b/core/java/android/app/ITaskStackListener.aidl @@ -216,4 +216,14 @@ oneway interface ITaskStackListener { * in {@link android.content.pm.ActivityInfo}. */ void onTaskRequestedOrientationChanged(int taskId, int requestedOrientation); + + /** + * Called when a rotation is about to start on the foreground activity. + * This applies for: + * * free sensor rotation + * * forced rotation + * * rotation settings set through adb command line + * * rotation that occurs when rotation tile is toggled in quick settings + */ + void onActivityRotation(); } diff --git a/core/java/android/app/TaskStackListener.java b/core/java/android/app/TaskStackListener.java index 5d8daf88a8de..843d1c7414f8 100644 --- a/core/java/android/app/TaskStackListener.java +++ b/core/java/android/app/TaskStackListener.java @@ -199,4 +199,8 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub { @Override public void onTaskRequestedOrientationChanged(int taskId, int requestedOrientation) { } + + @Override + public void onActivityRotation() { + } } |
