@Override public void appDoneExecuting() { synchronized (mPidsSelfLocked) { ProcessRecord r = mPidsSelfLocked.get(VBinder.getCallingPid()); if (r != null) { r.doneExecuting = true; r.lock.open(); } } }
@Override public IBinder acquireProviderClient(int userId, ProviderInfo info) { ProcessRecord callerApp; synchronized (mPidsSelfLocked) { callerApp = findProcessLocked(VBinder.getCallingPid()); } if (callerApp == null) { throw new SecurityException("Who are you?"); } String processName = info.processName; ProcessRecord r; synchronized (this) { r = startProcessIfNeedLocked(processName, userId, info.packageName); } if (r != null && r.client.asBinder().pingBinder()) { try { return r.client.acquireProviderClient(info); } catch (RemoteException e) { e.printStackTrace(); } } return null; }
@Override public void appDoneExecuting() { synchronized (mPidsSelfLocked) { ProcessRecord r = mPidsSelfLocked.get(VBinder.getCallingPid()); if (r != null) { r.doneExecuting = true; r.lock.open(); } } }
@Override public void appDoneExecuting() { synchronized (mPidsSelfLocked) { ProcessRecord r = mPidsSelfLocked.get(getCallingPid()); if (r != null) { r.doneExecuting = true; r.lock.open(); } } }
@Override public IBinder acquireProviderClient(int userId, ProviderInfo info) { ProcessRecord callerApp; synchronized (mPidsSelfLocked) { callerApp = findProcessLocked(VBinder.getCallingPid()); } if (callerApp == null) { throw new SecurityException("Who are you?"); } String processName = info.processName; ProcessRecord r; synchronized (this) { r = startProcessIfNeedLocked(processName, userId, info.packageName); } if (r != null && r.client.asBinder().pingBinder()) { try { return r.client.acquireProviderClient(info); } catch (RemoteException e) { e.printStackTrace(); } } return null; }
@Override public IBinder acquireProviderClient(int userId, ProviderInfo info) { ProcessRecord callerApp; synchronized (mPidsSelfLocked) { callerApp = findProcessLocked(getCallingPid()); } if (callerApp == null) { throw new SecurityException("Who are you?"); } String processName = info.processName; ProcessRecord r; synchronized (this) { r = startProcessIfNeedLocked(processName, userId, info.packageName); } if (r != null && r.client.asBinder().isBinderAlive()) { try { return r.client.acquireProviderClient(info); } catch (RemoteException e) { e.printStackTrace(); } } return null; }
@Override public void processRestarted(String packageName, String processName, int userId) { int callingPid = getCallingPid(); int appId = VAppManagerService.get().getAppId(packageName); int uid = VUserHandle.getUid(userId, appId); synchronized (this) { ProcessRecord app = findProcessLocked(callingPid); if (app == null) { ApplicationInfo appInfo = VPackageManagerService.get().getApplicationInfo(packageName, 0, userId); appInfo.flags |= ApplicationInfo.FLAG_HAS_CODE; String stubProcessName = getProcessName(callingPid); int vpid = parseVPid(stubProcessName); if (vpid != -1) { performStartProcessLocked(uid, vpid, appInfo, processName); } } } }