Skip to content

Commit

Permalink
PythonActivity.setSecureWindow: don't redraw after clearing FLAG_SECURE
Browse files Browse the repository at this point in the history
  • Loading branch information
SomberNight authored and accumulator committed Feb 22, 2024
1 parent 4f1a1a3 commit 0c507ea
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,14 @@ public void run() {
} else {
Log.v(TAG, "UnSetting Secure Window");
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
if (ViewCompat.isAttachedToWindow(window.getDecorView())) {
// The below forces a redraw of the window/view, which is needed on some phones
// to actually clear the flag. However on some other phones, it crashes the app...
// see https://github.com/spesmilo/electrum/issues/8522
/*if (ViewCompat.isAttachedToWindow(window.getDecorView())) {
WindowManager wm = this.mActivity.getWindowManager();
wm.removeViewImmediate(window.getDecorView());
wm.addView(window.getDecorView(), window.getAttributes());
}
}*/
}
}
}._initialize(this, secure));
Expand Down

0 comments on commit 0c507ea

Please sign in to comment.