Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce37ef51 authored by Felipe Leme's avatar Felipe Leme
Browse files

Only display System section for current user.

Otherwise it will be displayed twice on work profiles.

Change-Id: Ic7d21a57f72b9f4a254d574adce90afd7cd27b90
Test: manual verification
Fixes: 31108318
parent eed4d98e
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -300,10 +300,16 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
    }

    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) {
            if (mSystemSize <= 0) {
                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;
        if (mItemPoolIndex < mItemPreferencePool.size()) {
            item = mItemPreferencePool.get(mItemPoolIndex);