Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b423fdf9 authored by John Shao's avatar John Shao
Browse files

Prevent overlays on vCard import flows

Bug: 172252122
Test: manual with POC
Change-Id: I69c46f073f324005c3dd214447792fc20fe75a2b
Merged-In: I69c46f073f324005c3dd214447792fc20fe75a2b
(cherry picked from commit aa189a0d)
parent dd9886a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,6 +32,6 @@ android_app {
        proguard_flags_files: ["proguard.flags"],
    },

    sdk_version: "current",
    sdk_version: "system_current",
    min_sdk_version: "21",
}
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <!-- Required in P to run Service.startForeground() -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS" />

    <uses-feature
        android:name="android.hardware.telephony"
+3 −0
Original line number Diff line number Diff line
@@ -546,6 +546,9 @@ public class ImportVCardActivity extends Activity implements ImportVCardDialogFr
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);

        getWindow().addSystemFlags(android.view.WindowManager.LayoutParams
            .SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        Uri sourceUri = getIntent().getData();

        // Reading uris from non-storage needs the permission granted from the source intent,
+3 −0
Original line number Diff line number Diff line
@@ -52,6 +52,9 @@ public class SelectAccountActivity extends Activity {
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);

        getWindow().addSystemFlags(android.view.WindowManager.LayoutParams
            .SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);

        // There's three possibilities:
        // - more than one accounts -> ask the user
        // - just one account -> use the account without asking the user