diff options
author | zeapo <mohamed@zenadi.com> | 2017-11-03 13:14:46 +0100 |
---|---|---|
committer | zeapo <mohamed@zenadi.com> | 2017-11-03 13:14:46 +0100 |
commit | ec1ebd4881253e4de8c9c2032d4adfd7db24fd6d (patch) | |
tree | df038727bcc13f0bf5eecfabe8c65672c9edae37 /app/src/main/java | |
parent | 381a40a4ed2290907d94c865aaa4fb0ce1f26738 (diff) |
add support for Application overlay in api version >= 26
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java index a02aa63f..0a60201a 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java @@ -425,7 +425,11 @@ public class AutofillService extends AccessibilityService { dialog = builder.create(); //noinspection ConstantConditions - dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); + } else { + dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY); + } dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE); dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); dialog.show(); |