forked from organicmaps/organicmaps
[android] Removed obsolete pp state
This commit is contained in:
parent
638a537eb1
commit
dcf5ac9835
3 changed files with 10 additions and 79 deletions
|
@ -6,7 +6,6 @@ import android.app.Dialog;
|
|||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.location.Location;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
@ -247,11 +246,6 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
void onTrackLeftAnimation(float offset);
|
||||
}
|
||||
|
||||
public interface VisibleRectListener
|
||||
{
|
||||
void onVisibleRectChanged(Rect rect);
|
||||
}
|
||||
|
||||
public static Intent createShowMapIntent(@NonNull Context context, @Nullable String countryId)
|
||||
{
|
||||
return new Intent(context, DownloadResourcesLegacyActivity.class)
|
||||
|
|
|
@ -209,6 +209,7 @@ public class PlacePageView extends NestedScrollView
|
|||
@NonNull
|
||||
private View mPopularityView;
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
private UGCController mUgcController;
|
||||
|
||||
|
@ -328,14 +329,6 @@ public class PlacePageView extends NestedScrollView
|
|||
return mScrollable && super.onInterceptTouchEvent(event);
|
||||
}
|
||||
|
||||
public enum State
|
||||
{
|
||||
HIDDEN,
|
||||
PREVIEW,
|
||||
DETAILS,
|
||||
FULLSCREEN
|
||||
}
|
||||
|
||||
public interface SetMapObjectListener
|
||||
{
|
||||
void onSetMapObjectComplete(@NonNull NetworkPolicy policy);
|
||||
|
@ -976,12 +969,6 @@ public class PlacePageView extends NestedScrollView
|
|||
return mIsFloating;
|
||||
}
|
||||
|
||||
public State getState()
|
||||
{
|
||||
// FIXME: adjust this state to the bottom sheet state.
|
||||
return State.HIDDEN;
|
||||
}
|
||||
|
||||
private void clearBookmarkWebView()
|
||||
{
|
||||
mWvBookmarkNote.loadUrl("about:blank");
|
||||
|
@ -1093,18 +1080,6 @@ public class PlacePageView extends NestedScrollView
|
|||
refreshViewsInternal(mMapObject);
|
||||
}
|
||||
|
||||
public void refreshViews()
|
||||
{
|
||||
if (mMapObject == null)
|
||||
{
|
||||
LOGGER.e(TAG, "A place page views cannot be refreshed, mMapObject is null");
|
||||
return;
|
||||
}
|
||||
|
||||
refreshPreview(mMapObject, null);
|
||||
refreshViewsInternal(mMapObject);
|
||||
}
|
||||
|
||||
private void refreshViewsInternal(@NonNull MapObject mapObject)
|
||||
{
|
||||
refreshDetails(mapObject);
|
||||
|
@ -1581,21 +1556,18 @@ public class PlacePageView extends NestedScrollView
|
|||
|
||||
public void refreshAzimuth(double northAzimuth)
|
||||
{
|
||||
if (isHidden() ||
|
||||
mMapObject == null ||
|
||||
MapObject.isOfType(MapObject.MY_POSITION, mMapObject))
|
||||
if (mMapObject == null || MapObject.isOfType(MapObject.MY_POSITION, mMapObject))
|
||||
return;
|
||||
|
||||
final Location location = LocationHelper.INSTANCE.getSavedLocation();
|
||||
if (location == null)
|
||||
return;
|
||||
|
||||
final double azimuth = Framework.nativeGetDistanceAndAzimuthFromLatLon(mMapObject.getLat(), mMapObject
|
||||
.getLon(),
|
||||
location.getLatitude(), location
|
||||
.getLongitude(),
|
||||
northAzimuth)
|
||||
.getAzimuth();
|
||||
final double azimuth = Framework.nativeGetDistanceAndAzimuthFromLatLon(mMapObject.getLat(),
|
||||
mMapObject.getLon(),
|
||||
location.getLatitude(),
|
||||
location.getLongitude(),
|
||||
northAzimuth).getAzimuth();
|
||||
if (azimuth >= 0)
|
||||
{
|
||||
UiUtils.show(mAvDirection);
|
||||
|
@ -1749,16 +1721,6 @@ public class PlacePageView extends NestedScrollView
|
|||
setMapObject(Framework.nativeDeleteBookmarkFromMapObject(), true, null);
|
||||
else
|
||||
setMapObject(BookmarkManager.INSTANCE.addNewBookmark(mapObject.getLat(), mapObject.getLon()), true, null);
|
||||
|
||||
// TODO:
|
||||
/* post(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
setState(mBookmarkSet ? State.DETAILS : State.PREVIEW);
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
private void showBigDirection()
|
||||
|
@ -1840,38 +1802,12 @@ public class PlacePageView extends NestedScrollView
|
|||
return true;
|
||||
}
|
||||
|
||||
int getDockedWidth()
|
||||
{
|
||||
int res = getWidth();
|
||||
return (res == 0 ? getLayoutParams().width : res);
|
||||
}
|
||||
|
||||
public void hide()
|
||||
{
|
||||
scrollTo(0, 0);
|
||||
detachCountry();
|
||||
}
|
||||
|
||||
public boolean isHidden()
|
||||
{
|
||||
return (getState() == State.HIDDEN);
|
||||
}
|
||||
|
||||
@SuppressWarnings("SimplifiableIfStatement")
|
||||
public boolean hideOnTouch()
|
||||
{
|
||||
if (mIsDocked || mIsFloating)
|
||||
return false;
|
||||
|
||||
if (getState() == State.DETAILS || getState() == State.FULLSCREEN)
|
||||
{
|
||||
hide();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isInvalidDownloaderStatus(int status)
|
||||
{
|
||||
return (status != CountryItem.STATUS_DOWNLOADABLE &&
|
||||
|
|
|
@ -51,12 +51,13 @@ public class PlacePageTracker
|
|||
|
||||
public void onOpened()
|
||||
{
|
||||
if (mPlacePageView.getState() == PlacePageView.State.DETAILS)
|
||||
// TODO:
|
||||
/* if (mPlacePageView.getState() == PlacePageView.State.DETAILS)
|
||||
{
|
||||
Sponsored sponsored = mPlacePageView.getSponsored();
|
||||
if (sponsored != null)
|
||||
Statistics.INSTANCE.trackSponsoredOpenEvent(sponsored);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private void trackTaxiVisibility()
|
||||
|
|
Loading…
Add table
Reference in a new issue