Add intent for entering communal settings
This allows other apps to link to communal settings. Fixes: 276742740 Test: adb shell am start -a android.settings.COMMUNAL_SETTINGS Test: switched to secondary user, attempted to launch using command above. Verified it didn't work Change-Id: I5e845ecba58d8443d41aeea95bc6068a0041cac8
This commit is contained in:
@@ -32,8 +32,14 @@ public class CommunalPreferenceController extends BasePreferenceController {
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return (mContext.getResources().getBoolean(R.bool.config_show_communal_settings)
|
||||
&& Utils.canCurrentUserDream(mContext))
|
||||
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
return isAvailable(mContext) ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether communal preferences are available.
|
||||
*/
|
||||
public static boolean isAvailable(Context context) {
|
||||
return context.getResources().getBoolean(R.bool.config_show_communal_settings)
|
||||
&& Utils.canCurrentUserDream(context);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user