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

Commit 3977cd31 authored by Mina Granic's avatar Mina Granic
Browse files

Make camera compat freeform opt-out property public and add CTS proto.

Externally, camera compat freeform treatment is called "simulate requested orientation".

Flag: com.android.window.flags.enable_camera_compat_for_desktop_windowing_opt_out_api
Fixes: 394590412
Test: atest CtsWindowManagerDeviceTestCases:CompatChangeTests
Change-Id: I78278027d7af36674f9a731a9f2a87d687851687
parent 6ae73da2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -56007,6 +56007,7 @@ package android.view {
    field public static final String PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED = "android.window.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED";
    field public static final String PROPERTY_CAMERA_COMPAT_ALLOW_FORCE_ROTATION = "android.window.PROPERTY_CAMERA_COMPAT_ALLOW_FORCE_ROTATION";
    field public static final String PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH = "android.window.PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH";
    field @FlaggedApi("com.android.window.flags.enable_camera_compat_for_desktop_windowing_opt_out_api") public static final String PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION = "android.window.PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION";
    field public static final String PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE = "android.window.PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE";
    field public static final String PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE = "android.window.PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE";
    field @FlaggedApi("com.android.window.flags.app_compat_properties_api") public static final String PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED = "android.window.PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED";
+1 −0
Original line number Diff line number Diff line
@@ -1082,6 +1082,7 @@ package android.content.pm {
    field public static final long NEVER_SANDBOX_DISPLAY_APIS = 184838306L; // 0xb0468a2L
    field public static final long OVERRIDE_CAMERA_COMPAT_DISABLE_FORCE_ROTATION = 263959004L; // 0xfbbb1dcL
    field public static final long OVERRIDE_CAMERA_COMPAT_DISABLE_REFRESH = 264304459L; // 0xfc0f74bL
    field @FlaggedApi("com.android.window.flags.enable_camera_compat_for_desktop_windowing_opt_out_api") public static final long OVERRIDE_CAMERA_COMPAT_DISABLE_SIMULATE_REQUESTED_ORIENTATION = 398195815L; // 0x17bbfc67L
    field public static final long OVERRIDE_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE = 264301586L; // 0xfc0ec12L
    field public static final long OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS = 263259275L; // 0xfb1048bL
    field @FlaggedApi("com.android.window.flags.app_compat_properties_api") public static final long OVERRIDE_ENABLE_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED = 273509367L; // 0x104d6bf7L
+2 −0
Original line number Diff line number Diff line
@@ -1372,6 +1372,8 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
    @ChangeId
    @Overridable
    @Disabled
    @TestApi
    @FlaggedApi(Flags.FLAG_ENABLE_CAMERA_COMPAT_FOR_DESKTOP_WINDOWING_OPT_OUT_API)
    public static final long OVERRIDE_CAMERA_COMPAT_DISABLE_SIMULATE_REQUESTED_ORIENTATION =
            398195815L;  // buganizer id

+1 −2
Original line number Diff line number Diff line
@@ -1252,9 +1252,8 @@ public interface WindowManager extends ViewManager {
     * </application>
     * </pre>
     *
     * @hide
     */
    //TODO(b/394590412): Make this property public.
    @FlaggedApi(Flags.FLAG_ENABLE_CAMERA_COMPAT_FOR_DESKTOP_WINDOWING_OPT_OUT_API)
    String PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION =
            "android.window.PROPERTY_CAMERA_COMPAT_ALLOW_SIMULATE_REQUESTED_ORIENTATION";

+1 −0
Original line number Diff line number Diff line
@@ -404,6 +404,7 @@ message ActivityRecordProto {
    optional bool should_enable_user_aspect_ratio_settings = 45;
    optional bool is_user_fullscreen_override_enabled = 46;
    optional int64 request_open_in_browser_education_timestamp = 47;
    optional bool should_allow_simulate_requested_orientation_for_camera_compat = 48;
}

/* represents WindowToken */
Loading