Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f6f0f8c authored by Massimo Carli's avatar Massimo Carli Committed by Automerger Merge Worker
Browse files

Merge "Force Kids app to use sensorLandscape when in reverseLandscape" into...

Merge "Force Kids app to use sensorLandscape when in reverseLandscape" into tm-qpr-dev am: 704ec966 am: 64205590 am: d08d20ff am: 151c0738

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22380514



Change-Id: Ib69fe7684aa57e5ecf094a56315e2bab4ba3a519
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 86ec72b3 151c0738
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
import static android.view.Display.DEFAULT_DISPLAY;

import android.app.ActivityManager;
@@ -310,8 +311,11 @@ public class KidsModeTaskOrganizer extends ShellTaskOrganizer {
        // TODO(229961548): Remove ignoreOrientationRequest exception for Kids Mode once possible.
        if (mReverseDefaultRotationEnabled) {
            setOrientationRequestPolicy(/* isIgnoreOrientationRequestDisabled */ true,
                    /* fromOrientations */ new int[]{SCREEN_ORIENTATION_REVERSE_LANDSCAPE},
                    /* toOrientations */ new int[]{SCREEN_ORIENTATION_LANDSCAPE});
                    /* fromOrientations */
                    new int[]{SCREEN_ORIENTATION_LANDSCAPE, SCREEN_ORIENTATION_REVERSE_LANDSCAPE},
                    /* toOrientations */
                    new int[]{SCREEN_ORIENTATION_SENSOR_LANDSCAPE,
                            SCREEN_ORIENTATION_SENSOR_LANDSCAPE});
        } else {
            setOrientationRequestPolicy(/* isIgnoreOrientationRequestDisabled */ true,
                    /* fromOrientations */ null, /* toOrientations */ null);