Move hub mode settings under display.
And add a "when to show" setting. Bug: 401001786 Test: manually Flag: com.android.systemui.glanceable_hub_v2 Change-Id: I5f660a1be4bdbb5ab5bb14aa070bfa81b31da6b4
This commit is contained in:
@@ -39,15 +39,14 @@ public class CommunalPreferenceController extends BasePreferenceController {
|
||||
* Returns whether communal preferences are available.
|
||||
*/
|
||||
public static boolean isAvailable(Context context) {
|
||||
if (com.android.systemui.Flags.glanceableHubV2()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Utils.canCurrentUserDream(context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (context.getResources().getBoolean(R.bool.config_show_communal_settings)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return com.android.systemui.Flags.glanceableHubV2()
|
||||
&& context.getResources().getBoolean(R.bool.config_show_communal_settings_mobile);
|
||||
return context.getResources().getBoolean(R.bool.config_show_communal_settings);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user