|
|
|
@ -230,7 +230,7 @@ public class Camera2VideoActivity extends AppCompatActivity {
|
|
|
|
|
WindowMetrics windowMetrics = wm.getCurrentWindowMetrics();
|
|
|
|
|
WindowInsets windowInsets = windowMetrics.getWindowInsets();
|
|
|
|
|
Insets insets = windowInsets.getInsetsIgnoringVisibility(WindowInsets.Type.navigationBars() | WindowInsets.Type.displayCutout());
|
|
|
|
|
return insets.top;
|
|
|
|
|
return px2dip(this, insets.top);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rect frame = new Rect();
|
|
|
|
@ -240,11 +240,11 @@ public class Camera2VideoActivity extends AppCompatActivity {
|
|
|
|
|
if (statusBarHeight == 0) {
|
|
|
|
|
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
|
|
|
|
|
if (resourceId > 0) {
|
|
|
|
|
statusBarHeight = px2dip(context, getResources().getDimensionPixelSize(resourceId));
|
|
|
|
|
statusBarHeight = getResources().getDimensionPixelSize(resourceId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return statusBarHeight;
|
|
|
|
|
return px2dip(context, statusBarHeight);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void onCreateActivity() {
|
|
|
|
|