gecko-dev/mobile/android/base/util/ActivityResultHandlerMap.java
Kartikaya Gupta ef2c6a1e5d Bug 851060 - Move util files into the util/ folder. r=cpeterson
--HG--
rename : mobile/android/base/ActivityResultHandler.java => mobile/android/base/util/ActivityResultHandler.java
rename : mobile/android/base/ActivityResultHandlerMap.java => mobile/android/base/util/ActivityResultHandlerMap.java
rename : mobile/android/base/GeckoBackgroundThread.java => mobile/android/base/util/GeckoBackgroundThread.java
rename : mobile/android/base/GeckoEventListener.java => mobile/android/base/util/GeckoEventListener.java
rename : mobile/android/base/GeckoEventResponder.java => mobile/android/base/util/GeckoEventResponder.java
rename : mobile/android/base/GeckoJarReader.java => mobile/android/base/util/GeckoJarReader.java
rename : mobile/android/base/INIParser.java => mobile/android/base/util/INIParser.java
rename : mobile/android/base/INISection.java => mobile/android/base/util/INISection.java
rename : mobile/android/base/UiAsyncTask.java => mobile/android/base/util/UiAsyncTask.java
2013-03-15 11:40:03 +01:00

23 lines
710 B
Java

/* 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.gecko.util;
import java.util.HashMap;
import java.util.Map;
public final class ActivityResultHandlerMap {
private Map<Integer, ActivityResultHandler> mMap = new HashMap<Integer, ActivityResultHandler>();
private int mCounter = 0;
public synchronized int put(ActivityResultHandler handler) {
mMap.put(mCounter, handler);
return mCounter++;
}
public synchronized ActivityResultHandler getAndRemove(int i) {
return mMap.remove(i);
}
}