[android] Added Savalbe interface and moved Detachable interface to base package

This commit is contained in:
Александр Зацепин 2018-11-15 20:21:32 +03:00 committed by yoksnod
parent 8494933467
commit d3d34c186d
6 changed files with 14 additions and 5 deletions

View file

@ -1,4 +1,4 @@
package com.mapswithme.maps.dialog;
package com.mapswithme.maps.base;
import android.support.annotation.NonNull;

View file

@ -0,0 +1,9 @@
package com.mapswithme.maps.base;
import android.support.annotation.NonNull;
public interface Savable<T>
{
void onSave(@NonNull T outState);
void onRestore(@NonNull T inState);
}

View file

@ -3,7 +3,7 @@ package com.mapswithme.maps.bookmarks;
import android.support.annotation.NonNull;
import android.support.v4.app.FragmentActivity;
import com.mapswithme.maps.dialog.Detachable;
import com.mapswithme.maps.base.Detachable;
import java.net.MalformedURLException;

View file

@ -13,7 +13,7 @@ import com.mapswithme.maps.background.AbstractLogBroadcastReceiver;
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
import com.mapswithme.maps.bookmarks.data.Error;
import com.mapswithme.maps.bookmarks.data.Result;
import com.mapswithme.maps.dialog.Detachable;
import com.mapswithme.maps.base.Detachable;
public class BookmarkDownloadReceiver extends AbstractLogBroadcastReceiver implements Detachable<BookmarkDownloadHandler>
{

View file

@ -15,8 +15,8 @@ import com.mapswithme.maps.PrivateVariables;
import com.mapswithme.maps.R;
import com.mapswithme.maps.base.BaseMwmFragment;
import com.mapswithme.maps.bookmarks.data.PaymentData;
import com.mapswithme.maps.dialog.Detachable;
import com.mapswithme.maps.dialog.ProgressDialogFragment;
import com.mapswithme.maps.base.Detachable;
import com.mapswithme.util.log.Logger;
import com.mapswithme.util.log.LoggerFactory;

View file

@ -3,7 +3,7 @@ package com.mapswithme.maps.purchase;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.mapswithme.maps.dialog.Detachable;
import com.mapswithme.maps.base.Detachable;
abstract class StatefulPurchaseCallback<State, UiObject extends PurchaseStateActivator<State>>
implements Detachable<UiObject>