protected static int getVUid() { return VClientImpl.get().getVUid(); }
private boolean accept(Intent intent) { int uid = intent.getIntExtra("_VA_|_uid_", -1); if (uid != -1) { return VClientImpl.get().getVUid() == uid; } int userId = intent.getIntExtra("_VA_|_user_id_", -1); return userId == -1 || userId == VUserHandle.myUserId(); }
/** * Returns the user id of the current process * @return user id of the current process * @hide */ public static int myUserId() { return getUserId(VClientImpl.get().getVUid()); }
public String getCurrentPackage() { return mBoundApplication != null ? mBoundApplication.appInfo.packageName : VPackageManager.get().getNameForUid(getVUid()); }
public static int myAppId() { return getAppId(VClientImpl.get().getVUid()); }
@Override public Object afterCall(Object who, Method method, Object[] args, Object result) throws Throwable { if (result != null) { Reflect pwd = Reflect.on(result); int uid = pwd.get("pw_uid"); if (uid == VirtualCore.get().myUid()) { pwd.set("pw_uid", VClientImpl.get().getVUid()); } } return result; } }
data.processName = processName; data.appInfo.processName = processName; data.providers = VPackageManager.get().queryContentProviders(processName, getVUid(), PackageManager.GET_META_DATA); VLog.i(TAG, String.format("Binding application %s, (%s)", data.appInfo.packageName, data.processName)); mBoundApplication = data;
protected static int getVUid() { return VClientImpl.get().getVUid(); }
protected static int getVUid() { return VClientImpl.get().getVUid(); }
private boolean accept(Intent intent) { int uid = intent.getIntExtra("_VA_|_uid_", -1); if (uid != -1) { return VClientImpl.get().getVUid() == uid; } int userId = intent.getIntExtra("_VA_|_user_id_", -1); return userId == -1 || userId == VUserHandle.myUserId(); }
private boolean accept(Intent intent) { int uid = intent.getIntExtra("_VA_|_uid_", -1); if (uid != -1) { return VClientImpl.get().getVUid() == uid; } int userId = intent.getIntExtra("_VA_|_user_id_", -1); return userId == -1 || userId == VUserHandle.myUserId(); }
/** * Returns the user id of the current process * @return user id of the current process * @hide */ public static int myUserId() { return getUserId(VClientImpl.get().getVUid()); }
/** * Returns the user id of the current process * @return user id of the current process * @hide */ public static int myUserId() { return getUserId(VClientImpl.get().getVUid()); }
public String getCurrentPackage() { return mBoundApplication != null ? mBoundApplication.appInfo.packageName : VPackageManager.get().getNameForUid(getVUid()); }
public String getCurrentPackage() { return mBoundApplication != null ? mBoundApplication.appInfo.packageName : VPackageManager.get().getNameForUid(getVUid()); }
public static int myAppId() { return getAppId(VClientImpl.get().getVUid()); }
public static int myAppId() { return getAppId(VClientImpl.get().getVUid()); }
@Override public Object afterCall(Object who, Method method, Object[] args, Object result) throws Throwable { if (result != null) { Reflect pwd = Reflect.on(result); int uid = pwd.get("pw_uid"); if (uid == VirtualCore.get().myUid()) { pwd.set("pw_uid", VClientImpl.get().getVUid()); } } return result; } }
@Override public Object afterCall(Object who, Method method, Object[] args, Object result) throws Throwable { if (result != null) { Reflect pwd = Reflect.on(result); int uid = pwd.get("pw_uid"); if (uid == VirtualCore.get().myUid()) { pwd.set("pw_uid", VClientImpl.get().getVUid()); } } return result; } }
data.providers = VPackageManager.get().queryContentProviders(processName, getVUid(), PackageManager.GET_META_DATA); Log.i(TAG, "Binding application " + data.appInfo.packageName + " (" + data.processName + ")"); mBoundApplication = data;