mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 778468 - Part 1: Move ActivityResultHandler to org.mozilla.gecko.util package. r=mfinkle
--HG-- extra : rebase_source : 2e367de82c0d129f2e469da825d49fd41dd6e19b
This commit is contained in:
parent
c72c06520a
commit
1fa3b14de9
@ -4,6 +4,9 @@
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.util.ActivityResultHandler;
|
||||
import org.mozilla.gecko.util.ActivityResultHandlerMap;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
* 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.gecko;
|
||||
package org.mozilla.gecko.util;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
interface ActivityResultHandler {
|
||||
public void onActivityResult(int resultCode, Intent data);
|
||||
public interface ActivityResultHandler {
|
||||
void onActivityResult(int resultCode, Intent data);
|
||||
}
|
||||
|
@ -2,21 +2,21 @@
|
||||
* 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.gecko;
|
||||
package org.mozilla.gecko.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
class ActivityResultHandlerMap {
|
||||
public final class ActivityResultHandlerMap {
|
||||
private Map<Integer, ActivityResultHandler> mMap = new HashMap<Integer, ActivityResultHandler>();
|
||||
private int mCounter = 0;
|
||||
|
||||
synchronized int put(ActivityResultHandler handler) {
|
||||
public synchronized int put(ActivityResultHandler handler) {
|
||||
mMap.put(mCounter, handler);
|
||||
return mCounter++;
|
||||
}
|
||||
|
||||
synchronized ActivityResultHandler getAndRemove(int i) {
|
||||
public synchronized ActivityResultHandler getAndRemove(int i) {
|
||||
return mMap.remove(i);
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.util.ActivityResultHandler;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
class AwesomebarResultHandler implements ActivityResultHandler {
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.util.ActivityResultHandler;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Environment;
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.util.ActivityResultHandler;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.util.ActivityResultHandler;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Intent;
|
||||
|
@ -21,6 +21,8 @@ MOZGLUE_JAVA_FILES := \
|
||||
$(NULL)
|
||||
|
||||
UTIL_JAVA_FILES := \
|
||||
ActivityResultHandler.java \
|
||||
ActivityResultHandlerMap.java \
|
||||
util/FloatUtils.java \
|
||||
$(NULL)
|
||||
|
||||
@ -28,8 +30,6 @@ FENNEC_JAVA_FILES = \
|
||||
AboutHomeContent.java \
|
||||
AboutHomeSection.java \
|
||||
ActivityHandlerHelper.java \
|
||||
ActivityResultHandler.java \
|
||||
ActivityResultHandlerMap.java \
|
||||
AndroidImport.java \
|
||||
AndroidImportPreference.java \
|
||||
AlertNotification.java \
|
||||
|
Loading…
Reference in New Issue
Block a user