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

Commit f52cdce1 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Exclude game apps from orientation experiment

Game's content are usually orientation specified.

Flag: EXEMPT disabled code
Test: presubmit
Bug: 357141415
Change-Id: Ib10c9ec6b691f0c35548aa936a6079c19da63789
parent 8834b35c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8149,7 +8149,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
     */
    @Override
    protected int getOverrideOrientation() {
        if (mWmService.mConstants.mIgnoreActivityOrientationRequest) {
        if (mWmService.mConstants.mIgnoreActivityOrientationRequest
                && info.applicationInfo.category != ApplicationInfo.CATEGORY_GAME) {
            return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
        }
        return mAppCompatController.getOrientationPolicy()
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ import java.util.concurrent.Executor;
 */
final class WindowManagerConstants {

    /** The orientation of activity will be always "unspecified". */
    /** The orientation of activity will be always "unspecified" except for game apps. */
    private static final String KEY_IGNORE_ACTIVITY_ORIENTATION_REQUEST =
            "ignore_activity_orientation_request";