[core] Implement get all installed packages from all users
This commit is contained in:
parent
3f94f49568
commit
183dccde17
|
|
@ -1,3 +1,6 @@
|
|||
[submodule "core/src/main/cpp/external/Dobby"]
|
||||
path = core/src/main/cpp/external/Dobby
|
||||
url = https://github.com/jmpews/Dobby.git
|
||||
[submodule "service"]
|
||||
path = service
|
||||
url = https://github.com/Xposed-Modules-Repo/XposedService.git
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ dependencies {
|
|||
implementation 'me.zhanghai.android.fastscroll:library:1.1.5'
|
||||
implementation files('libs/WeatherView-2.0.3.aar')
|
||||
compileOnly project(":hiddenapi-stubs")
|
||||
implementation project(path: ':service')
|
||||
implementation project(":service")
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
|
|
|||
|
|
@ -1,45 +1,20 @@
|
|||
package io.github.lsposed.manager.receivers;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.github.lsposed.manager.App;
|
||||
import io.github.lsposed.lspd.service.ILSPosedService;
|
||||
import io.github.xposed.xposedservice.XposedService;
|
||||
|
||||
public class LSPosedServiceClient {
|
||||
public static IBinder binder = null;
|
||||
public static ILSPosedService service = null;
|
||||
|
||||
private static final IBinder.DeathRecipient DEATH_RECIPIENT = () -> {
|
||||
binder = null;
|
||||
service = null;
|
||||
};
|
||||
|
||||
public static IBinder getBinder() {
|
||||
try {
|
||||
Log.e(App.TAG, "Cannot get binder");
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void testBinder() {
|
||||
if (binder == null && service == null) {
|
||||
binder = getBinder();
|
||||
}
|
||||
if (binder == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
binder.linkToDeath(DEATH_RECIPIENT, 0);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
service = ILSPosedService.Stub.asInterface(binder);
|
||||
XposedService service = XposedService.getService();
|
||||
if (service == null) {
|
||||
Log.e(App.TAG, "Version fail");
|
||||
return;
|
||||
}
|
||||
int ver = -1;
|
||||
|
|
@ -49,5 +24,13 @@ public class LSPosedServiceClient {
|
|||
e.printStackTrace();
|
||||
}
|
||||
Log.i(App.TAG, "Got version " + ver);
|
||||
|
||||
List<PackageInfo> ps = null;
|
||||
try {
|
||||
ps = service.getInstalledPackagesFromAllUsers(0);
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.i(App.TAG, String.valueOf(ps));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,10 +58,11 @@ dependencies {
|
|||
implementation 'rikka.ndk:riru:10'
|
||||
implementation 'com.android.tools.build:apksig:4.1.2'
|
||||
implementation project(path: ':sandhook-hooklib')
|
||||
implementation project(path: ':service')
|
||||
compileOnly project(':hiddenapi-stubs')
|
||||
compileOnly project(':key-selector')
|
||||
compileOnly 'androidx.annotation:annotation:1.1.0'
|
||||
implementation project(':interface')
|
||||
implementation project(':hiddenapi-bridge')
|
||||
}
|
||||
|
||||
android {
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* This file is part of LSPosed.
|
||||
*
|
||||
* LSPosed is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* LSPosed is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright (C) 2020 EdXposed Contributors
|
||||
* Copyright (C) 2021 LSPosed Contributors
|
||||
*/
|
||||
|
||||
/**
|
||||
* Contains {@link android.app.AndroidAppHelper} with various methods for information about the current app.
|
||||
*/
|
||||
package android.app;
|
||||
|
|
@ -28,6 +28,7 @@ import de.robv.android.xposed.IXposedHookZygoteInit;
|
|||
import de.robv.android.xposed.IXposedHookZygoteInit.StartupParam;
|
||||
import de.robv.android.xposed.XposedHelpers;
|
||||
import de.robv.android.xposed.callbacks.XC_InitPackageResources.InitPackageResourcesParam;
|
||||
import hidden.HiddenApiBridge;
|
||||
|
||||
/**
|
||||
* Provides access to resources from a certain path (usually the module's own path).
|
||||
|
|
@ -54,8 +55,7 @@ public class XModuleResources extends Resources {
|
|||
throw new IllegalArgumentException("path must not be null");
|
||||
|
||||
AssetManager assets = new AssetManager();
|
||||
XposedHelpers.callMethod(assets, "addAssetPath", path);
|
||||
//assets.addAssetPath(path);
|
||||
HiddenApiBridge.AssetManager_addAssetPath(assets, path);
|
||||
|
||||
XModuleResources res;
|
||||
if (origRes != null)
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* This file is part of LSPosed.
|
||||
*
|
||||
* LSPosed is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* LSPosed is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright (C) 2020 EdXposed Contributors
|
||||
* Copyright (C) 2021 LSPosed Contributors
|
||||
*/
|
||||
|
||||
/**
|
||||
* Contains classes that are required for replacing resources.
|
||||
*/
|
||||
package android.content.res;
|
||||
|
|
@ -115,12 +115,8 @@ public class XposedInstallerHooker {
|
|||
return ConfigManager.getMiscPath();
|
||||
}
|
||||
});
|
||||
XposedHelpers.findAndHookMethod("io.github.lsposed.manager.receivers.LSPosedServiceClient", classLoader, "getBinder", new XC_MethodReplacement(){
|
||||
@Override
|
||||
protected Object replaceHookedMethod(MethodHookParam param) {
|
||||
return BridgeService.requireBinder();
|
||||
}
|
||||
});
|
||||
Class<?> serviceClass = XposedHelpers.findClass("io.github.xposed.xposedservice.XposedService", classLoader);
|
||||
XposedHelpers.setStaticObjectField(serviceClass, "serviceBinder", BridgeService.requireBinder());
|
||||
|
||||
Utils.logI("Hooked LSPosed Manager");
|
||||
} catch (Throwable t) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package io.github.lsposed.lspd.service;
|
||||
|
||||
import android.app.ActivityThread;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
|
|
@ -17,8 +15,9 @@ import java.lang.reflect.Field;
|
|||
import java.util.Map;
|
||||
|
||||
import io.github.lsposed.lspd.nativebridge.ConfigManager;
|
||||
import io.github.lsposed.lspd.util.Utils;
|
||||
import io.github.xposed.xposedservice.IXposedService;
|
||||
|
||||
import static android.os.Binder.getCallingUid;
|
||||
import static io.github.lsposed.lspd.service.LSPosedService.TAG;
|
||||
|
||||
public class BridgeService {
|
||||
|
|
@ -30,7 +29,7 @@ public class BridgeService {
|
|||
private static final int ACTION_GET_BINDER = ACTION_SEND_BINDER + 1;
|
||||
|
||||
private static IBinder serviceBinder = null;
|
||||
private static ILSPosedService service = null;
|
||||
private static IXposedService service = null;
|
||||
|
||||
private static final IBinder.DeathRecipient BRIDGE_SERVICE_DEATH_RECIPIENT = () -> {
|
||||
Log.i(TAG, "service " + SERVICE_NAME + " is dead. ");
|
||||
|
|
@ -150,7 +149,7 @@ public class BridgeService {
|
|||
}
|
||||
|
||||
serviceBinder = binder;
|
||||
service = ILSPosedService.Stub.asInterface(serviceBinder);
|
||||
service = IXposedService.Stub.asInterface(serviceBinder);
|
||||
try {
|
||||
serviceBinder.linkToDeath(LSPSERVICE_DEATH_RECIPIENT, 0);
|
||||
} catch (RemoteException ignored) {
|
||||
|
|
@ -166,26 +165,10 @@ public class BridgeService {
|
|||
sendToBridge(false);
|
||||
}
|
||||
|
||||
public static ILSPosedService getService() {
|
||||
public static IXposedService getService() {
|
||||
return service;
|
||||
}
|
||||
|
||||
private static PackageManager getPackageManager() {
|
||||
if (pm != null) return pm;
|
||||
ActivityThread activityThread = ActivityThread.currentActivityThread();
|
||||
if (activityThread == null) {
|
||||
Utils.logW("ActivityThread is null");
|
||||
return null;
|
||||
}
|
||||
Context context = activityThread.getSystemContext();
|
||||
if (context == null) {
|
||||
Utils.logW("context is null");
|
||||
return null;
|
||||
}
|
||||
pm = context.getPackageManager();
|
||||
return pm;
|
||||
}
|
||||
|
||||
public static IBinder requireBinder() {
|
||||
IBinder binder = ServiceManager.getService(SERVICE_NAME);
|
||||
if (binder == null) return null;
|
||||
|
|
@ -229,17 +212,11 @@ public class BridgeService {
|
|||
break;
|
||||
}
|
||||
case ACTION_GET_BINDER: {
|
||||
String InstallerPackageName = ConfigManager.getInstallerPackageName();
|
||||
boolean isInstaller = false;
|
||||
PackageManager pm = getPackageManager();
|
||||
if (pm == null) return false;
|
||||
for (String pkg : pm.getPackagesForUid(Binder.getCallingUid())) {
|
||||
isInstaller = isInstaller || InstallerPackageName.equals(pkg);
|
||||
}
|
||||
if (!isInstaller) {
|
||||
try {
|
||||
if (!PackageService.isInstaller(getCallingUid())) return false;
|
||||
} catch (Throwable ignored) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (reply != null) {
|
||||
reply.writeNoException();
|
||||
Log.d(TAG, "saved binder is " + serviceBinder.toString());
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
package io.github.lsposed.lspd.service;
|
||||
|
||||
import android.os.Build;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import de.robv.android.xposed.XposedBridge;
|
||||
import java.util.List;
|
||||
|
||||
public class LSPosedService extends ILSPosedService.Stub {
|
||||
import de.robv.android.xposed.XposedBridge;
|
||||
import io.github.xposed.xposedservice.IXposedService;
|
||||
|
||||
public class LSPosedService extends IXposedService.Stub {
|
||||
public static final String TAG = "LSPosedService";
|
||||
|
||||
// call by ourselves
|
||||
|
|
@ -50,4 +53,9 @@ public class LSPosedService extends ILSPosedService.Stub {
|
|||
public int getVersion() {
|
||||
return XposedBridge.getXposedVersion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PackageInfo> getInstalledPackagesFromAllUsers(int flags) throws RemoteException {
|
||||
return PackageService.getInstalledPackagesFromAllUsers(flags);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,10 +32,8 @@ import android.content.pm.PackageManager;
|
|||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.IBinder;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.RemoteException;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import io.github.lsposed.lspd.nativebridge.ConfigManager;
|
||||
|
|
@ -46,7 +44,6 @@ import java.io.PrintWriter;
|
|||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Scanner;
|
||||
|
|
@ -56,8 +53,6 @@ import de.robv.android.xposed.XposedHelpers;
|
|||
public class PackageReceiver {
|
||||
private static final BroadcastReceiver RECEIVER = new BroadcastReceiver() {
|
||||
|
||||
private PackageManager pm = null;
|
||||
|
||||
private final String MODULES_LIST_FILENAME = "conf/modules.list";
|
||||
private final String ENABLED_MODULES_LIST_FILENAME = "conf/enabled_modules.list";
|
||||
private final String MODULE_UPDATED = "io.github.lsposed.action.MODULE_UPDATED";
|
||||
|
|
@ -68,34 +63,15 @@ public class PackageReceiver {
|
|||
return (uri != null) ? uri.getSchemeSpecificPart() : null;
|
||||
}
|
||||
|
||||
private void getPackageManager() {
|
||||
if (pm != null) return;
|
||||
ActivityThread activityThread = ActivityThread.currentActivityThread();
|
||||
if (activityThread == null) {
|
||||
Utils.logW("ActivityThread is null");
|
||||
return;
|
||||
}
|
||||
Context context = activityThread.getSystemContext();
|
||||
if (context == null) {
|
||||
Utils.logW("context is null");
|
||||
return;
|
||||
}
|
||||
pm = context.getPackageManager();
|
||||
}
|
||||
|
||||
private boolean isXposedModule(ApplicationInfo app) {
|
||||
return app != null && app.enabled && app.metaData != null && app.metaData.containsKey("xposedmodule");
|
||||
}
|
||||
|
||||
private PackageInfo getPackageInfo(String packageName) {
|
||||
getPackageManager();
|
||||
if (pm == null) {
|
||||
Utils.logW("PM is null");
|
||||
return null;
|
||||
}
|
||||
private PackageInfo getPackageInfo(String packageName, int uid) {
|
||||
try {
|
||||
return pm.getPackageInfo(packageName, PackageManager.GET_META_DATA);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
return PackageService.getPackageInfo(packageName, PackageManager.GET_META_DATA, uid);
|
||||
} catch (RemoteException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -108,7 +84,7 @@ public class PackageReceiver {
|
|||
Scanner scanner = new Scanner(enabledModules);
|
||||
while (scanner.hasNextLine()) {
|
||||
String packageName = scanner.nextLine();
|
||||
PackageInfo info = getPackageInfo(packageName);
|
||||
PackageInfo info = getPackageInfo(packageName, 0);
|
||||
if (info != null && isXposedModule(info.applicationInfo))
|
||||
result.put(packageName, info.applicationInfo.sourceDir);
|
||||
else if (info == null)
|
||||
|
|
@ -189,17 +165,12 @@ public class PackageReceiver {
|
|||
}
|
||||
}
|
||||
|
||||
PackageInfo pkgInfo = getPackageInfo(packageName);
|
||||
PackageInfo pkgInfo = getPackageInfo(packageName, intent.getIntExtra(Intent.EXTRA_USER, 0));
|
||||
|
||||
if (pkgInfo != null && !isXposedModule(pkgInfo.applicationInfo)) return;
|
||||
|
||||
try {
|
||||
UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
|
||||
@SuppressLint("DiscouragedPrivateApi")
|
||||
Method m = UserManager.class.getDeclaredMethod("getUsers");
|
||||
m.setAccessible(true);
|
||||
for (Object uh : (List<Object>) m.invoke(um)) {
|
||||
int uid = (int) uh.getClass().getDeclaredField("id").get(uh);
|
||||
for (int uid : UserService.getUsers()) {
|
||||
Utils.logI("updating uid: " + uid);
|
||||
boolean activated = updateModuleList(uid, packageName);
|
||||
UserHandle userHandle = null;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package io.github.lsposed.lspd.service;
|
||||
|
||||
import android.content.pm.IPackageManager;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.github.lsposed.lspd.nativebridge.ConfigManager;
|
||||
|
||||
public class PackageService {
|
||||
private static IPackageManager pm = null;
|
||||
private static IBinder binder = null;
|
||||
|
||||
public static IPackageManager getPackageManager() {
|
||||
if (binder == null && pm == null) {
|
||||
binder = ServiceManager.getService("package");
|
||||
pm = IPackageManager.Stub.asInterface(binder);
|
||||
}
|
||||
return pm;
|
||||
}
|
||||
|
||||
public static PackageInfo getPackageInfo(String packageName, int flags, int uid) throws RemoteException {
|
||||
pm = getPackageManager();
|
||||
if (pm == null) return null;
|
||||
return pm.getPackageInfo(packageName, flags, uid);
|
||||
}
|
||||
|
||||
public static String[] getPackagesForUid(int uid) throws RemoteException {
|
||||
pm = getPackageManager();
|
||||
if (pm == null) return new String[0];
|
||||
return pm.getPackagesForUid(uid);
|
||||
}
|
||||
|
||||
public static boolean isInstaller(int uid) throws RemoteException {
|
||||
boolean res = false;
|
||||
String InstallerPackageName = ConfigManager.getInstallerPackageName();
|
||||
for (String pkg : getPackagesForUid(uid)) {
|
||||
res = res || InstallerPackageName.equals(pkg);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static List<PackageInfo> getInstalledPackagesFromAllUsers(int flags) throws RemoteException {
|
||||
if (!isInstaller(Binder.getCallingUid())) {
|
||||
throw new RemoteException("Permission denied");
|
||||
}
|
||||
ArrayList<PackageInfo> res = new ArrayList<>();
|
||||
IPackageManager pm = getPackageManager();
|
||||
if (pm == null) return res;
|
||||
for (int uid : UserService.getUsers()) {
|
||||
Log.w("LSPosed", "uid: " + uid);
|
||||
res.addAll(pm.getInstalledPackages(flags, uid).getList());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package io.github.lsposed.lspd.service;
|
||||
|
||||
public class SystemService {
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package io.github.lsposed.lspd.service;
|
||||
|
||||
import android.content.pm.UserInfo;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.os.IUserManager;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UserService {
|
||||
private static IUserManager um = null;
|
||||
private static IBinder binder = null;
|
||||
|
||||
public static IUserManager getUserManager() {
|
||||
if (binder == null && um == null) {
|
||||
binder = ServiceManager.getService("user");
|
||||
um = IUserManager.Stub.asInterface(binder);
|
||||
}
|
||||
return um;
|
||||
}
|
||||
|
||||
public static int[] getUsers() throws RemoteException {
|
||||
IUserManager um = getUserManager();
|
||||
if (um == null) return new int[0];
|
||||
List<UserInfo> users;
|
||||
if(Build.VERSION.SDK_INT >= 30) {
|
||||
users = um.getUsers(true, true, true);
|
||||
} else {
|
||||
users = um.getUsers(true);
|
||||
}
|
||||
int[] userArray = new int[users.size()];
|
||||
for (int i = 0; i < users.size(); i++) {
|
||||
UserInfo uh = users.get(i);
|
||||
userArray[i] = uh.id;
|
||||
}
|
||||
return userArray;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#Mon Jan 25 20:15:25 CST 2021
|
||||
#Wed Feb 10 17:44:10 CST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
apply plugin: 'java-library'
|
||||
|
||||
dependencies {
|
||||
compileOnly project(':hiddenapi-stubs')
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package hidden;
|
||||
|
||||
//import android.annotation.NonNull;
|
||||
//import android.app.ActivityThread;
|
||||
//import android.content.pm.ApplicationInfo;
|
||||
//import android.content.pm.PackageInfo;
|
||||
//import android.content.pm.PackageManager;
|
||||
//import android.os.UserHandle;
|
||||
import android.annotation.NonNull;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.content.res.AssetManager;
|
||||
import android.os.UserManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HiddenApiBridge {
|
||||
public static int AssetManager_addAssetPath(AssetManager am, String path) {
|
||||
return am.addAssetPath(path);
|
||||
}
|
||||
public static List<UserInfo> UserManager_getUsers(UserManager um) {
|
||||
return um.getUsers();
|
||||
}
|
||||
// public static ApplicationInfo PackageManager_getApplicationInfoAsUser(PackageManager packageManager, @NonNull String packageName, int flags, int userId) throws android.content.pm.PackageManager.NameNotFoundException {
|
||||
// return packageManager.getApplicationInfoAsUser(packageName, flags, userId);
|
||||
// }
|
||||
//
|
||||
// public static PackageInfo PackageManager_getPackageInfoAsUser(PackageManager packageManager, @NonNull String packageName, int flags, int userId) throws android.content.pm.PackageManager.NameNotFoundException {
|
||||
// return packageManager.getPackageInfoAsUser(packageName, flags, userId);
|
||||
// }
|
||||
//
|
||||
// public static List<ApplicationInfo> PackageManager_getInstalledApplicationsAsUser(PackageManager packageManager, int flags, int userId) {
|
||||
// return packageManager.getInstalledApplicationsAsUser(flags, userId);
|
||||
// }
|
||||
//
|
||||
public static List<PackageInfo> PackageManager_getInstalledPackagesAsUser(PackageManager packageManager, int flags, int userId) {
|
||||
return packageManager.getInstalledPackagesAsUser(flags, userId);
|
||||
}
|
||||
//
|
||||
// public static UserHandle createUserHandle(int userId) {
|
||||
// return new UserHandle(userId);
|
||||
// }
|
||||
//
|
||||
// public static ActivityThread ActivityThread_systemMain() {
|
||||
// return ActivityThread.systemMain();
|
||||
// }
|
||||
//
|
||||
// public static String PackageInfo_overlayTarget(PackageInfo packageInfo) {
|
||||
// return packageInfo.overlayTarget;
|
||||
// }
|
||||
}
|
||||
|
|
@ -1,6 +1 @@
|
|||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion androidCompileSdkVersion.toInteger()
|
||||
ndkVersion androidCompileNdkVersion
|
||||
}
|
||||
apply plugin: 'java-library'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (C) 2013 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.annotation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
/**
|
||||
* Denotes that a parameter, field or method return value can never be null.
|
||||
* <p>
|
||||
* This is a marker annotation and it has no specific attributes.
|
||||
*
|
||||
* @paramDoc This value must never be {@code null}.
|
||||
* @returnDoc This value will never be {@code null}.
|
||||
* @hide
|
||||
*/
|
||||
@Retention(SOURCE)
|
||||
@Target({METHOD, PARAMETER, FIELD})
|
||||
public @interface NonNull {
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (C) 2013 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.annotation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
/**
|
||||
* Denotes that a parameter, field or method return value can be null.
|
||||
* <p>
|
||||
* When decorating a method call parameter, this denotes that the parameter can
|
||||
* legitimately be null and the method will gracefully deal with it. Typically
|
||||
* used on optional parameters.
|
||||
* <p>
|
||||
* When decorating a method, this denotes the method might legitimately return
|
||||
* null.
|
||||
* <p>
|
||||
* This is a marker annotation and it has no specific attributes.
|
||||
*
|
||||
* @paramDoc This value may be {@code null}.
|
||||
* @returnDoc This value may be {@code null}.
|
||||
*/
|
||||
@Retention(SOURCE)
|
||||
@Target({METHOD, PARAMETER, FIELD})
|
||||
public @interface Nullable {
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.app;
|
||||
|
||||
public class Application {
|
||||
}
|
||||
|
|
@ -1,550 +1,6 @@
|
|||
package android.app;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.IntentSender;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.AssetManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.database.DatabaseErrorHandler;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.UserHandle;
|
||||
import android.view.Display;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class ContextImpl extends Context {
|
||||
@Override
|
||||
public AssetManager getAssets() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resources getResources() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PackageManager getPackageManager() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContentResolver getContentResolver() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Looper getMainLooper() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context getApplicationContext() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTheme(int resid) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resources.Theme getTheme() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClassLoader getClassLoader() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPackageName() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApplicationInfo getApplicationInfo() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPackageResourcePath() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPackageCodePath() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SharedPreferences getSharedPreferences(String name, int mode) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveSharedPreferencesFrom(Context sourceContext, String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteSharedPreferences(String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileInputStream openFileInput(String name) throws FileNotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileOutputStream openFileOutput(String name, int mode) throws FileNotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteFile(String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getFileStreamPath(String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getDataDir() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getFilesDir() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getNoBackupFilesDir() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getExternalFilesDir(String type) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File[] getExternalFilesDirs(String type) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getObbDir() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File[] getObbDirs() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getCacheDir() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getCodeCacheDir() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getExternalCacheDir() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File[] getExternalCacheDirs() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File[] getExternalMediaDirs() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] fileList() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getDir(String name, int mode) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SQLiteDatabase openOrCreateDatabase(String name, int mode, SQLiteDatabase.CursorFactory factory) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SQLiteDatabase openOrCreateDatabase(String name, int mode, SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveDatabaseFrom(Context sourceContext, String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteDatabase(String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getDatabasePath(String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] databaseList() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Drawable getWallpaper() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Drawable peekWallpaper() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWallpaperDesiredMinimumWidth() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWallpaperDesiredMinimumHeight() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWallpaper(Bitmap bitmap) throws IOException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWallpaper(InputStream data) throws IOException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearWallpaper() throws IOException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startActivity(Intent intent) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startActivity(Intent intent, Bundle options) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startActivities(Intent[] intents) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startActivities(Intent[] intents, Bundle options) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startIntentSender(IntentSender intent, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) throws IntentSender.SendIntentException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startIntentSender(IntentSender intent, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) throws IntentSender.SendIntentException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBroadcast(Intent intent) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBroadcast(Intent intent, String receiverPermission) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendOrderedBroadcast(Intent intent, String receiverPermission) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendOrderedBroadcast(Intent intent, String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBroadcastAsUser(Intent intent, UserHandle user) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBroadcastAsUser(Intent intent, UserHandle user, String receiverPermission) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user, String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendStickyBroadcast(Intent intent) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendStickyOrderedBroadcast(Intent intent, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeStickyBroadcast(Intent intent) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendStickyBroadcastAsUser(Intent intent, UserHandle user) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendStickyOrderedBroadcastAsUser(Intent intent, UserHandle user, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeStickyBroadcastAsUser(Intent intent, UserHandle user) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, int flags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, String broadcastPermission, Handler scheduler) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, String broadcastPermission, Handler scheduler, int flags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unregisterReceiver(BroadcastReceiver receiver) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ComponentName startService(Intent service) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ComponentName startForegroundService(Intent service) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stopService(Intent service) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bindService(Intent service, ServiceConnection conn, int flags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unbindService(ServiceConnection conn) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startInstrumentation(ComponentName className, String profileFile, Bundle arguments) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getSystemService(String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSystemServiceName(Class<?> serviceClass) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkPermission(String permission, int pid, int uid) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkCallingPermission(String permission) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkCallingOrSelfPermission(String permission) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkSelfPermission(String permission) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enforcePermission(String permission, int pid, int uid, String message) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enforceCallingPermission(String permission, String message) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enforceCallingOrSelfPermission(String permission, String message) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void grantUriPermission(String toPackage, Uri uri, int modeFlags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void revokeUriPermission(Uri uri, int modeFlags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void revokeUriPermission(String toPackage, Uri uri, int modeFlags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkCallingUriPermission(Uri uri, int modeFlags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkUriPermission(Uri uri, String readPermission, String writePermission, int pid, int uid, int modeFlags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enforceUriPermission(Uri uri, int pid, int uid, int modeFlags, String message) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enforceCallingUriPermission(Uri uri, int modeFlags, String message) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enforceCallingOrSelfUriPermission(Uri uri, int modeFlags, String message) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enforceUriPermission(Uri uri, String readPermission, String writePermission, int pid, int uid, int modeFlags, String message) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context createPackageContext(String packageName, int flags) throws PackageManager.NameNotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context createContextForSplit(String splitName) throws PackageManager.NameNotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context createConfigurationContext(Configuration overrideConfiguration) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context createDisplayContext(Display display) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context createDeviceProtectedStorageContext() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDeviceProtectedStorage() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
package android.content;
|
||||
|
||||
public final class ComponentName {
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.content;
|
||||
|
||||
public class Context {
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.content.pm;
|
||||
|
||||
public class ApplicationInfo {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package android.content.pm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
abstract class BaseParceledListSlice<T> {
|
||||
|
||||
public List<T> getList() {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package android.content.pm;
|
||||
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
import android.os.RemoteException;
|
||||
|
||||
public interface IPackageManager extends IInterface {
|
||||
|
||||
ApplicationInfo getApplicationInfo(String packageName, int flags, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
PackageInfo getPackageInfo(String packageName, int flags, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
int getPackageUid(String packageName, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
String[] getPackagesForUid(int uid)
|
||||
throws RemoteException;
|
||||
|
||||
ParceledListSlice getInstalledPackages(int flags, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
ParceledListSlice getInstalledApplications(int flags, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
int getUidForSharedUser(String sharedUserName)
|
||||
throws RemoteException;
|
||||
|
||||
void grantRuntimePermission(String packageName, String permissionName, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
void revokeRuntimePermission(String packageName, String permissionName, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
int getPermissionFlags(String permissionName, String packageName, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
void updatePermissionFlags(String permissionName, String packageName, int flagMask, int flagValues, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
int checkPermission(String permName, String pkgName, int userId)
|
||||
throws RemoteException;
|
||||
|
||||
int checkUidPermission(String permName, int uid)
|
||||
throws RemoteException;
|
||||
|
||||
abstract class Stub extends Binder implements IPackageManager {
|
||||
|
||||
public static IPackageManager asInterface(IBinder obj) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package android.content.pm;
|
||||
|
||||
public class PackageInfo {
|
||||
|
||||
public String overlayTarget;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package android.content.pm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PackageManager {
|
||||
public List<PackageInfo> getInstalledPackagesAsUser(int flags, int userId) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.content.pm;
|
||||
|
||||
public class ParceledListSlice<T> extends BaseParceledListSlice<T> {
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package android.content.pm;
|
||||
|
||||
public class UserInfo {
|
||||
public int id;
|
||||
}
|
||||
|
|
@ -4,15 +4,4 @@ import android.os.Parcel;
|
|||
import android.os.Parcelable;
|
||||
|
||||
public class CompatibilityInfo implements Parcelable {
|
||||
@Override
|
||||
public int describeContents() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<CompatibilityInfo> CREATOR = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
package android.content.res;
|
||||
|
||||
public class Configuration {
|
||||
}
|
||||
|
|
@ -1,26 +1,8 @@
|
|||
package android.content.res;
|
||||
|
||||
import android.graphics.Movie;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.TypedValue;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public class Resources {
|
||||
@SuppressWarnings("serial")
|
||||
public static class NotFoundException extends RuntimeException {
|
||||
public NotFoundException() {
|
||||
}
|
||||
|
||||
public NotFoundException(String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
}
|
||||
|
||||
public final class Theme {
|
||||
}
|
||||
|
||||
public Resources(AssetManager assets, DisplayMetrics metrics, Configuration config) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
|
@ -28,177 +10,4 @@ public class Resources {
|
|||
public Resources(ClassLoader classLoader) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public void setImpl(ResourcesImpl impl) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public static Resources getSystem() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public XmlResourceParser getAnimation(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public final AssetManager getAssets() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public boolean getBoolean(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getColor(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public ColorStateList getColorStateList(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public Configuration getConfiguration() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public float getDimension(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getDimensionPixelOffset(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getDimensionPixelSize(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public DisplayMetrics getDisplayMetrics() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public Drawable getDrawable(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
/** Since SDK21 */
|
||||
public Drawable getDrawable(int id, Theme theme) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
/** Since SDK21, CM12 */
|
||||
public Drawable getDrawable(int id, Theme theme, boolean supportComposedIcons) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public Drawable getDrawableForDensity(int id, int density) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
/** Since SDK21 */
|
||||
public Drawable getDrawableForDensity(int id, int density, Theme theme) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
/** Since SDK21, CM12 */
|
||||
public Drawable getDrawableForDensity(int id, int density, Theme theme, boolean supportComposedIcons) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
/** Since SDK21 */
|
||||
public float getFloat(int id) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public float getFraction(int id, int base, int pbase) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getIdentifier(String name, String defType, String defPackage) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int[] getIntArray(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getInteger(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public XmlResourceParser getLayout(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public Movie getMovie(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getQuantityString(int id, int quantity) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getQuantityString(int id, int quantity, Object... formatArgs) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public CharSequence getQuantityText(int id, int quantity) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getResourceEntryName(int resid) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getResourceName(int resid) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getResourcePackageName(int resid) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getResourceTypeName(int resid) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getString(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getString(int id, Object... formatArgs) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String[] getStringArray(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public CharSequence getText(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public CharSequence getText(int id, CharSequence def) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public CharSequence[] getTextArray(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public void getValue(int id, TypedValue outValue, boolean resolveRefs) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public XmlResourceParser getXml(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public InputStream openRawResource(int id) throws NotFoundException {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public TypedArray obtainTypedArray (int id) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,92 +3,92 @@ package android.content.res;
|
|||
import android.graphics.drawable.Drawable;
|
||||
|
||||
public class TypedArray {
|
||||
/** Only for API stubs creation, DO NOT USE! */
|
||||
/*package*/ TypedArray() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
// /** Only for API stubs creation, DO NOT USE! */
|
||||
// /*package*/ TypedArray() {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
protected TypedArray(Resources resources) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
protected TypedArray(Resources resources, int[] data, int[] indices, int len) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public boolean getBoolean(int index, boolean defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getColor(int index, int defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public ColorStateList getColorStateList(int index) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public float getDimension(int index, float defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getDimensionPixelOffset(int index, int defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getDimensionPixelSize(int index, int defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public Drawable getDrawable(int index) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public float getFloat(int index, float defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public float getFraction(int index, int base, int pbase, float defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getInt(int index, int defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getInteger(int index, int defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getLayoutDimension(int index, int defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getLayoutDimension(int index, String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public int getResourceId(int index, int defValue) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public Resources getResources() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public String getString(int index) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public CharSequence getText(int index) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public CharSequence[] getTextArray(int index) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
|
||||
public void recycle() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
//
|
||||
// protected TypedArray(Resources resources, int[] data, int[] indices, int len) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public boolean getBoolean(int index, boolean defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public int getColor(int index, int defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public ColorStateList getColorStateList(int index) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public float getDimension(int index, float defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public int getDimensionPixelOffset(int index, int defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public int getDimensionPixelSize(int index, int defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public Drawable getDrawable(int index) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public float getFloat(int index, float defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public float getFraction(int index, int base, int pbase, float defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public int getInt(int index, int defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public int getInteger(int index, int defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public int getLayoutDimension(int index, int defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public int getLayoutDimension(int index, String name) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public int getResourceId(int index, int defValue) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public Resources getResources() {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public String getString(int index) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public CharSequence getText(int index) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public CharSequence[] getTextArray(int index) {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
//
|
||||
// public void recycle() {
|
||||
// throw new UnsupportedOperationException("STUB");
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
package android.graphics;
|
||||
|
||||
public class Movie {
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.graphics.drawable;
|
||||
|
||||
public class Drawable {
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package android.os;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
|
||||
public class Binder implements IBinder {
|
||||
|
||||
@Override
|
||||
public boolean transact(int code, @NonNull Parcel data, Parcel reply, int flags) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInterfaceDescriptor() {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
public boolean pingBinder() {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBinderAlive() {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInterface queryLocalInterface(@NonNull String descriptor) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(@NonNull FileDescriptor fd, String[] args) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dumpAsync(@NonNull FileDescriptor fd, String[] args) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void linkToDeath(@NonNull DeathRecipient recipient, int flags) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean unlinkToDeath(@NonNull DeathRecipient recipient, int flags) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
protected boolean onTransact(int code, @NonNull Parcel data, @Nullable Parcel reply,
|
||||
int flags) throws RemoteException {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package android.os;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
|
||||
public interface IBinder {
|
||||
|
||||
boolean transact(int code, @NonNull Parcel data, @Nullable Parcel reply, int flags);
|
||||
|
||||
@Nullable
|
||||
String getInterfaceDescriptor();
|
||||
|
||||
boolean pingBinder();
|
||||
|
||||
boolean isBinderAlive();
|
||||
|
||||
@Nullable
|
||||
IInterface queryLocalInterface(@NonNull String descriptor);
|
||||
|
||||
void dump(@NonNull FileDescriptor fd, @Nullable String[] args);
|
||||
|
||||
void dumpAsync(@NonNull FileDescriptor fd, @Nullable String[] args);
|
||||
|
||||
void linkToDeath(@NonNull DeathRecipient recipient, int flags);
|
||||
|
||||
boolean unlinkToDeath(@NonNull DeathRecipient recipient, int flags);
|
||||
|
||||
interface DeathRecipient {
|
||||
void binderDied();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
package android.os;
|
||||
|
||||
public interface IInterface {
|
||||
|
||||
IBinder asBinder();
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package android.os;
|
||||
|
||||
import android.content.pm.UserInfo;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IUserManager extends IInterface {
|
||||
|
||||
@RequiresApi(26)
|
||||
boolean isUserUnlocked(int userId)
|
||||
throws RemoteException;
|
||||
|
||||
List<UserInfo> getUsers(boolean excludeDying)
|
||||
throws RemoteException;
|
||||
|
||||
@RequiresApi(30)
|
||||
List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying, boolean excludePreCreated)
|
||||
throws RemoteException;
|
||||
|
||||
abstract class Stub extends Binder implements IUserManager {
|
||||
|
||||
public static IUserManager asInterface(IBinder obj) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.os;
|
||||
|
||||
public class Parcel {
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.os;
|
||||
|
||||
public interface Parcelable {
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package android.os;
|
||||
|
||||
public class RemoteException extends Exception {
|
||||
|
||||
public RemoteException(String message) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,28 @@
|
|||
package android.os;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
|
||||
public class ServiceManager {
|
||||
private static IServiceManager sServiceManager;
|
||||
|
||||
private static IServiceManager getIServiceManager() {
|
||||
throw new IllegalArgumentException("Stub!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to a service with the given name.
|
||||
*
|
||||
* @param name the name of the service to get
|
||||
* @return a reference to the service, or <code>null</code> if the service doesn't exist
|
||||
*/
|
||||
@Nullable
|
||||
public static IBinder getService(String name) {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
/**
|
||||
* Place a new @a service called @a name into the service
|
||||
* manager.
|
||||
*
|
||||
* @param name the name of the new service
|
||||
* @param service the service object
|
||||
*/
|
||||
public static void addService(String name, IBinder service) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package android.os;
|
||||
|
||||
public class UserHandle {
|
||||
|
||||
public UserHandle(int h) {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
|
||||
public int getIdentifier() {
|
||||
throw new RuntimeException("STUB");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package android.os;
|
||||
|
||||
import android.content.pm.UserInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UserManager {
|
||||
public List<UserInfo> getUsers() {
|
||||
throw new UnsupportedOperationException("STUB");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.util;
|
||||
|
||||
public class DisplayMetrics {
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package android.util;
|
||||
|
||||
public class TypedValue {
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (C) 2015 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 androidx.annotation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.CLASS;
|
||||
|
||||
/**
|
||||
* Denotes that the annotated element should be an int or long in the given range
|
||||
* <p>
|
||||
* Example:
|
||||
* <pre><code>
|
||||
* @IntRange(from=0,to=255)
|
||||
* public int getAlpha() {
|
||||
* ...
|
||||
* }
|
||||
* </code></pre>
|
||||
*/
|
||||
@Retention(CLASS)
|
||||
@Target({METHOD, PARAMETER, FIELD, LOCAL_VARIABLE, ANNOTATION_TYPE})
|
||||
public @interface IntRange {
|
||||
/**
|
||||
* Smallest value, inclusive
|
||||
*/
|
||||
long from() default Long.MIN_VALUE;
|
||||
|
||||
/**
|
||||
* Largest value, inclusive
|
||||
*/
|
||||
long to() default Long.MAX_VALUE;
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (C) 2016 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 androidx.annotation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
/**
|
||||
* Denotes that the annotated element should only be called on the given API level
|
||||
* or higher.
|
||||
* <p>
|
||||
* This is similar in purpose to the older {@code @TargetApi} annotation, but more
|
||||
* clearly expresses that this is a requirement on the caller, rather than being
|
||||
* used to "suppress" warnings within the method that exceed the {@code minSdkVersion}.
|
||||
*/
|
||||
@Retention(SOURCE)
|
||||
@Target({TYPE, METHOD, CONSTRUCTOR, FIELD})
|
||||
public @interface RequiresApi {
|
||||
|
||||
/**
|
||||
* The API level to require. Alias for {@link #api} which allows you to leave out the
|
||||
* {@code api=} part.
|
||||
*/
|
||||
@IntRange(from = 1)
|
||||
int value() default 1;
|
||||
|
||||
/**
|
||||
* The API level to require
|
||||
*/
|
||||
@IntRange(from = 1)
|
||||
int api() default 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
package org.xmlpull.v1;
|
||||
|
||||
public class XmlPullParserException extends Throwable {
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit b012241d59c3496960159e02c0f2e5787275bc3a
|
||||
|
|
@ -1 +0,0 @@
|
|||
/build
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
plugins {
|
||||
id 'com.android.library'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion androidCompileSdkVersion.toInteger()
|
||||
ndkVersion androidCompileNdkVersion
|
||||
buildToolsVersion androidBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion androidMinSdkVersion.toInteger()
|
||||
targetSdkVersion androidTargetSdkVersion.toInteger()
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.github.lsposed.lspd.service">
|
||||
|
||||
</manifest>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package io.github.lsposed.lspd.service;
|
||||
|
||||
interface ILSPosedService {
|
||||
int getVersion() = 1;
|
||||
}
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
rootProject.name = "LSPosed"
|
||||
include ':service'
|
||||
include ':core', ':hiddenapi-stubs', ':sandhook-hooklib', ':sandhook-annotation', ':app', ':key-selector'
|
||||
include ':core', ':hiddenapi-stubs', ':sandhook-hooklib', ':sandhook-annotation', ':app', ':key-selector', ':service', ':interface', ':hiddenapi-bridge'
|
||||
|
||||
def service_root = "service"
|
||||
project(':interface').projectDir = file("$service_root${File.separator}interface")
|
||||
project(':service').projectDir = file("$service_root${File.separator}service")
|
||||
|
|
|
|||
Loading…
Reference in New Issue