Java 类android.content.pm.IPackageInstallerSession 实例源码

项目:VirtualHook    文件:VPackageInstallerService.java   
@Override
public IPackageInstallerSession openSession(int sessionId) throws RemoteException {
    try {
        return openSessionInternal(sessionId);
    } catch (IOException e) {
        throw new IllegalStateException(e);
    }
}
项目:VirtualHook    文件:VPackageInstallerService.java   
private IPackageInstallerSession openSessionInternal(int sessionId) throws IOException {
    synchronized (mSessions) {
        final PackageInstallerSession session = mSessions.get(sessionId);
        if (session == null || !isCallingUidOwner(session)) {
            throw new SecurityException("Caller has no access to session " + sessionId);
        }
        session.open();
        return session;
    }
}
项目:TPlayer    文件:VPackageInstallerService.java   
@Override
public IPackageInstallerSession openSession(int sessionId) throws RemoteException {
    try {
        return openSessionInternal(sessionId);
    } catch (IOException e) {
        throw new IllegalStateException(e);
    }
}
项目:TPlayer    文件:VPackageInstallerService.java   
private IPackageInstallerSession openSessionInternal(int sessionId) throws IOException {
    synchronized (mSessions) {
        final PackageInstallerSession session = mSessions.get(sessionId);
        if (session == null || !isCallingUidOwner(session)) {
            throw new SecurityException("Caller has no access to session " + sessionId);
        }
        session.open();
        return session;
    }
}
项目:container    文件:VPackageInstallerService.java   
@Override
public IPackageInstallerSession openSession(int sessionId) throws RemoteException {
    try {
        return openSessionInternal(sessionId);
    } catch (IOException e) {
        throw new IllegalStateException(e);
    }
}
项目:container    文件:VPackageInstallerService.java   
private IPackageInstallerSession openSessionInternal(int sessionId) throws IOException {
    synchronized (mSessions) {
        final PackageInstallerSession session = mSessions.get(sessionId);
        if (session == null || !isCallingUidOwner(session)) {
            throw new SecurityException("Caller has no access to session " + sessionId);
        }
        session.open();
        return session;
    }
}