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(); }
private void handleActivityStopped() { Log.w("KeyCachingService", "Decrementing activity count..."); activitiesRunning--; startTimeoutIfAppropriate(); }