Skip to content

Commit 58b7d5a

Browse files
committed
added back getDefaultDisplay in embedding
1 parent 7d2aa23 commit 58b7d5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shell/platform/android/io/flutter/embedding/android/FlutterView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import android.database.ContentObserver;
1515
import android.graphics.Insets;
1616
import android.graphics.Rect;
17-
import android.hardware.display.DisplayManager;
1817
import android.os.Build;
1918
import android.os.Handler;
2019
import android.os.Looper;
@@ -32,6 +31,7 @@
3231
import android.view.ViewGroup;
3332
import android.view.ViewStructure;
3433
import android.view.WindowInsets;
34+
import android.view.WindowManager;
3535
import android.view.accessibility.AccessibilityManager;
3636
import android.view.accessibility.AccessibilityNodeProvider;
3737
import android.view.autofill.AutofillValue;
@@ -612,8 +612,8 @@ private ZeroSides calculateShouldZeroSides() {
612612
Context context = getContext();
613613
int orientation = context.getResources().getConfiguration().orientation;
614614
int rotation =
615-
((DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE))
616-
.getDisplay(0)
615+
((WindowManager) context.getSystemService(Context.WINDOW_SERVICE))
616+
.getDefaultDisplay()
617617
.getRotation();
618618

619619
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {

0 commit comments

Comments
 (0)