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

Commit a2182bc7 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

refactor: Subscribe to account manager ACCOUNT_ADDED

We want other components to be able to get notified
when a new account is added in AccountManger.

We moved the permission declaration to AccountManager and
the subscribers who want to get notified should use
the new ADD_ACCOUNT permission.
parent df4036e3
Loading
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -28,8 +28,7 @@
        tools:ignore="QueryAllPackagesPermission" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />

    <permission android:name="foundation.e.permission.ADD_ACCOUNT"
        android:protectionLevel="signature" />
    <uses-permission android:name="foundation.e.accountmanager.permission.ADD_ACCOUNT" />

    <application
        android:name=".EdriveApplication"
@@ -113,12 +112,13 @@
            </intent-filter>
        </receiver>

        <receiver android:name=".account.receivers.AccountAddedReceiver"
            android:enabled="true"
            android:permission="foundation.e.permission.ADD_ACCOUNT"
            android:exported="true">
        <!-- We can ignore the permission warning since ADD_ACCOUNT permission is signature -->
        <receiver
            android:name=".account.receivers.AccountAddedReceiver"
            android:exported="true"
            tools:ignore="ExportedReceiver">
            <intent-filter>
                <action android:name="foundation.e.drive.action.ADD_ACCOUNT"/>
                <action android:name="foundation.e.accountmanager.action.ACCOUNT_ADDED"/>
            </intent-filter>
        </receiver>