Merge "Add settings page to control cross profile appop"
This commit is contained in:
committed by
Android (Google) Code Review
commit
83589187ae
@@ -132,6 +132,12 @@ public class Settings extends SettingsActivity {
|
||||
/* empty */
|
||||
}
|
||||
public static class GestureNavigationSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class InteractAcrossProfilesSettingsActivity extends SettingsActivity {
|
||||
/* empty */
|
||||
}
|
||||
public static class AppInteractAcrossProfilesSettingsActivity extends SettingsActivity {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
public static class ApnSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class WifiCallingSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
@@ -151,6 +157,7 @@ public class Settings extends SettingsActivity {
|
||||
public static class ManagedProfileSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class DeletionHelperActivity extends SettingsActivity { /* empty */ }
|
||||
|
||||
|
||||
public static class ApnEditorActivity extends SettingsActivity { /* empty */ }
|
||||
public static class ChooseAccountActivity extends SettingsActivity { /* empty */ }
|
||||
public static class IccLockSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
|
@@ -46,6 +46,7 @@ import com.android.settings.R;
|
||||
import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.applications.manageapplications.ManageApplications;
|
||||
import com.android.settings.applications.specialaccess.interactacrossprofiles.InteractAcrossProfilesDetailsPreferenceController;
|
||||
import com.android.settings.applications.specialaccess.pictureinpicture.PictureInPictureDetailPreferenceController;
|
||||
import com.android.settings.core.SubSettingLauncher;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
@@ -168,13 +169,19 @@ public class AppInfoDashboardFragment extends DashboardFragment
|
||||
use(PictureInPictureDetailPreferenceController.class);
|
||||
pip.setPackageName(packageName);
|
||||
pip.setParentFragment(this);
|
||||
|
||||
final ExternalSourceDetailPreferenceController externalSource =
|
||||
use(ExternalSourceDetailPreferenceController.class);
|
||||
externalSource.setPackageName(packageName);
|
||||
externalSource.setParentFragment(this);
|
||||
|
||||
final InteractAcrossProfilesDetailsPreferenceController acrossProfiles =
|
||||
use(InteractAcrossProfilesDetailsPreferenceController.class);
|
||||
acrossProfiles.setPackageName(packageName);
|
||||
acrossProfiles.setParentFragment(this);
|
||||
|
||||
use(AdvancedAppInfoPreferenceCategoryController.class).setChildren(Arrays.asList(
|
||||
writeSystemSettings, drawOverlay, pip, externalSource));
|
||||
writeSystemSettings, drawOverlay, pip, externalSource, acrossProfiles));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.applications.specialaccess.interactacrossprofiles;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Controller to decide when to show the "Connected work and personal apps" option in the
|
||||
* Special access screen.
|
||||
*/
|
||||
public class InteractAcrossProfilesController extends BasePreferenceController {
|
||||
|
||||
private final Context mContext;
|
||||
private final UserManager mUserManager;
|
||||
|
||||
public InteractAcrossProfilesController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
|
||||
mContext = context;
|
||||
mUserManager = mContext.getSystemService(UserManager.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
final List<UserInfo> profiles = mUserManager.getProfiles(UserHandle.myUserId());
|
||||
for (final UserInfo userInfo : profiles) {
|
||||
if (userInfo.isManagedProfile()) {
|
||||
return AVAILABLE;
|
||||
}
|
||||
}
|
||||
return DISABLED_FOR_USER;
|
||||
}
|
||||
}
|
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.settings.applications.specialaccess.interactacrossprofiles;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.AppOpsManager;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.PermissionChecker;
|
||||
import android.content.pm.CrossProfileApps;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.util.IconDrawableFactory;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.applications.AppInfoBase;
|
||||
import com.android.settingslib.widget.LayoutPreference;
|
||||
|
||||
public class InteractAcrossProfilesDetails extends AppInfoBase
|
||||
implements Preference.OnPreferenceClickListener {
|
||||
|
||||
private static final String INTERACT_ACROSS_PROFILES_SETTINGS_SWITCH =
|
||||
"interact_across_profiles_settings_switch";
|
||||
private static final String INTERACT_ACROSS_PROFILES_HEADER = "interact_across_profiles_header";
|
||||
|
||||
private Context mContext;
|
||||
private CrossProfileApps mCrossProfileApps;
|
||||
private UserManager mUserManager;
|
||||
private SwitchPreference mSwitchPref;
|
||||
private LayoutPreference mHeader;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
mContext = getContext();
|
||||
mCrossProfileApps = mContext.getSystemService(CrossProfileApps.class);
|
||||
mUserManager = mContext.getSystemService(UserManager.class);
|
||||
|
||||
addPreferencesFromResource(R.xml.interact_across_profiles_permissions_details);
|
||||
mSwitchPref = findPreference(INTERACT_ACROSS_PROFILES_SETTINGS_SWITCH);
|
||||
mSwitchPref.setOnPreferenceClickListener(this);
|
||||
mHeader = findPreference(INTERACT_ACROSS_PROFILES_HEADER);
|
||||
|
||||
// refreshUi checks that the user can still configure the appOp, return to the
|
||||
// previous page if it can't.
|
||||
if (!refreshUi()) {
|
||||
setIntentAndFinish(true/* appChanged */);
|
||||
}
|
||||
final UserHandle workProfile = getWorkProfile();
|
||||
final UserHandle personalProfile = mUserManager.getProfileParent(workProfile);
|
||||
addAppIcons(personalProfile, workProfile);
|
||||
}
|
||||
|
||||
private void addAppIcons(UserHandle personalProfile, UserHandle workProfile) {
|
||||
final ImageView personalIconView = mHeader.findViewById(R.id.entity_header_icon_personal);
|
||||
if (personalIconView != null) {
|
||||
personalIconView.setImageDrawable(IconDrawableFactory.newInstance(mContext)
|
||||
.getBadgedIcon(mPackageInfo.applicationInfo, personalProfile.getIdentifier()));
|
||||
}
|
||||
final ImageView workIconView2 = mHeader.findViewById(R.id.entity_header_icon_work);
|
||||
if (workIconView2 != null) {
|
||||
workIconView2.setImageDrawable(IconDrawableFactory.newInstance(mContext)
|
||||
.getBadgedIcon(mPackageInfo.applicationInfo, workProfile.getIdentifier()));
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private UserHandle getWorkProfile() {
|
||||
for (UserInfo user : mUserManager.getProfiles(UserHandle.myUserId())) {
|
||||
if (mUserManager.isManagedProfile(user.id)) {
|
||||
return user.getUserHandle();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
if (preference != mSwitchPref) {
|
||||
return false;
|
||||
}
|
||||
// refreshUi checks that the user can still configure the appOp, return to the
|
||||
// previous page if it can't.
|
||||
if (!refreshUi()) {
|
||||
setIntentAndFinish(true/* appChanged */);
|
||||
}
|
||||
if (isInteractAcrossProfilesEnabled()) {
|
||||
enableInteractAcrossProfiles(false);
|
||||
refreshUi();
|
||||
return true;
|
||||
}
|
||||
if (!isInteractAcrossProfilesEnabled()) {
|
||||
// TODO(b/148594054): Create a proper dialogue.
|
||||
new AlertDialog.Builder(getActivity())
|
||||
.setTitle(R.string.interact_across_profiles_consent_dialog_title)
|
||||
.setMessage(R.string.interact_across_profiles_consent_dialog_summary)
|
||||
.setPositiveButton(R.string.allow, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
enableInteractAcrossProfiles(true);
|
||||
refreshUi();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.deny, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
refreshUi();
|
||||
}
|
||||
})
|
||||
.create().show();
|
||||
} else {
|
||||
enableInteractAcrossProfiles(false);
|
||||
refreshUi();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isInteractAcrossProfilesEnabled() {
|
||||
return isInteractAcrossProfilesEnabled(
|
||||
mContext, mPackageName, mPackageInfo.applicationInfo.uid);
|
||||
}
|
||||
|
||||
private static boolean isInteractAcrossProfilesEnabled(Context context, String packageName, int uid) {
|
||||
return PermissionChecker.PERMISSION_GRANTED
|
||||
== PermissionChecker.checkPermissionForPreflight(
|
||||
context,
|
||||
Manifest.permission.INTERACT_ACROSS_PROFILES,
|
||||
PermissionChecker.PID_UNKNOWN,
|
||||
uid,
|
||||
packageName);
|
||||
}
|
||||
|
||||
private void enableInteractAcrossProfiles(boolean newState) {
|
||||
mCrossProfileApps.setInteractAcrossProfilesAppOp(
|
||||
mPackageName, newState ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_IGNORED);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the summary for the current state of whether the app associated with the given
|
||||
* {@code packageName} is allowed to interact across profiles.
|
||||
*/
|
||||
public static CharSequence getPreferenceSummary(Context context, String packageName, int uid) {
|
||||
return context.getString(isInteractAcrossProfilesEnabled(context, packageName, uid)
|
||||
? R.string.app_permission_summary_allowed
|
||||
: R.string.app_permission_summary_not_allowed);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean refreshUi() {
|
||||
if (mPackageInfo == null || mPackageInfo.applicationInfo == null) {
|
||||
return false;
|
||||
}
|
||||
if (!mCrossProfileApps.canConfigureInteractAcrossProfiles(mPackageName)) {
|
||||
// Invalid app entry. Should not allow changing permission
|
||||
mSwitchPref.setEnabled(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
mSwitchPref.setChecked(isInteractAcrossProfilesEnabled());
|
||||
final ImageView horizontalArrowIcon = mHeader.findViewById(R.id.entity_header_swap_horiz);
|
||||
if (horizontalArrowIcon != null) {
|
||||
final Drawable icon = mSwitchPref.isChecked()
|
||||
? mContext.getDrawable(R.drawable.ic_swap_horiz_blue)
|
||||
: mContext.getDrawable(R.drawable.ic_swap_horiz_grey);
|
||||
horizontalArrowIcon.setImageDrawable(icon);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AlertDialog createDialog(int id, int errorCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.INTERACT_ACROSS_PROFILES;
|
||||
}
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.applications.specialaccess.interactacrossprofiles;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.CrossProfileApps;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.applications.appinfo.AppInfoPreferenceControllerBase;
|
||||
|
||||
public class InteractAcrossProfilesDetailsPreferenceController
|
||||
extends AppInfoPreferenceControllerBase {
|
||||
|
||||
private String mPackageName;
|
||||
|
||||
public InteractAcrossProfilesDetailsPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return canConfigureInteractAcrossProfiles() ? AVAILABLE : DISABLED_FOR_USER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
preference.setSummary(getPreferenceSummary());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<? extends SettingsPreferenceFragment> getDetailFragmentClass() {
|
||||
return InteractAcrossProfilesDetails.class;
|
||||
}
|
||||
|
||||
private CharSequence getPreferenceSummary() {
|
||||
return InteractAcrossProfilesDetails.getPreferenceSummary(mContext, mPackageName,
|
||||
mParent.getPackageInfo().applicationInfo.uid);
|
||||
}
|
||||
|
||||
private boolean canConfigureInteractAcrossProfiles() {
|
||||
return mContext.getSystemService(CrossProfileApps.class)
|
||||
.canConfigureInteractAcrossProfiles(mPackageName);
|
||||
}
|
||||
|
||||
public void setPackageName(String packageName) {
|
||||
mPackageName = packageName;
|
||||
}
|
||||
}
|
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.settings.applications.specialaccess.interactacrossprofiles;
|
||||
|
||||
import static android.content.pm.PackageManager.GET_ACTIVITIES;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.CrossProfileApps;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.util.IconDrawableFactory;
|
||||
import android.util.Pair;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.Preference.OnPreferenceClickListener;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.applications.AppInfoBase;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.widget.EmptyTextSettings;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
import com.android.settingslib.widget.apppreference.AppPreference;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@SearchIndexable
|
||||
public class InteractAcrossProfilesSettings extends EmptyTextSettings {
|
||||
private Context mContext;
|
||||
private PackageManager mPackageManager;
|
||||
private UserManager mUserManager;
|
||||
private CrossProfileApps mCrossProfileApps;
|
||||
private IconDrawableFactory mIconDrawableFactory;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
||||
mContext = getContext();
|
||||
mPackageManager = mContext.getPackageManager();
|
||||
mUserManager = mContext.getSystemService(UserManager.class);
|
||||
mIconDrawableFactory = IconDrawableFactory.newInstance(mContext);
|
||||
mCrossProfileApps = mContext.getSystemService(CrossProfileApps.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
final PreferenceScreen screen = getPreferenceScreen();
|
||||
screen.removeAll();
|
||||
|
||||
final ArrayList<Pair<ApplicationInfo, UserHandle>> crossProfileApps =
|
||||
collectConfigurableApps();
|
||||
|
||||
final Context prefContext = getPrefContext();
|
||||
for (final Pair<ApplicationInfo, UserHandle> appData : crossProfileApps) {
|
||||
final ApplicationInfo appInfo = appData.first;
|
||||
final UserHandle user = appData.second;
|
||||
final String packageName = appInfo.packageName;
|
||||
final CharSequence label = appInfo.loadLabel(mPackageManager);
|
||||
|
||||
final Preference pref = new AppPreference(prefContext);
|
||||
pref.setIcon(mIconDrawableFactory.getBadgedIcon(appInfo, user.getIdentifier()));
|
||||
pref.setTitle(mPackageManager.getUserBadgedLabel(label, user));
|
||||
pref.setSummary(InteractAcrossProfilesDetails.getPreferenceSummary(prefContext,
|
||||
packageName, appInfo.uid));
|
||||
pref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
AppInfoBase.startAppInfoFragment(InteractAcrossProfilesDetails.class,
|
||||
R.string.interact_across_profiles_title,
|
||||
packageName,
|
||||
appInfo.uid,
|
||||
InteractAcrossProfilesSettings.this/* source */,
|
||||
-1/* request */,
|
||||
getMetricsCategory());
|
||||
return true;
|
||||
}
|
||||
});
|
||||
screen.addPreference(pref);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
setEmptyText(R.string.interact_across_profiles_empty_text);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.interact_across_profiles;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.INTERACT_ACROSS_PROFILES;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the list of applications for the personal profile in the calling user's profile group
|
||||
* that can configure interact across profiles.
|
||||
*/
|
||||
ArrayList<Pair<ApplicationInfo, UserHandle>> collectConfigurableApps() {
|
||||
final UserHandle personalProfile = getPersonalProfileForCallingUser();
|
||||
if (personalProfile == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
final ArrayList<Pair<ApplicationInfo, UserHandle>> crossProfileApps = new ArrayList<>();
|
||||
final List<PackageInfo> installedPackages = mPackageManager.getInstalledPackagesAsUser(
|
||||
GET_ACTIVITIES, personalProfile.getIdentifier());
|
||||
for (PackageInfo packageInfo : installedPackages) {
|
||||
if (mCrossProfileApps.canConfigureInteractAcrossProfiles(packageInfo.packageName)) {
|
||||
crossProfileApps.add(new Pair<>(packageInfo.applicationInfo, personalProfile));
|
||||
}
|
||||
}
|
||||
return crossProfileApps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the personal profile in the profile group of the calling user.
|
||||
* Returns null if user is not in a profile group.
|
||||
*/
|
||||
@Nullable
|
||||
private UserHandle getPersonalProfileForCallingUser() {
|
||||
final int callingUser = UserHandle.myUserId();
|
||||
if (mUserManager.getProfiles(callingUser).isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
final UserInfo parentProfile = mUserManager.getProfileParent(callingUser);
|
||||
return parentProfile == null
|
||||
? UserHandle.of(callingUser) : parentProfile.getUserHandle();
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.interact_across_profiles);
|
||||
}
|
@@ -46,6 +46,8 @@ import com.android.settings.applications.assist.ManageAssist;
|
||||
import com.android.settings.applications.manageapplications.ManageApplications;
|
||||
import com.android.settings.applications.managedomainurls.ManageDomainUrls;
|
||||
import com.android.settings.applications.specialaccess.deviceadmin.DeviceAdminSettings;
|
||||
import com.android.settings.applications.specialaccess.interactacrossprofiles.InteractAcrossProfilesDetails;
|
||||
import com.android.settings.applications.specialaccess.interactacrossprofiles.InteractAcrossProfilesSettings;
|
||||
import com.android.settings.applications.specialaccess.notificationaccess.NotificationAccessDetails;
|
||||
import com.android.settings.applications.specialaccess.pictureinpicture.PictureInPictureDetails;
|
||||
import com.android.settings.applications.specialaccess.pictureinpicture.PictureInPictureSettings;
|
||||
@@ -293,7 +295,9 @@ public class SettingsGateway {
|
||||
GlobalActionsPanelSettings.class.getName(),
|
||||
DarkModeSettingsFragment.class.getName(),
|
||||
BugReportHandlerPicker.class.getName(),
|
||||
GestureNavigationSettingsFragment.class.getName()
|
||||
GestureNavigationSettingsFragment.class.getName(),
|
||||
InteractAcrossProfilesSettings.class.getName(),
|
||||
InteractAcrossProfilesDetails.class.getName()
|
||||
};
|
||||
|
||||
public static final String[] SETTINGS_FOR_RESTRICTED = {
|
||||
|
Reference in New Issue
Block a user