OSDN Git Service

let ProcessingServiceManager report if the service is running
authorCarlos Hernandez <chernand@google.com>
Mon, 24 Mar 2014 20:38:17 +0000 (13:38 -0700)
committerCarlos Hernandez <chernand@google.com>
Mon, 24 Mar 2014 20:38:17 +0000 (13:38 -0700)
Change-Id: Ib706f2446baa12d2b70ff5c5b3d5637214006340

src/com/android/camera/processing/ProcessingService.java
src/com/android/camera/processing/ProcessingServiceManager.java

index cf8ab17..23c40fb 100644 (file)
@@ -125,7 +125,7 @@ public class ProcessingService extends Service implements ProgressListener {
 
         // Tell the manager that we're shutting down, so in case new tasks are
         // enqueued, we a new service needs to be started.
-        mProcessingServiceManager.notifyStitchingFinished();
+        mProcessingServiceManager.notifyServiceFinished();
 
         // TODO: Cancel session in progress...
 
index c4a0fa0..ca2ad97 100644 (file)
@@ -104,9 +104,16 @@ public class ProcessingServiceManager {
     }
 
     /**
+     * @return Whether the service is currently running.
+     */
+    public synchronized boolean isServiceRunning() {
+        return mServiceRunning;
+    }
+
+    /**
      * Called by the processing service, notifying us that it has finished.
      */
-    public synchronized void notifyStitchingFinished() {
+    public synchronized void notifyServiceFinished() {
         this.mServiceRunning = false;
     }
 }