[core] Fix compatibility with 8.1 (#683)
This commit is contained in:
parent
c741133b67
commit
18c7f60171
|
|
@ -82,6 +82,8 @@ public class UserService {
|
|||
public static int getProfileParent(int userId) throws RemoteException {
|
||||
IUserManager um = getUserManager();
|
||||
if (um == null) return -1;
|
||||
return um.getProfileParentId(userId);
|
||||
var userInfo = um.getProfileParent(userId);
|
||||
if (userInfo == null) return userId;
|
||||
else return userInfo.id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ import androidx.annotation.RequiresApi;
|
|||
import java.util.List;
|
||||
|
||||
public interface IUserManager extends IInterface {
|
||||
|
||||
int getProfileParentId(int userId) throws RemoteException;
|
||||
|
||||
@RequiresApi(26)
|
||||
boolean isUserUnlocked(int userId)
|
||||
throws RemoteException;
|
||||
|
|
@ -20,6 +17,8 @@ public interface IUserManager extends IInterface {
|
|||
List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying, boolean excludePreCreated)
|
||||
throws RemoteException;
|
||||
|
||||
UserInfo getProfileParent(int userId) throws RemoteException;
|
||||
|
||||
abstract class Stub extends Binder implements IUserManager {
|
||||
|
||||
public static IUserManager asInterface(IBinder obj) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue