OSDN Git Service

Remove a TODO associate with starting a thread
authorNeil Fuller <nfuller@google.com>
Tue, 18 Jul 2017 13:02:01 +0000 (14:02 +0100)
committerNeil Fuller <nfuller@google.com>
Tue, 18 Jul 2017 13:02:01 +0000 (14:02 +0100)
Switching to an alternative method to run something off
thread.

Bug: 31008728
Test: Internal automated testing / manual tests
Change-Id: Ia33ca29e8d83028a21af1dca22de75dd43eee119

services/core/java/com/android/server/timezone/RulesManagerServiceHelperImpl.java

index 767f0e0..b89ce1c 100644 (file)
@@ -18,6 +18,7 @@ package com.android.server.timezone;
 
 import android.content.Context;
 import android.content.pm.PackageManager;
+import android.os.AsyncTask;
 import android.os.Binder;
 import android.os.ParcelFileDescriptor;
 
@@ -56,10 +57,9 @@ final class RulesManagerServiceHelperImpl implements PermissionHelper, Executor
         return true;
     }
 
-    // TODO Wake lock required?
+    // TODO(nfuller): Wake lock required while running in background thread?
     @Override
     public void execute(Runnable runnable) {
-        // TODO Is there a better way?
-        new Thread(runnable).start();
+        AsyncTask.execute(runnable);
     }
 }