Support the managed profile deep links for large screen
Homepage is not allowed to be started as a non-primary user. In the managed profile deep link case, we create a bridge to start the homepage as the primary user, and then start the target page as the given managed user. Bug: 222447112 Test: manual, robotest Change-Id: I07dbec3b7eaff983f9860480a0a2f7b0e6f1fb43
This commit is contained in:
@@ -20,6 +20,8 @@ import static android.provider.Settings.ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY
|
||||
import static android.provider.Settings.EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY;
|
||||
import static android.provider.Settings.EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI;
|
||||
|
||||
import static com.android.settings.SettingsActivity.EXTRA_USER_HANDLE;
|
||||
|
||||
import android.animation.LayoutTransition;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.settings.SettingsEnums;
|
||||
@@ -27,6 +29,7 @@ import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.ArraySet;
|
||||
import android.util.FeatureFlagUtils;
|
||||
@@ -449,7 +452,13 @@ public class SettingsHomepageActivity extends FragmentActivity implements
|
||||
SplitRule.FINISH_ALWAYS,
|
||||
SplitRule.FINISH_ALWAYS,
|
||||
true /* clearTop */);
|
||||
startActivity(targetIntent);
|
||||
|
||||
final UserHandle user = intent.getParcelableExtra(EXTRA_USER_HANDLE, UserHandle.class);
|
||||
if (user != null) {
|
||||
startActivityAsUser(targetIntent, user);
|
||||
} else {
|
||||
startActivity(targetIntent);
|
||||
}
|
||||
}
|
||||
|
||||
private String getHighlightMenuKey() {
|
||||
|
Reference in New Issue
Block a user