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

Commit 20b7cdcd authored by Manish Singh's avatar Manish Singh
Browse files

Return my user id

Since the current context is the correct one, we can simply return
myUserId - just like for the managed profile.

Bug: 329784721
Test: manual
Change-Id: Ifbc13b0d87ba7b06c6d04c3442bbac0580c4cf3e
parent 7dee0538
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -16,18 +16,14 @@

package com.android.settings.applications.credentials;

import android.os.UserHandle;
import android.os.UserManager;

import com.android.settings.Utils;
import com.android.settings.dashboard.profileselector.ProfileSelectFragment.ProfileType;

public class DefaultCombinedPickerPrivate extends DefaultCombinedPicker {
    private static final String TAG = "DefaultCombinedPickerPrivate";

    @Override
    protected int getUser() {
        UserManager userManager = getContext().getSystemService(UserManager.class);
        return Utils.getCurrentUserIdOfType(userManager, ProfileType.PRIVATE);
        return UserHandle.myUserId();
    }

    /** Returns whether the user is handled by this fragment. */