Skip to content

Commit dc88ee0

Browse files
committed
PythonActivity.setSecureWindow: don't redraw after clearing FLAG_SECURE
1 parent 5a8b92f commit dc88ee0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pythonforandroid/bootstraps/qt6/build/src/main/java/org/kivy/android/PythonActivity.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,14 @@ public void run() {
130130
} else {
131131
Log.v(TAG, "UnSetting Secure Window");
132132
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
133-
if (ViewCompat.isAttachedToWindow(window.getDecorView())) {
133+
// The below forces a redraw of the window/view, which is needed on some phones
134+
// to actually clear the flag. However on some other phones, it crashes the app...
135+
// see https://github.com/spesmilo/electrum/issues/8522
136+
/*if (ViewCompat.isAttachedToWindow(window.getDecorView())) {
134137
WindowManager wm = this.mActivity.getWindowManager();
135138
wm.removeViewImmediate(window.getDecorView());
136139
wm.addView(window.getDecorView(), window.getAttributes());
137-
}
140+
}*/
138141
}
139142
}
140143
}._initialize(this, secure));

0 commit comments

Comments
 (0)