Skip to content

Commit 39cd9be

Browse files
Graciela Wissen PutriAndroid Build Coastguard Worker
authored andcommitted
Rename orientation request loop property
Rename property from PROPERTY_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED to PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED. Bug: 277269510 Test: atest WmTests:LetterboxUiControllerTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d96dee092dc85c4978e1d8fef2eb9a96e2720c15) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e63c8093ecbc2195d81cf4c42f71e5ca86bb8e22) Merged-In: Ib73d0fc254cef90fee694cd6c5c00c0eb85a3ca1 Change-Id: Ib73d0fc254cef90fee694cd6c5c00c0eb85a3ca1
1 parent f39743e commit 39cd9be

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

core/java/android/view/WindowManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -877,16 +877,16 @@ public interface KeyboardShortcutsReceiver {
877877
* <application>
878878
* <property
879879
* android:name=
880-
* "android.window.PROPERTY_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED"
880+
* "android.window.PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED"
881881
* android:value="false"/>
882882
* </application>
883883
* </pre>
884884
*
885885
* @hide
886886
*/
887887
// TODO(b/274924641): Make this public API.
888-
String PROPERTY_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED =
889-
"android.window.PROPERTY_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED";
888+
String PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED =
889+
"android.window.PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED";
890890

891891
/**
892892
* Application level {@link android.content.pm.PackageManager.Property PackageManager

services/core/java/com/android/server/wm/LetterboxUiController.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
import static android.view.WindowManager.PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH;
4949
import static android.view.WindowManager.PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE;
5050
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE;
51+
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED;
5152
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE;
5253
import static android.view.WindowManager.PROPERTY_COMPAT_ENABLE_FAKE_FOCUS;
53-
import static android.view.WindowManager.PROPERTY_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED;
5454
import static android.view.WindowManager.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION;
5555

5656
import static com.android.internal.util.FrameworkStatsLog.APP_COMPAT_STATE_CHANGED__LETTERBOX_POSITION__BOTTOM;
@@ -241,7 +241,7 @@ final class LetterboxUiController {
241241
private final Boolean mBooleanPropertyIgnoreRequestedOrientation;
242242

243243
@Nullable
244-
private final Boolean mBooleanPropertyIgnoreOrientationRequestWhenLoopDetected;
244+
private final Boolean mBooleanPropertyAllowIgnoringOrientationRequestWhenLoopDetected;
245245

246246
@Nullable
247247
private final Boolean mBooleanPropertyFakeFocus;
@@ -264,10 +264,10 @@ final class LetterboxUiController {
264264
readComponentProperty(packageManager, mActivityRecord.packageName,
265265
mLetterboxConfiguration::isPolicyForIgnoringRequestedOrientationEnabled,
266266
PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION);
267-
mBooleanPropertyIgnoreOrientationRequestWhenLoopDetected =
267+
mBooleanPropertyAllowIgnoringOrientationRequestWhenLoopDetected =
268268
readComponentProperty(packageManager, mActivityRecord.packageName,
269269
mLetterboxConfiguration::isPolicyForIgnoringRequestedOrientationEnabled,
270-
PROPERTY_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED);
270+
PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED);
271271
mBooleanPropertyFakeFocus =
272272
readComponentProperty(packageManager, mActivityRecord.packageName,
273273
mLetterboxConfiguration::isCompatFakeFocusEnabled,
@@ -453,7 +453,7 @@ boolean shouldIgnoreOrientationRequestLoop() {
453453
/* gatingCondition */ mLetterboxConfiguration
454454
::isPolicyForIgnoringRequestedOrientationEnabled,
455455
mIsOverrideEnableCompatIgnoreOrientationRequestWhenLoopDetectedEnabled,
456-
mBooleanPropertyIgnoreOrientationRequestWhenLoopDetected)) {
456+
mBooleanPropertyAllowIgnoringOrientationRequestWhenLoopDetected)) {
457457
return false;
458458
}
459459

services/tests/wmtests/src/com/android/server/wm/LetterboxUiControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
import static android.view.WindowManager.PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH;
4040
import static android.view.WindowManager.PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE;
4141
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE;
42+
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED;
4243
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE;
4344
import static android.view.WindowManager.PROPERTY_COMPAT_ENABLE_FAKE_FOCUS;
44-
import static android.view.WindowManager.PROPERTY_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED;
4545
import static android.view.WindowManager.PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION;
4646

4747
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
@@ -206,7 +206,7 @@ public void testShouldIgnoreOrientationRequestLoop_propertyIsFalseAndOverride_re
206206
throws Exception {
207207
doReturn(true).when(mLetterboxConfiguration)
208208
.isPolicyForIgnoringRequestedOrientationEnabled();
209-
mockThatProperty(PROPERTY_COMPAT_IGNORE_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED,
209+
mockThatProperty(PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED,
210210
/* value */ false);
211211
doReturn(false).when(mActivity).isLetterboxedForFixedOrientationAndAspectRatio();
212212

0 commit comments

Comments
 (0)