public void open() throws IOException { if (mActiveCount.getAndIncrement() == 0) { mCallback.onSessionActiveChanged(this, true); } synchronized (mLock) { if (!mPrepared) { if (stageDir == null) { throw new IllegalArgumentException( "Exactly one of stageDir or stageCid stage must be set"); } mPrepared = true; mCallback.onSessionPrepared(this); } } }
@Override public void updateSessionAppLabel(int sessionId, String appLabel) throws RemoteException { synchronized (mSessions) { final PackageInstallerSession session = mSessions.get(sessionId); if (session == null || !isCallingUidOwner(session)) { throw new SecurityException("Caller has no access to session " + sessionId); } session.params.appLabel = appLabel; mInternalCallback.onSessionBadgingChanged(session); } }
private void computeProgressLocked(boolean forcePublish) { mProgress = constrain(mClientProgress * 0.8f, 0f, 0.8f) + constrain(mInternalProgress * 0.2f, 0f, 0.2f); // Only publish when meaningful change if (forcePublish || Math.abs(mProgress - mReportedProgress) >= 0.01) { mReportedProgress = mProgress; mCallback.onSessionProgressChanged(this, mProgress); } }
mCallback.onSessionSealedBlocking(this);
mCallback.onSessionSealedBlocking(this);
public void open() throws IOException { if (mActiveCount.getAndIncrement() == 0) { mCallback.onSessionActiveChanged(this, true); } synchronized (mLock) { if (!mPrepared) { if (stageDir == null) { throw new IllegalArgumentException( "Exactly one of stageDir or stageCid stage must be set"); } mPrepared = true; mCallback.onSessionPrepared(this); } } }
public void open() throws IOException { if (mActiveCount.getAndIncrement() == 0) { mCallback.onSessionActiveChanged(this, true); } synchronized (mLock) { if (!mPrepared) { if (stageDir == null) { throw new IllegalArgumentException( "Exactly one of stageDir or stageCid stage must be set"); } mPrepared = true; mCallback.onSessionPrepared(this); } } }
@Override public void updateSessionAppIcon(int sessionId, Bitmap appIcon) { synchronized (mSessions) { final PackageInstallerSession session = mSessions.get(sessionId); if (session == null || !isCallingUidOwner(session)) { throw new SecurityException("Caller has no access to session " + sessionId); } session.params.appIcon = appIcon; session.params.appIconLastModified = -1; mInternalCallback.onSessionBadgingChanged(session); } }
@Override public void updateSessionAppIcon(int sessionId, Bitmap appIcon) { synchronized (mSessions) { final PackageInstallerSession session = mSessions.get(sessionId); if (session == null || !isCallingUidOwner(session)) { throw new SecurityException("Caller has no access to session " + sessionId); } session.params.appIcon = appIcon; session.params.appIconLastModified = -1; mInternalCallback.onSessionBadgingChanged(session); } }
private void dispatchSessionFinished(int returnCode, String msg, Bundle extras) { mFinalStatus = returnCode; mFinalMessage = msg; if (mRemoteObserver != null) { try { mRemoteObserver.onPackageInstalled(mPackageName, returnCode, msg, extras); } catch (RemoteException ignored) { } } final boolean success = (returnCode == INSTALL_SUCCEEDED); mCallback.onSessionFinished(this, success); }
@Override public void updateSessionAppLabel(int sessionId, String appLabel) throws RemoteException { synchronized (mSessions) { final PackageInstallerSession session = mSessions.get(sessionId); if (session == null || !isCallingUidOwner(session)) { throw new SecurityException("Caller has no access to session " + sessionId); } session.params.appLabel = appLabel; mInternalCallback.onSessionBadgingChanged(session); } }
@Override public void close() throws RemoteException { if (mActiveCount.decrementAndGet() == 0) { mCallback.onSessionActiveChanged(this, false); } }
private void computeProgressLocked(boolean forcePublish) { mProgress = constrain(mClientProgress * 0.8f, 0f, 0.8f) + constrain(mInternalProgress * 0.2f, 0f, 0.2f); // Only publish when meaningful change if (forcePublish || Math.abs(mProgress - mReportedProgress) >= 0.01) { mReportedProgress = mProgress; mCallback.onSessionProgressChanged(this, mProgress); } }
private void computeProgressLocked(boolean forcePublish) { mProgress = constrain(mClientProgress * 0.8f, 0f, 0.8f) + constrain(mInternalProgress * 0.2f, 0f, 0.2f); // Only publish when meaningful change if (forcePublish || Math.abs(mProgress - mReportedProgress) >= 0.01) { mReportedProgress = mProgress; mCallback.onSessionProgressChanged(this, mProgress); } }
@Override public void close() throws RemoteException { if (mActiveCount.decrementAndGet() == 0) { mCallback.onSessionActiveChanged(this, false); } }
private void dispatchSessionFinished(int returnCode, String msg, Bundle extras) { mFinalStatus = returnCode; mFinalMessage = msg; if (mRemoteObserver != null) { try { mRemoteObserver.onPackageInstalled(mPackageName, returnCode, msg, extras); } catch (RemoteException ignored) { } } final boolean success = (returnCode == INSTALL_SUCCEEDED); mCallback.onSessionFinished(this, success); }
@Override public void updateSessionAppLabel(int sessionId, String appLabel) throws RemoteException { synchronized (mSessions) { final PackageInstallerSession session = mSessions.get(sessionId); if (session == null || !isCallingUidOwner(session)) { throw new SecurityException("Caller has no access to session " + sessionId); } session.params.appLabel = appLabel; mInternalCallback.onSessionBadgingChanged(session); } }
mCallback.onSessionSealedBlocking(this);
private void dispatchSessionFinished(int returnCode, String msg, Bundle extras) { mFinalStatus = returnCode; mFinalMessage = msg; if (mRemoteObserver != null) { try { mRemoteObserver.onPackageInstalled(mPackageName, returnCode, msg, extras); } catch (RemoteException ignored) { } } final boolean success = (returnCode == INSTALL_SUCCEEDED); mCallback.onSessionFinished(this, success); }
@Override public void updateSessionAppIcon(int sessionId, Bitmap appIcon) { synchronized (mSessions) { final PackageInstallerSession session = mSessions.get(sessionId); if (session == null || !isCallingUidOwner(session)) { throw new SecurityException("Caller has no access to session " + sessionId); } session.params.appIcon = appIcon; session.params.appIconLastModified = -1; mInternalCallback.onSessionBadgingChanged(session); } }