Initial implementation of DPM.ACTION_SHOW_NEW_USER_DISCLAIMER.
This intent is broadcasted the first time a new user is added when the
device is managed by a device owner. Upon receiving it:
- A notification is shown.
- When the user taps the notification it launches an activity with a
"Accept" button.
- When the user taps the button, the activity is dismissed and DPM is
called to acknowledge that user accepted it.
- If the user never taps the notification or for some reason the
button is not tapped, the intent will be sent again the next time
the user is switched to.
There's still some polishing work to be done (like using the proper
resource strings), but the overall workflow is done.
Test: adb shell dumpsys activity service com.android.car/.PerUserCarService
Test: manual verification (automated tests will be added later
Bug: 175057848
Change-Id: I0063a28c5df226456da5c8abcd42d63b07dc4149
diff --git a/service/AndroidManifest.xml b/service/AndroidManifest.xml
index d239d8e..9d92a5e 100644
--- a/service/AndroidManifest.xml
+++ b/service/AndroidManifest.xml
@@ -897,5 +897,11 @@
android:exported="false"
android:launchMode="singleTask">
</activity>
+ <activity android:name="com.android.car.admin.NewUserDisclaimerActivity"
+ android:excludeFromRecents="true"
+ android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+ android:exported="false"
+ android:launchMode="singleTask">
+ </activity>
</application>
</manifest>