Beispiel #1
0
 private void completeUberRequest() {
   mUberRequestHandled = true;
   if (mContainer != null) {
     mContainer.updateBuildProgress(100, mLastRouterType);
     mContainer.updateMenu();
   }
 }
Beispiel #2
0
 void searchPoi(int slotId) {
   mLogger.d("searchPoi: " + slotId);
   Statistics.INSTANCE.trackEvent(Statistics.EventName.ROUTING_SEARCH_POINT);
   AlohaHelper.logClick(AlohaHelper.ROUTING_SEARCH_POINT);
   mWaitingPoiPickSlot = slotId;
   mContainer.showSearch();
   mContainer.updateMenu();
 }
Beispiel #3
0
  private void setBuildState(BuildState newState) {
    mLogger.d("[B] State: " + mState + ", BuildState: " + mBuildState + " -> " + newState);
    mBuildState = newState;

    if (mBuildState == BuildState.BUILT && !MapObject.isOfType(MapObject.MY_POSITION, mStartPoint))
      Framework.nativeDisableFollowing();

    if (mContainer != null) mContainer.updateMenu();
  }
Beispiel #4
0
  private void onPoiSelectedInternal(@Nullable MapObject point, int slot) {
    if (point != null) {
      if (slot == 1) setStartPoint(point);
      else setEndPoint(point);
    }

    if (mContainer == null) return;

    mContainer.updateMenu();
    showRoutePlan();
  }
Beispiel #5
0
  @MainThread
  public void restore() {
    mHasContainerSavedState = false;
    if (isPlanning()) showRoutePlan();

    if (mContainer != null) {
      if (isUberPlanning()) mContainer.updateBuildProgress(0, mLastRouterType);

      mContainer.showNavigation(isNavigating());
      mContainer.updateMenu();
      mContainer.updatePoints();
    }
    processRoutingEvent();
  }
Beispiel #6
0
  public boolean cancel() {
    if (isPlanning()) {
      mLogger.d("cancel: planning");

      cancelInternal();
      if (mContainer != null) mContainer.showRoutePlan(false, null);
      return true;
    }

    if (isNavigating()) {
      mLogger.d("cancel: navigating");

      cancelInternal();
      if (mContainer != null) {
        mContainer.showNavigation(false);
        mContainer.updateMenu();
      }
      return true;
    }

    mLogger.d("cancel: none");
    return false;
  }
Beispiel #7
0
  private void setState(State newState) {
    mLogger.d("[S] State: " + mState + " -> " + newState + ", BuildState: " + mBuildState);
    mState = newState;

    if (mContainer != null) mContainer.updateMenu();
  }