зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1505897 - Initialize GeckoSystemStateListener in child process r=agi
Differential Revision: https://phabricator.services.mozilla.com/D11517 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9eb98a2ec0
Коммит
4431298c45
|
@ -11,6 +11,7 @@ import android.database.ContentObserver;
|
|||
import android.hardware.input.InputManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
|
@ -48,7 +49,7 @@ public class GeckoSystemStateListener
|
|||
sApplicationContext = context;
|
||||
ContentResolver contentResolver = sApplicationContext.getContentResolver();
|
||||
Uri animationSetting = Settings.System.getUriFor(Settings.Global.ANIMATOR_DURATION_SCALE);
|
||||
mContentObserver = new ContentObserver(new Handler()) {
|
||||
mContentObserver = new ContentObserver(new Handler(Looper.getMainLooper())) {
|
||||
@Override
|
||||
public void onChange(boolean selfChange) {
|
||||
onDeviceChanged();
|
||||
|
|
|
@ -282,6 +282,8 @@ public class GeckoThread extends Thread {
|
|||
res.updateConfiguration(config, null);
|
||||
}
|
||||
|
||||
GeckoSystemStateListener.getInstance().initialize(context);
|
||||
|
||||
final String resourcePath = context.getPackageResourcePath();
|
||||
|
||||
try {
|
||||
|
|
|
@ -232,8 +232,6 @@ public final class GeckoRuntime implements Parcelable {
|
|||
|
||||
// Initialize the system ClipboardManager by accessing it on the main thread.
|
||||
GeckoAppShell.getApplicationContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
|
||||
GeckoSystemStateListener.getInstance().initialize(context);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -412,6 +412,7 @@ nsAppShell::nsAppShell()
|
|||
if (jni::IsAvailable()) {
|
||||
GeckoThreadSupport::Init();
|
||||
GeckoAppShellSupport::Init();
|
||||
mozilla::GeckoSystemStateListener::Init();
|
||||
mozilla::widget::Telemetry::Init();
|
||||
|
||||
// Set the corresponding state in GeckoThread.
|
||||
|
|
Загрузка…
Ссылка в новой задаче