forked from organicmaps/organicmaps
[and] Renamed MWMRequest -> ParsedMwmRequest
This commit is contained in:
parent
326d70fe4c
commit
539a95b89e
6 changed files with 23 additions and 23 deletions
|
@ -27,7 +27,7 @@ import com.mapswithme.maps.MWMActivity.MapTask;
|
|||
import com.mapswithme.maps.MWMActivity.OpenUrlTask;
|
||||
import com.mapswithme.maps.MapStorage.Index;
|
||||
import com.mapswithme.maps.api.Const;
|
||||
import com.mapswithme.maps.api.MWMRequest;
|
||||
import com.mapswithme.maps.api.ParsedMmwRequest;
|
||||
import com.mapswithme.maps.base.MapsWithMeBaseActivity;
|
||||
import com.mapswithme.maps.location.LocationService;
|
||||
import com.mapswithme.maps.state.SuppotedState;
|
||||
|
@ -675,8 +675,8 @@ public class DownloadResourcesActivity extends MapsWithMeBaseActivity
|
|||
final String apiUrl = intent.getStringExtra(Const.EXTRA_URL);
|
||||
if (apiUrl != null)
|
||||
{
|
||||
final MWMRequest request = MWMRequest.extractFromIntent(intent, getApplicationContext());
|
||||
MWMRequest.setCurrentRequest(request);
|
||||
final ParsedMmwRequest request = ParsedMmwRequest.extractFromIntent(intent, getApplicationContext());
|
||||
ParsedMmwRequest.setCurrentRequest(request);
|
||||
Statistics.INSTANCE.trackApiCall(request);
|
||||
getMwmApplication().getAppStateManager().transitionTo(SuppotedState.API_REQUEST);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import android.widget.TextView;
|
|||
import android.widget.Toast;
|
||||
|
||||
import com.mapswithme.maps.Framework.OnBalloonListener;
|
||||
import com.mapswithme.maps.api.MWMRequest;
|
||||
import com.mapswithme.maps.api.ParsedMmwRequest;
|
||||
import com.mapswithme.maps.bookmarks.BookmarkCategoriesActivity;
|
||||
import com.mapswithme.maps.location.LocationService;
|
||||
import com.mapswithme.maps.promo.ActivationSettings;
|
||||
|
@ -802,7 +802,7 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
final LayoutParams mapLp = mMapSurface.getLayoutParams();
|
||||
int marginTopForMap = 0;
|
||||
|
||||
if (state == SuppotedState.API_REQUEST && MWMRequest.hasRequest())
|
||||
if (state == SuppotedState.API_REQUEST && ParsedMmwRequest.hasRequest())
|
||||
{
|
||||
// show title
|
||||
mTitleBar.findViewById(R.id.up_block).setOnClickListener(new OnClickListener()
|
||||
|
@ -814,7 +814,7 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
}
|
||||
});
|
||||
|
||||
final MWMRequest request = MWMRequest.getCurrentRequest();
|
||||
final ParsedMmwRequest request = ParsedMmwRequest.getCurrentRequest();
|
||||
if (request.hasTitle())
|
||||
mAppTitle.setText(request.getTitle());
|
||||
else
|
||||
|
@ -1071,9 +1071,9 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
@Override
|
||||
public void onApiPointActivated(final double lat, final double lon, final String name, final String id)
|
||||
{
|
||||
if (MWMRequest.hasRequest())
|
||||
if (ParsedMmwRequest.hasRequest())
|
||||
{
|
||||
final MWMRequest request = MWMRequest.getCurrentRequest();
|
||||
final ParsedMmwRequest request = ParsedMmwRequest.getCurrentRequest();
|
||||
request.setPointData(lat, lon, name, id);
|
||||
|
||||
if (request.doReturnOnBalloonClick())
|
||||
|
|
|
@ -24,7 +24,7 @@ import android.widget.PopupMenu;
|
|||
import android.widget.PopupMenu.OnMenuItemClickListener;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mapswithme.maps.api.MWMRequest;
|
||||
import com.mapswithme.maps.api.ParsedMmwRequest;
|
||||
import com.mapswithme.maps.bookmarks.BookmarkActivity;
|
||||
import com.mapswithme.maps.bookmarks.data.Bookmark;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
||||
|
@ -103,7 +103,7 @@ public class MapObjectFragment extends Fragment
|
|||
UiUtils.show(mAddToBookmarks);
|
||||
UiUtils.hide(mEditBmk);
|
||||
|
||||
final MWMRequest request = MWMRequest.getCurrentRequest();
|
||||
final ParsedMmwRequest request = ParsedMmwRequest.getCurrentRequest();
|
||||
if (request != null && request.hasPendingIntent())
|
||||
{
|
||||
UiUtils.show(mOpenWith);
|
||||
|
@ -283,7 +283,7 @@ public class MapObjectFragment extends Fragment
|
|||
|
||||
private void onOpenWithClicked()
|
||||
{
|
||||
MWMRequest.getCurrentRequest()
|
||||
ParsedMmwRequest.getCurrentRequest()
|
||||
.sendResponseAndFinish(getActivity(), true);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ import android.graphics.drawable.Drawable;
|
|||
import com.mapswithme.maps.MWMApplication;
|
||||
import com.mapswithme.maps.state.SuppotedState;
|
||||
|
||||
public class MWMRequest
|
||||
public class ParsedMmwRequest
|
||||
{
|
||||
|
||||
private static volatile MWMRequest sCurrentRequest;
|
||||
private static volatile ParsedMmwRequest sCurrentRequest;
|
||||
|
||||
// caller info
|
||||
private ApplicationInfo mCallerInfo;
|
||||
|
@ -37,13 +37,13 @@ public class MWMRequest
|
|||
private String mName;
|
||||
private String mId;
|
||||
|
||||
public static MWMRequest getCurrentRequest() { return sCurrentRequest; }
|
||||
public static ParsedMmwRequest getCurrentRequest() { return sCurrentRequest; }
|
||||
public static boolean hasRequest() { return sCurrentRequest != null; }
|
||||
public static void setCurrentRequest(MWMRequest request) { sCurrentRequest = request; }
|
||||
public static void setCurrentRequest(ParsedMmwRequest request) { sCurrentRequest = request; }
|
||||
|
||||
public static MWMRequest extractFromIntent(Intent data, Context context)
|
||||
public static ParsedMmwRequest extractFromIntent(Intent data, Context context)
|
||||
{
|
||||
final MWMRequest request = new MWMRequest();
|
||||
final ParsedMmwRequest request = new ParsedMmwRequest();
|
||||
|
||||
request.mCallerInfo = data.getParcelableExtra(Const.EXTRA_CALLER_APP_INFO);
|
||||
request.mTitle = data.getStringExtra(Const.EXTRA_TITLE);
|
||||
|
@ -127,7 +127,7 @@ public class MWMRequest
|
|||
}
|
||||
|
||||
/**
|
||||
* Do not use constructor externally. Use {@link MWMRequest#extractFromIntent(Intent, Context)} instead.
|
||||
* Do not use constructor externally. Use {@link ParsedMmwRequest#extractFromIntent(Intent, Context)} instead.
|
||||
*/
|
||||
private MWMRequest() {}
|
||||
private ParsedMmwRequest() {}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package com.mapswithme.maps.state;
|
||||
|
||||
import com.mapswithme.maps.Framework;
|
||||
import com.mapswithme.maps.api.MWMRequest;
|
||||
import com.mapswithme.maps.api.ParsedMmwRequest;
|
||||
|
||||
|
||||
public class AppStateManager
|
||||
|
@ -19,7 +19,7 @@ public class AppStateManager
|
|||
if (state == SuppotedState.DEFAULT_MAP)
|
||||
{
|
||||
Framework.clearApiPoints();
|
||||
MWMRequest.setCurrentRequest(null);
|
||||
ParsedMmwRequest.setCurrentRequest(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import android.content.Context;
|
|||
import android.util.Log;
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.MWMApplication;
|
||||
import com.mapswithme.maps.api.MWMRequest;
|
||||
import com.mapswithme.maps.api.ParsedMmwRequest;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
||||
import com.mapswithme.util.MathUtils;
|
||||
|
||||
|
@ -139,7 +139,7 @@ public enum Statistics
|
|||
getEventBuilder().getSimpleNamedEvent(TAG_PROMO_DE + "promo code activated").post();
|
||||
}
|
||||
|
||||
public void trackApiCall(MWMRequest request)
|
||||
public void trackApiCall(ParsedMmwRequest request)
|
||||
{
|
||||
if (request != null && request.getCallerInfo() != null)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue