コード例 #1
0
  public synchronized void setMasterSecret(final MasterSecret masterSecret) {
    this.masterSecret = masterSecret;

    foregroundService();
    broadcastNewSecret();
    startTimeoutIfAppropriate();

    new Thread() {
      @Override
      public void run() {
        if (!DatabaseUpgradeActivity.isUpdate(KeyCachingService.this)) {
          DecryptingQueue.schedulePendingDecrypts(KeyCachingService.this, masterSecret);
          MessageNotifier.updateNotification(KeyCachingService.this, masterSecret);
        }
      }
    }.start();
  }
コード例 #2
0
  private void handleActivityStopped() {
    Log.w("KeyCachingService", "Decrementing activity count...");

    activitiesRunning--;
    startTimeoutIfAppropriate();
  }