mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
move callback interfaces to corresponding async tasks
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
package org.thoughtcrime.securesms.map;
|
||||
|
||||
/**
|
||||
* Created by cyberta on 18.04.19.
|
||||
*/
|
||||
|
||||
public interface DataCollectionCallback {
|
||||
void onDataCollectionFinished();
|
||||
}
|
||||
@@ -22,6 +22,10 @@ import static org.thoughtcrime.securesms.map.MapDataManager.TIME_FRAME;
|
||||
|
||||
public class DataCollectionTask extends AsyncTask<Void, Void, Void> {
|
||||
|
||||
public interface DataCollectionCallback {
|
||||
void onDataCollectionFinished();
|
||||
}
|
||||
|
||||
private static final String TAG = DataCollectionTask.class.getSimpleName();
|
||||
private static final HashSet<DataCollectionTask> instances = new HashSet<>();
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package org.thoughtcrime.securesms.map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* Created by cyberta on 13.03.19.
|
||||
*/
|
||||
|
||||
public interface GenerateInfoWindowCallback {
|
||||
Context getContext();
|
||||
|
||||
/**
|
||||
* Invoked when the bitmaps have been generated from a view.
|
||||
*/
|
||||
void setInfoWindowResults(Bitmap result);
|
||||
}
|
||||
@@ -4,6 +4,7 @@ package org.thoughtcrime.securesms.map;
|
||||
* Created by cyberta on 13.03.19.
|
||||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
@@ -48,6 +49,15 @@ import static org.thoughtcrime.securesms.map.MapDataManager.TIMESTAMP;
|
||||
*/
|
||||
class GenerateInfoWindowTask extends AsyncTask<Feature, Bitmap, Bitmap> {
|
||||
|
||||
public interface GenerateInfoWindowCallback {
|
||||
Context getContext();
|
||||
|
||||
/**
|
||||
* Invoked when the bitmaps have been generated from a view.
|
||||
*/
|
||||
void setInfoWindowResults(Bitmap result);
|
||||
}
|
||||
|
||||
private static final String TAG = GenerateInfoWindowCallback.class.getName();
|
||||
private final WeakReference<GenerateInfoWindowCallback> callbackRef;
|
||||
private final static HashSet<GenerateInfoWindowTask> instances = new HashSet<>();
|
||||
|
||||
@@ -29,6 +29,8 @@ import com.mapbox.mapboxsdk.style.sources.GeoJsonSource;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.connect.ApplicationDcContext;
|
||||
import org.thoughtcrime.securesms.connect.DcHelper;
|
||||
import org.thoughtcrime.securesms.map.DataCollectionTask.DataCollectionCallback;
|
||||
import org.thoughtcrime.securesms.map.GenerateInfoWindowTask.GenerateInfoWindowCallback;
|
||||
import org.thoughtcrime.securesms.map.model.FilterProvider;
|
||||
import org.thoughtcrime.securesms.map.model.MapSource;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user