Add intent to start Private Space setup/settings
Bug: 310027945 Test: Manual Change-Id: I9df2b239ba24ac44c65a4cb3c18214bbc27bbcec
This commit is contained in:
@@ -4989,9 +4989,16 @@
|
||||
android:theme="@style/GlifV3Theme.Light"
|
||||
android:exported="false" />
|
||||
|
||||
<activity android:name=".privatespace.PrivateSpaceAuthenticationActivity"
|
||||
<activity
|
||||
android:name=".privatespace.PrivateSpaceAuthenticationActivity"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Settings.Dialog.NoActionBar"
|
||||
android:exported="false"/>
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.settings.action.PRIVATE_SPACE_SETUP_FLOW" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name=".privatespace.PrivateProfileContextHelperActivity" android:exported="false"/>
|
||||
|
||||
<activity-alias android:name="UsageStatsActivity"
|
||||
|
@@ -42,9 +42,10 @@ import com.android.settingslib.transition.SettingsTransitionHelper;
|
||||
import com.google.android.setupdesign.util.ThemeHelper;
|
||||
|
||||
/**
|
||||
* Prompts user to set a device lock if not set with an alert dialog.
|
||||
* If a lock is already set then first authenticates user before displaying private space settings
|
||||
* page.
|
||||
* This class represents an activity responsible for user authentication before starting the private
|
||||
* space setup flow or accessing the private space settings page if already created. Also prompts
|
||||
* user to set a device lock if not set with an alert dialog. This can be launched using the intent
|
||||
* com.android.settings.action.PRIVATE_SPACE_SETUP_FLOW.
|
||||
*/
|
||||
public class PrivateSpaceAuthenticationActivity extends FragmentActivity {
|
||||
private static final String TAG = "PrivateSpaceAuthCheck";
|
||||
@@ -66,8 +67,9 @@ public class PrivateSpaceAuthenticationActivity extends FragmentActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
if (Flags.allowPrivateProfile()) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (Flags.allowPrivateProfile()) {
|
||||
ThemeHelper.trySetDynamicColor(this);
|
||||
mPrivateSpaceMaintainer = new Injector().injectPrivateSpaceMaintainer(
|
||||
getApplicationContext());
|
||||
|
Reference in New Issue
Block a user