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

Commit db6b0292 authored by Tetiana Meronyk's avatar Tetiana Meronyk
Browse files

Remove system user from displaying in Storage Settings in HSUM

Bug: 259525664
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.deviceinfo.storage.NonCurrentUserControllerTest"
Change-Id: I9425a9becdb89588da4a917c0ba9401d6b354238
parent 9ac0969e
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ public class NonCurrentUserController extends AbstractPreferenceController imple
        List<NonCurrentUserController> controllers = new ArrayList<>();
        List<UserInfo> infos = userManager.getUsers();
        for (UserInfo info : infos) {
            if (info.id == currentUserId || info.isProfile()) {
            if (info.id == currentUserId || !info.isFull()) {
                continue;
            }
            int[] profiles = userManager.getProfileIds(info.id, false /* enabledOnly */);
+3 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public class NonCurrentUserControllerTest {
        MockitoAnnotations.initMocks(this);
        mContext = RuntimeEnvironment.application;
        mPrimaryUser = new UserInfo();
        mPrimaryUser.flags = UserInfo.FLAG_PRIMARY;
        mPrimaryUser.flags = UserInfo.FLAG_PRIMARY | UserInfo.FLAG_FULL;
        mController = new NonCurrentUserController(mContext, mPrimaryUser);
        ShadowActivityManager.setService(mActivityService);

@@ -267,6 +267,8 @@ public class NonCurrentUserControllerTest {
        secondaryUser.id = 10;
        final UserInfo secondaryUser1 = spy(new UserInfo());
        secondaryUser1.id = 11;
        secondaryUser.flags = UserInfo.FLAG_FULL;
        secondaryUser1.flags = UserInfo.FLAG_FULL;
        userInfo.add(mPrimaryUser);
        userInfo.add(secondaryUser);
        userInfo.add(secondaryUser1);