Bug fixes

This commit is contained in:
suhan-paradkar 2021-07-11 16:28:14 +05:30 committed by Wisest_wizard
parent 6d0cbbf62d
commit 7037c7ea86
2 changed files with 15 additions and 7 deletions

View File

@ -70,12 +70,6 @@ public class AdditionalKeyboardView extends HorizontalScrollView implements View
return;
}
if (isInPictureInPictureMode()) {
if (getVisibility() != View.GONE)
setVisibility(View.GONE);
return;
}
Rect r = new Rect();
getWindowVisibleDisplayFrame(r);

View File

@ -116,8 +116,22 @@ public class MainActivity extends AppCompatActivity {
@Override
public void onUserLeaveHint () {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
if (preferences.getBooolean("PIP", true)) {
if (preferences.getBoolean("PIP", true)) {
enterPictureInPictureMode();
}
}
@Override
public void onPictureInPictureModeChanged (boolean isInPictureInPictureMode, Configuration newConfig) {
if (isInPictureInPictureMode) {
if (getVisibility() != View.GONE)
setVisibility(View.GONE);
return;
} else {
if (getVisibility() != View.VISIBLE)
setVisibility(View.VISIBLE);
return;
}
}
}