OSDN Git Service

[DO NOT MERGE] Use new QueuedWork interface.
authorPhilip P. Moltmann <moltmann@google.com>
Mon, 12 Dec 2016 23:29:55 +0000 (15:29 -0800)
committerSvetoslav Ganov <svetoslavganov@google.com>
Tue, 31 Jan 2017 02:51:04 +0000 (02:51 +0000)
Test: Ran SharedPreferences CTS tests

Bug: 33385963
Bug: 30662828

Change-Id: I8025a087b43462324d0d45555094cbb54a671404
(cherry picked from commit 231c9fbfa68d54ce44fad36df0701d4fd566a5aa)

src/com/android/settings/RadioInfo.java
src/com/android/settings/bluetooth/LocalBluetoothPreferences.java

index 65a784a..2e3b494 100644 (file)
@@ -1171,7 +1171,7 @@ public class RadioInfo extends Activity {
 
     void setImsConfigProvisionedState(int configItem, boolean state) {
         if (phone != null && mImsManager != null) {
-            QueuedWork.singleThreadExecutor().submit(new Runnable() {
+            QueuedWork.queue(new Runnable() {
                 public void run() {
                     try {
                         mImsManager.getConfigInterface().setProvisionedValue(
@@ -1181,7 +1181,7 @@ public class RadioInfo extends Activity {
                         Log.e(TAG, "setImsConfigProvisioned() exception:", e);
                     }
                 }
-            });
+            }, false);
         }
     }
 
index 401b13c..6150920 100644 (file)
@@ -150,7 +150,7 @@ final class LocalBluetoothPreferences {
     static void persistDiscoveringTimestamp(final Context context) {
         // Load the shared preferences and edit it on a background
         // thread (but serialized!).
-        QueuedWork.singleThreadExecutor().submit(new Runnable() {
+        QueuedWork.queue(new Runnable() {
                 public void run() {
                     SharedPreferences.Editor editor = getSharedPreferences(context).edit();
                     editor.putLong(
@@ -158,7 +158,7 @@ final class LocalBluetoothPreferences {
                         System.currentTimeMillis());
                     editor.apply();
                 }
-            });
+            }, false);
     }
 
     static boolean hasDockAutoConnectSetting(Context context, String addr) {