summaryrefslogtreecommitdiffstats
path: root/mobile/android/tests/javaaddons/src/org
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-04-23 15:32:23 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-04-23 15:32:23 -0400
commitabe80cc31d5a40ebed743085011fbcda0c1a9a10 (patch)
treefb3762f06b84745b182af281abb107b95a9fcf01 /mobile/android/tests/javaaddons/src/org
parent63295d0087eb58a6eb34cad324c4c53d1b220491 (diff)
downloadUXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.gz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.lz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.xz
UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.zip
Issue #1053 - Drop support Android and remove Fennec - Part 1a: Remove mobile/android
Diffstat (limited to 'mobile/android/tests/javaaddons/src/org')
-rw-r--r--mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java11
-rw-r--r--mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV0.java24
-rw-r--r--mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV1.java59
3 files changed, 0 insertions, 94 deletions
diff --git a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java b/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java
deleted file mode 100644
index 93bf5e7cd..000000000
--- a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/ClassWithNoRecognizedConstructors.java
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.javaaddons.test;
-
-public class ClassWithNoRecognizedConstructors {
- public ClassWithNoRecognizedConstructors(int a, String b, boolean c) {
- }
-}
diff --git a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV0.java b/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV0.java
deleted file mode 100644
index f0ea79535..000000000
--- a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV0.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.javaaddons.test;
-
-import android.os.Handler;
-import android.os.Message;
-import android.util.Log;
-
-import java.util.Map;
-
-public class JavaAddonV0 implements Handler.Callback {
- public JavaAddonV0(Map<String, Handler.Callback> callbacks) {
- callbacks.put("JavaAddon:V0", this);
- }
-
- @Override
- public boolean handleMessage(Message message) {
- Log.i("JavaAddon", "handleMessage " + message.toString());
- return true;
- }
-}
diff --git a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV1.java b/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV1.java
deleted file mode 100644
index 803a0d740..000000000
--- a/mobile/android/tests/javaaddons/src/org/mozilla/javaaddons/test/JavaAddonV1.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.javaaddons.test;
-
-import android.content.Context;
-import android.util.Log;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.mozilla.javaaddons.JavaAddonInterfaceV1.EventCallback;
-import org.mozilla.javaaddons.JavaAddonInterfaceV1.EventDispatcher;
-import org.mozilla.javaaddons.JavaAddonInterfaceV1.EventListener;
-import org.mozilla.javaaddons.JavaAddonInterfaceV1.RequestCallback;
-
-public class JavaAddonV1 implements EventListener, RequestCallback {
- protected final EventDispatcher mDispatcher;
-
- public JavaAddonV1(Context context, EventDispatcher dispatcher) {
- mDispatcher = dispatcher;
- mDispatcher.registerEventListener(this, "JavaAddon:V1");
- }
-
- @Override
- public void handleMessage(Context context, String event, JSONObject message, EventCallback callback) {
- Log.i("JavaAddon", "handleMessage: " + event + ", " + message.toString());
- final JSONObject output = new JSONObject();
- try {
- output.put("outputStringKey", "inputStringKey=" + message.getString("inputStringKey"));
- output.put("outputIntKey", 1 + message.getInt("inputIntKey"));
- } catch (JSONException e) {
- // Should never happen; ignore.
- }
- // Respond.
- if (callback != null) {
- callback.sendSuccess(output);
- }
-
- // And send an independent Gecko event.
- final JSONObject input = new JSONObject();
- try {
- input.put("inputStringKey", "raw");
- input.put("inputIntKey", 3);
- } catch (JSONException e) {
- // Should never happen; ignore.
- }
- mDispatcher.sendRequestToGecko("JavaAddon:V1:Request", input, this);
- }
-
- @Override
- public void onResponse(Context context, JSONObject jsonObject) {
- Log.i("JavaAddon", "onResponse: " + jsonObject.toString());
- // Unregister event listener, so that the JavaScript side can send a test message and
- // check it is not handled.
- mDispatcher.unregisterEventListener(this);
- mDispatcher.sendRequestToGecko("JavaAddon:V1:VerificationRequest", jsonObject, null);
- }
-}