@@ -57,34 +57,28 @@ protected void onCreate(android.os.Bundle savedInstanceState) {
5757 return ;
5858 }
5959
60- // Set up this activity as a portrait only window.
61- int orientation = android .content .pm .ActivityInfo .SCREEN_ORIENTATION_PORTRAIT ;
62- if (android .os .Build .VERSION .SDK_INT >= 9 ) {
63- orientation = 7 ; // android.content.pm.ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT
64- }
65-
66-
67- if (android .os .Build .VERSION .SDK_INT <= 34 ) {
60+ // Only lock orientation on devices that don’t support multi-window / resizable
61+ if (android .os .Build .VERSION .SDK_INT < android .os .Build .VERSION_CODES .N ) {
62+ int orientation = android .content .pm .ActivityInfo .SCREEN_ORIENTATION_PORTRAIT ;
63+ if (android .os .Build .VERSION .SDK_INT >= 9 ) {
64+ orientation = android .content .pm .ActivityInfo .SCREEN_ORIENTATION_SENSOR_PORTRAIT ;
65+ }
6866 setRequestedOrientation (orientation );
6967 }
7068
71-
72- // Display this activity full screen if requested to do so via the intent's extras.
69+ // Display this activity full screen if requested
7370 boolean isFullScreen = getIntent ().getBooleanExtra (EXTRA_FULL_SCREEN , false );
7471 if (isFullScreen ) {
7572 getWindow ().addFlags (android .view .WindowManager .LayoutParams .FLAG_FULLSCREEN );
7673 getWindow ().clearFlags (android .view .WindowManager .LayoutParams .FLAG_FORCE_NOT_FULLSCREEN );
77- }
78- else {
74+ } else {
7975 getWindow ().addFlags (android .view .WindowManager .LayoutParams .FLAG_FORCE_NOT_FULLSCREEN );
8076 getWindow ().clearFlags (android .view .WindowManager .LayoutParams .FLAG_FULLSCREEN );
8177 }
8278
83- // Initialize this flag to false.
84- // We must wait for this activity to be shown onscreen before displaying the Nook store dialog.
79+ // Initialize this flag to false
8580 fHasShownStore = false ;
8681 }
87-
8882 /** This method is called when this activity can be interacted with. */
8983 @ Override
9084 protected void onResume () {
0 commit comments