@Implementation @NonNull protected PackageInstaller.Session openSession(int sessionId) throws IOException { if (!sessionInfos.containsKey(sessionId)) { throw new SecurityException("Invalid session Id: " + sessionId); } PackageInstaller.Session session = new PackageInstaller.Session(null); ShadowSession shadowSession = Shadow.extract(session); shadowSession.setShadowPackageInstaller(sessionId, this); sessions.put(sessionId, session); return session; }
@Implementation @NonNull public PackageInstaller.Session openSession(int sessionId) throws IOException { if (!sessionInfos.containsKey(sessionId)) { throw new SecurityException("Invalid session Id: " + sessionId); } PackageInstaller.Session session = new PackageInstaller.Session(null); sessions.put(sessionId, session); return session; }
@Implementation @NonNull public PackageInstaller.Session openSession(int sessionId) throws IOException { if (!sessionInfos.containsKey(sessionId)) { throw new SecurityException("Invalid session Id: " + sessionId); } PackageInstaller.Session session = new PackageInstaller.Session(null); shadowOf(session).setShadowPackageInstaller(sessionId, this); sessions.put(sessionId, session); return session; }
@Implementation @NonNull protected PackageInstaller.Session openSession(int sessionId) throws IOException { if (!sessionInfos.containsKey(sessionId)) { throw new SecurityException("Invalid session Id: " + sessionId); } PackageInstaller.Session session = new PackageInstaller.Session(null); ShadowSession shadowSession = Shadow.extract(session); shadowSession.setShadowPackageInstaller(sessionId, this); sessions.put(sessionId, session); return session; }