forked from organicmaps/organicmaps
[android] Proper up navigation from docked auth fragment.
This commit is contained in:
parent
d1ec2617f9
commit
d748bc70db
2 changed files with 10 additions and 4 deletions
android/src/com/mapswithme
|
@ -41,6 +41,7 @@ import com.mapswithme.maps.downloader.DownloaderActivity;
|
|||
import com.mapswithme.maps.downloader.DownloaderFragment;
|
||||
import com.mapswithme.maps.downloader.MapManager;
|
||||
import com.mapswithme.maps.downloader.OnmapDownloader;
|
||||
import com.mapswithme.maps.editor.AuthFragment;
|
||||
import com.mapswithme.maps.editor.EditorActivity;
|
||||
import com.mapswithme.maps.editor.EditorHostFragment;
|
||||
import com.mapswithme.maps.location.LocationHelper;
|
||||
|
@ -99,7 +100,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
private static final String[] DOCKED_FRAGMENTS = { SearchFragment.class.getName(),
|
||||
DownloaderFragment.class.getName(),
|
||||
RoutingPlanFragment.class.getName(),
|
||||
EditorHostFragment.class.getName() };
|
||||
EditorHostFragment.class.getName(),
|
||||
AuthFragment.class.getName() };
|
||||
// Instance state
|
||||
private static final String STATE_PP_OPENED = "PpOpened";
|
||||
private static final String STATE_MAP_OBJECT = "MapObject";
|
||||
|
@ -110,11 +112,9 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
|
||||
private View mMapFrame;
|
||||
|
||||
// map
|
||||
private MapFragment mMapFragment;
|
||||
// Place page
|
||||
private PlacePageView mPlacePage;
|
||||
// Routing
|
||||
|
||||
private RoutingPlanInplaceController mRoutingPlanInplaceController;
|
||||
private NavigationController mNavigationController;
|
||||
|
||||
|
|
|
@ -325,6 +325,12 @@ public class Utils
|
|||
|
||||
public static void navigateToParent(@NonNull Activity activity, @NonNull Bundle extras)
|
||||
{
|
||||
if (activity instanceof CustomNavigateUpListener)
|
||||
{
|
||||
((CustomNavigateUpListener) activity).customOnNavigateUp();
|
||||
return;
|
||||
}
|
||||
|
||||
final Intent intent = NavUtils.getParentActivityIntent(activity);
|
||||
intent.putExtras(extras);
|
||||
NavUtils.navigateUpTo(activity, intent);
|
||||
|
|
Loading…
Add table
Reference in a new issue