Several managers keep an "int mUserId" field which is assigned from Context.getUserId(), so Binder calls referencing that field are okay. Also shift to borrowing the "flavor" logic for detecting userId parameters consistently. Bug: 115654727, 159626156 Test: atest error_prone_android_framework_test Change-Id: I9841fdf16f34c08b113e689e74b94f1ede839e2c
36 lines
1.0 KiB
Java
36 lines
1.0 KiB
Java
/*
|
|
* Copyright (C) 2020 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package android.os;
|
|
|
|
public class UserHandle {
|
|
public static int getUserId(int uid) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public static int getAppId(int uid) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public static int getUid(int userId, int appId) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public static int myUserId() {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
}
|