Use standardized no account screen on first launch
- If there are no accounts on the device, then launch
an intent to show the prompt (check that there is no
flag in SharedPreferences preventing the prompt from
being shown).
- Only when the user explicitly selects "Not now" from
the no account screen, do we store a flag that says
we should never show the prompt again.
- Add "Manage accounts" permission in order to
perform AccountManager.addAccount, which gives us access
to the "no account" screen.
Bug: 5250360
Change-Id: I2f925c838bc0e7003a8dbb3280e5a22ed8680670
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index a1829d1..f4dcdf6 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -23,6 +23,7 @@
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
+ <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />