Use new QueuedWork interface.

Test: Ran SharedPreferences CTS tests
Bug: 33385963
Change-Id: I8025a087b43462324d0d45555094cbb54a671404
This commit is contained in:
Philip P. Moltmann
2016-12-12 15:29:55 -08:00
parent af71eb20c8
commit 231c9fbfa6
2 changed files with 4 additions and 4 deletions

View File

@@ -1164,7 +1164,7 @@ public class RadioInfo extends Activity {
void setImsConfigProvisionedState(int configItem, boolean state) { void setImsConfigProvisionedState(int configItem, boolean state) {
if (phone != null && mImsManager != null) { if (phone != null && mImsManager != null) {
QueuedWork.singleThreadExecutor().submit(new Runnable() { QueuedWork.queue(new Runnable() {
public void run() { public void run() {
try { try {
mImsManager.getConfigInterface().setProvisionedValue( mImsManager.getConfigInterface().setProvisionedValue(
@@ -1174,7 +1174,7 @@ public class RadioInfo extends Activity {
Log.e(TAG, "setImsConfigProvisioned() exception:", e); Log.e(TAG, "setImsConfigProvisioned() exception:", e);
} }
} }
}); }, false);
} }
} }

View File

@@ -150,7 +150,7 @@ final class LocalBluetoothPreferences {
static void persistDiscoveringTimestamp(final Context context) { static void persistDiscoveringTimestamp(final Context context) {
// Load the shared preferences and edit it on a background // Load the shared preferences and edit it on a background
// thread (but serialized!). // thread (but serialized!).
QueuedWork.singleThreadExecutor().submit(new Runnable() { QueuedWork.queue(new Runnable() {
public void run() { public void run() {
SharedPreferences.Editor editor = getSharedPreferences(context).edit(); SharedPreferences.Editor editor = getSharedPreferences(context).edit();
editor.putLong( editor.putLong(
@@ -158,7 +158,7 @@ final class LocalBluetoothPreferences {
System.currentTimeMillis()); System.currentTimeMillis());
editor.apply(); editor.apply();
} }
}); }, false);
} }
static boolean hasDockAutoConnectSetting(Context context, String addr) { static boolean hasDockAutoConnectSetting(Context context, String addr) {