|
27 | 27 | #include <private/android_filesystem_config.h> |
28 | 28 | #include <private/gui/ComposerServiceAIDL.h> |
29 | 29 | #include <ui/DisplayMode.h> |
30 | | -#include <ui/DisplayState.h> |
31 | 30 | #include <ui/DynamicDisplayInfo.h> |
32 | 31 | #include <utils/String8.h> |
33 | 32 | #include <functional> |
@@ -440,56 +439,6 @@ TEST_F(CredentialsTest, TransactionPermissionTest) { |
440 | 439 | } |
441 | 440 | } |
442 | 441 |
|
443 | | -TEST_F(CredentialsTest, DisplayTransactionPermissionTest) { |
444 | | - const auto display = getFirstDisplayToken(); |
445 | | - |
446 | | - ui::DisplayState displayState; |
447 | | - ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getDisplayState(display, &displayState)); |
448 | | - const ui::Rotation initialOrientation = displayState.orientation; |
449 | | - |
450 | | - // Set display orientation from an untrusted process. This should fail silently. |
451 | | - { |
452 | | - UIDFaker f{AID_BIN}; |
453 | | - Transaction transaction; |
454 | | - Rect layerStackRect; |
455 | | - Rect displayRect; |
456 | | - transaction.setDisplayProjection(display, initialOrientation + ui::ROTATION_90, |
457 | | - layerStackRect, displayRect); |
458 | | - transaction.apply(/*synchronous=*/true); |
459 | | - } |
460 | | - |
461 | | - // Verify that the display orientation did not change. |
462 | | - ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getDisplayState(display, &displayState)); |
463 | | - ASSERT_EQ(initialOrientation, displayState.orientation); |
464 | | - |
465 | | - // Set display orientation from a trusted process. |
466 | | - { |
467 | | - UIDFaker f{AID_SYSTEM}; |
468 | | - Transaction transaction; |
469 | | - Rect layerStackRect; |
470 | | - Rect displayRect; |
471 | | - transaction.setDisplayProjection(display, initialOrientation + ui::ROTATION_90, |
472 | | - layerStackRect, displayRect); |
473 | | - transaction.apply(/*synchronous=*/true); |
474 | | - } |
475 | | - |
476 | | - // Verify that the display orientation did change. |
477 | | - ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getDisplayState(display, &displayState)); |
478 | | - ASSERT_EQ(initialOrientation + ui::ROTATION_90, displayState.orientation); |
479 | | - |
480 | | - // Reset orientation |
481 | | - { |
482 | | - UIDFaker f{AID_SYSTEM}; |
483 | | - Transaction transaction; |
484 | | - Rect layerStackRect; |
485 | | - Rect displayRect; |
486 | | - transaction.setDisplayProjection(display, initialOrientation, layerStackRect, displayRect); |
487 | | - transaction.apply(/*synchronous=*/true); |
488 | | - } |
489 | | - ASSERT_EQ(NO_ERROR, SurfaceComposerClient::getDisplayState(display, &displayState)); |
490 | | - ASSERT_EQ(initialOrientation, displayState.orientation); |
491 | | -} |
492 | | - |
493 | 442 | } // namespace android |
494 | 443 |
|
495 | 444 | // TODO(b/129481165): remove the #pragma below and fix conversion issues |
|
0 commit comments