Only display System section for current user.
Otherwise it will be displayed twice on work profiles. Change-Id: Ic7d21a57f72b9f4a254d574adce90afd7cd27b90 Test: manual verification Fixes: 31108318
This commit is contained in:
@@ -300,9 +300,15 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addItem(PreferenceGroup group, int titleRes, CharSequence title, int userId) {
|
private void addItem(PreferenceGroup group, int titleRes, CharSequence title, int userId) {
|
||||||
if (titleRes == R.string.storage_detail_system && mSystemSize <= 0) {
|
if (titleRes == R.string.storage_detail_system) {
|
||||||
Log.w(TAG, "Skipping System storage because its size is " + mSystemSize);
|
if (mSystemSize <= 0) {
|
||||||
return;
|
Log.w(TAG, "Skipping System storage because its size is " + mSystemSize);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (userId != UserHandle.myUserId()) {
|
||||||
|
// Only display system on current user.
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
StorageItemPreference item;
|
StorageItemPreference item;
|
||||||
if (mItemPoolIndex < mItemPreferencePool.size()) {
|
if (mItemPoolIndex < mItemPreferencePool.size()) {
|
||||||
|
Reference in New Issue
Block a user