Update Tools.java

This commit is contained in:
Duy Tran Khanh 2021-02-02 21:05:22 +07:00 committed by GitHub
parent 9f54be3156
commit fdf8fefd17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,7 +328,7 @@ public final class Tools
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
ctx.getDisplay().getRealMetrics(displayMetrics);
} else {
displayMetrics = getWindowManager().getDefaultDisplay();
displayMetrics = ctx.getWindowManager().getDefaultDisplay();
}
if(!PREF_IGNORE_NOTCH){
//Remove notch width when it isn't ignored.