コード例 #1
0
 @Override
 public void onProgressChanged(int sessionId, float progress) {
   SessionInfo session = mInstaller.getSessionInfo(sessionId);
   if (session != null) {
     mPendingReplays.put(sessionId, session);
     replayUpdates(null);
   }
 }
コード例 #2
0
 private void pushSessionBadgeToLauncher(int sessionId) {
   SessionInfo session = mInstaller.getSessionInfo(sessionId);
   if (session != null) {
     addSessionInfoToCahce(session, UserHandleCompat.myUserHandle());
     if (session.getAppPackageName() != null) {
       mPendingBadgeUpdates.add(session.getAppPackageName());
     }
     mPendingReplays.put(sessionId, session);
     replayUpdates(null);
   }
 }
コード例 #3
0
 @Override
 public void onFinished(int sessionId, boolean success) {
   mPendingReplays.remove(sessionId);
   SessionInfo session = mInstaller.getSessionInfo(sessionId);
   if ((session != null) && (session.getAppPackageName() != null)) {
     mPendingBadgeUpdates.remove(session.getAppPackageName());
     // Replay all updates with a one time update for this installed package. No
     // need to store this record for future updates, as the app list will get
     // refreshed on resume.
     replayUpdates(
         new PackageInstallInfo(
             session.getAppPackageName(), success ? STATUS_INSTALLED : STATUS_FAILED, 0));
   }
 }