add product manager

This commit is contained in:
wangcongtao
2020-05-21 14:49:30 +08:00
parent 9c7042246c
commit e1a83c6b8f
35 changed files with 360 additions and 353 deletions

View File

@@ -8,6 +8,7 @@ import android.graphics.Rect;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.UiThread;
import androidx.lifecycle.LifecycleOwner;
import com.alibaba.android.arouter.launcher.ARouter;
@@ -63,6 +64,18 @@ public class MapPresenter extends Presenter< MapView > implements
private IMogoSettingManager mSettingManager;
private Rect mDisplayOverviewBounds;
private Runnable mLockCarRunnable = new Runnable() {
@Override
public void run() {
if ( !mStatusManager.isDisplayOverview() ) {
return;
}
mStatusManager.setDisplayOverview( TAG, false );
mView.getUIController().recoverLockMode();
}
};
public MapPresenter( MapView view ) {
super( view );
initBroadcast();
@@ -221,6 +234,7 @@ public class MapPresenter extends Presenter< MapView > implements
mStatusManager.setDisplayOverview( TAG, false );
mView.getUIController().recoverLockMode();
AIAssist.getInstance( getContext() ).speakTTSVoice( "已为您继续导航" );
UiThreadHandler.removeCallbacks( mLockCarRunnable );
} else {
mLauncher.backToLauncher( getContext() );
UiThreadHandler.postDelayed( () -> {
@@ -228,6 +242,7 @@ public class MapPresenter extends Presenter< MapView > implements
mStatusManager.setDisplayOverview( TAG, false );
mView.getUIController().recoverLockMode();
AIAssist.getInstance( getContext() ).speakTTSVoice( "已为您继续导航" );
UiThreadHandler.removeCallbacks( mLockCarRunnable );
} catch ( Exception e ) {
e.printStackTrace();
}
@@ -258,6 +273,8 @@ public class MapPresenter extends Presenter< MapView > implements
AIAssist.getInstance( getContext() ).speakTTSVoice( "展示全程路线" );
}, 2_000L );
}
UiThreadHandler.postDelayed( mLockCarRunnable, 20_000 );
}
private void zoomMap( boolean zoomIn ) {