Bug 1189995 - Move GeckoAppShell.pumpMessageLoop to GeckoThread; r=esawin
This method is used by Gecko to pump the Android message loop, and it's also more suited to GeckoThread than GeckoAppShell.
This commit is contained in:
@@ -96,7 +96,6 @@ import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.MessageQueue;
|
||||
import android.os.SystemClock;
|
||||
import android.os.Vibrator;
|
||||
@@ -2451,24 +2450,6 @@ public class GeckoAppShell
|
||||
GeckoScreenOrientation.getInstance().unlock();
|
||||
}
|
||||
|
||||
@WrapForJNI
|
||||
public static boolean pumpMessageLoop(final Message msg) {
|
||||
final Handler geckoHandler = ThreadUtils.sGeckoHandler;
|
||||
|
||||
if (msg.obj == geckoHandler && msg.getTarget() == geckoHandler) {
|
||||
// Our "queue is empty" message; see runGecko()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (msg.getTarget() == null) {
|
||||
Looper.myLooper().quit();
|
||||
} else {
|
||||
msg.getTarget().dispatchMessage(msg);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@WrapForJNI
|
||||
public static void notifyWakeLockChanged(String topic, String state) {
|
||||
if (getGeckoInterface() != null)
|
||||
|
||||
Reference in New Issue
Block a user