diff --git a/src/api-impl/android/app/SharedPreferencesImpl.java b/src/api-impl/android/app/SharedPreferencesImpl.java index f54231c5..2560155d 100644 --- a/src/api-impl/android/app/SharedPreferencesImpl.java +++ b/src/api-impl/android/app/SharedPreferencesImpl.java @@ -365,7 +365,8 @@ public final class SharedPreferencesImpl implements SharedPreferences { }; // QueuedWork.add(awaitCommit); - awaitCommit.run(); +// since we've made this synchronous, we can't exactly start "waiting" for the commit before we made the commit +// awaitCommit.run(); Runnable postWriteRunnable = new Runnable() { public void run() { diff --git a/src/api-impl/android/os/Handler.java b/src/api-impl/android/os/Handler.java index a2395bd6..3dfe731d 100644 --- a/src/api-impl/android/os/Handler.java +++ b/src/api-impl/android/os/Handler.java @@ -595,7 +595,21 @@ public class Handler { return false; } return enqueueMessage(queue, msg, uptimeMillis);*/ - return true; + if(mCallback != null) { +// System.out.println("Handler.sendMessageAtTime: directly calling mCallback.handleMessage)"); + if(msg.callback != null) { + msg.callback.run(); + } + return mCallback.handleMessage(msg); + } else { +// System.out.println("Handler.sendMessageAtTime: not directly calling mCallback.handleMessage - mCallback is null)"); +/* do this in this case as well? + if(msg.callback != null) { + msg.callback.run(); + } +*/ + return true; // false? + } } /** diff --git a/src/api-impl/android/os/Looper.java b/src/api-impl/android/os/Looper.java index 99b0c4aa..88bd9be5 100644 --- a/src/api-impl/android/os/Looper.java +++ b/src/api-impl/android/os/Looper.java @@ -114,8 +114,9 @@ public final class Looper { * Run the message queue in this thread. Be sure to call * {@link #quit()} to end the loop. */ - public static void loop() {/* - final Looper me = myLooper(); + public static void loop() { + System.out.println("oops, Looper.loop called... and we don't implement that"); + /*final Looper me = myLooper(); if (me == null) { throw new RuntimeException("No Looper; Looper.prepare() wasn't called on this thread."); }