diff --git a/mobile/android/base/GeckoEvent.java b/mobile/android/base/GeckoEvent.java index 9105ac30b26..e8de7251a8d 100644 --- a/mobile/android/base/GeckoEvent.java +++ b/mobile/android/base/GeckoEvent.java @@ -97,9 +97,6 @@ public class GeckoEvent { LOW_MEMORY(35), NETWORK_LINK_CHANGE(36), TELEMETRY_HISTOGRAM_ADD(37), - PREFERENCES_OBSERVE(39), - PREFERENCES_GET(40), - PREFERENCES_REMOVE_OBSERVERS(41), TELEMETRY_UI_SESSION_START(42), TELEMETRY_UI_SESSION_STOP(43), TELEMETRY_UI_EVENT(44), @@ -225,8 +222,6 @@ public class GeckoEvent { private float mGamepadButtonValue; private float[] mGamepadValues; - private String[] mPrefNames; - private Object mObject; private GeckoEvent(NativeGeckoEvent event) { @@ -767,29 +762,6 @@ public class GeckoEvent { return event; } - @RobocopTarget - public static GeckoEvent createPreferencesObserveEvent(int requestId, String[] prefNames) { - GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.PREFERENCES_OBSERVE); - event.mCount = requestId; - event.mPrefNames = prefNames; - return event; - } - - @RobocopTarget - public static GeckoEvent createPreferencesGetEvent(int requestId, String[] prefNames) { - GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.PREFERENCES_GET); - event.mCount = requestId; - event.mPrefNames = prefNames; - return event; - } - - @RobocopTarget - public static GeckoEvent createPreferencesRemoveObserversEvent(int requestId) { - GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.PREFERENCES_REMOVE_OBSERVERS); - event.mCount = requestId; - return event; - } - public static GeckoEvent createLowMemoryEvent(int level) { GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.LOW_MEMORY); event.mMetaState = level; diff --git a/widget/android/AndroidJavaWrappers.cpp b/widget/android/AndroidJavaWrappers.cpp index 7e61af07610..91b07d54b55 100644 --- a/widget/android/AndroidJavaWrappers.cpp +++ b/widget/android/AndroidJavaWrappers.cpp @@ -70,7 +70,6 @@ jfieldID AndroidGeckoEvent::jGamepadButtonField = 0; jfieldID AndroidGeckoEvent::jGamepadButtonPressedField = 0; jfieldID AndroidGeckoEvent::jGamepadButtonValueField = 0; jfieldID AndroidGeckoEvent::jGamepadValuesField = 0; -jfieldID AndroidGeckoEvent::jPrefNamesField = 0; jfieldID AndroidGeckoEvent::jObjectField = 0; jclass AndroidPoint::jPointClass = 0; @@ -179,7 +178,6 @@ AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv) jGamepadButtonPressedField = geckoEvent.getField("mGamepadButtonPressed", "Z"); jGamepadButtonValueField = geckoEvent.getField("mGamepadButtonValue", "F"); jGamepadValuesField = geckoEvent.getField("mGamepadValues", "[F"); - jPrefNamesField = geckoEvent.getField("mPrefNames", "[Ljava/lang/String;"); jObjectField = geckoEvent.getField("mObject", "Ljava/lang/Object;"); } @@ -609,18 +607,6 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj) break; } - case PREFERENCES_OBSERVE: - case PREFERENCES_GET: { - ReadStringArray(mPrefNames, jenv, jPrefNamesField); - mCount = jenv->GetIntField(jobj, jCountField); - break; - } - - case PREFERENCES_REMOVE_OBSERVERS: { - mCount = jenv->GetIntField(jobj, jCountField); - break; - } - default: break; } diff --git a/widget/android/AndroidJavaWrappers.h b/widget/android/AndroidJavaWrappers.h index e94ee830a85..a84f6a27e24 100644 --- a/widget/android/AndroidJavaWrappers.h +++ b/widget/android/AndroidJavaWrappers.h @@ -524,7 +524,6 @@ public: const nsTArray& ToolTypes() { return mToolTypes; } const nsTArray& Orientations() { return mOrientations; } const nsTArray& PointRadii() { return mPointRadii; } - const nsTArray& PrefNames() { return mPrefNames; } double X() { return mX; } double Y() { return mY; } double Z() { return mZ; } @@ -621,7 +620,6 @@ protected: float mGamepadButtonValue; nsTArray mGamepadValues; nsCOMPtr mObserver; - nsTArray mPrefNames; MultiTouchInput mApzInput; mozilla::layers::ScrollableLayerGuid mApzGuid; uint64_t mApzInputBlockId; @@ -691,7 +689,6 @@ protected: static jfieldID jRangeBackColorField; static jfieldID jRangeLineColorField; static jfieldID jLocationField; - static jfieldID jPrefNamesField; static jfieldID jConnectionTypeField; static jfieldID jIsWifiField; @@ -745,9 +742,6 @@ public: NETWORK_LINK_CHANGE = 36, TELEMETRY_HISTOGRAM_ADD = 37, ADD_OBSERVER = 38, - PREFERENCES_OBSERVE = 39, - PREFERENCES_GET = 40, - PREFERENCES_REMOVE_OBSERVERS = 41, TELEMETRY_UI_SESSION_START = 42, TELEMETRY_UI_SESSION_STOP = 43, TELEMETRY_UI_EVENT = 44, diff --git a/widget/android/nsAppShell.cpp b/widget/android/nsAppShell.cpp index ae1f9f883fd..0e5dfa7fcf5 100644 --- a/widget/android/nsAppShell.cpp +++ b/widget/android/nsAppShell.cpp @@ -717,27 +717,6 @@ nsAppShell::LegacyGeckoEvent::Run() nsAppShell::gAppShell->AddObserver(curEvent->Characters(), curEvent->Observer()); break; - case AndroidGeckoEvent::PREFERENCES_GET: - case AndroidGeckoEvent::PREFERENCES_OBSERVE: { - const nsTArray &prefNames = curEvent->PrefNames(); - size_t count = prefNames.Length(); - nsAutoArrayPtr prefNamePtrs(new const char16_t*[count]); - for (size_t i = 0; i < count; ++i) { - prefNamePtrs[i] = prefNames[i].get(); - } - - if (curEvent->Type() == AndroidGeckoEvent::PREFERENCES_GET) { - nsAppShell::gAppShell->mBrowserApp->GetPreferences(curEvent->RequestId(), prefNamePtrs, count); - } else { - nsAppShell::gAppShell->mBrowserApp->ObservePreferences(curEvent->RequestId(), prefNamePtrs, count); - } - break; - } - - case AndroidGeckoEvent::PREFERENCES_REMOVE_OBSERVERS: - nsAppShell::gAppShell->mBrowserApp->RemovePreferenceObservers(curEvent->RequestId()); - break; - case AndroidGeckoEvent::LOW_MEMORY: // TODO hook in memory-reduction stuff for different levels here if (curEvent->MetaState() >= AndroidGeckoEvent::MEMORY_PRESSURE_MEDIUM) {