opt
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -5,7 +5,7 @@
|
||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
@@ -81,3 +83,40 @@ dependencies {
|
||||
implementation project(':modules:mogo-module-search')
|
||||
}
|
||||
}
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.all { //这里修改apk文件名
|
||||
outputFileName = "Launcher2.0_V${android.defaultConfig.versionName}_${getCurrentDate()}_${variant.name}_${getGitCommit()}.apk"
|
||||
println outputFileName
|
||||
}
|
||||
}
|
||||
|
||||
def getCurrentDate() {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss")
|
||||
return sdf.format(new Date())
|
||||
}
|
||||
|
||||
def getGitCommit() {
|
||||
def gitDir = new File("${new File("${rootDir}")}/.git")
|
||||
if (!gitDir.isDirectory()) {
|
||||
return 'non_git_build'
|
||||
}
|
||||
|
||||
def cmd = 'git log --pretty=format:%h -1'
|
||||
def gitCommit = cmd.execute().text.trim()
|
||||
|
||||
print gitCommit
|
||||
|
||||
def cmd2 = 'git status -s'
|
||||
def gitStatus = cmd2.execute().text.trim()
|
||||
|
||||
println '---------'
|
||||
|
||||
print gitStatus
|
||||
if (gitStatus != null && !gitStatus.isEmpty()) {
|
||||
return 'local-build'
|
||||
}
|
||||
|
||||
assert !gitCommit.isEmpty()
|
||||
gitCommit
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.mogo.launcher">
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
@@ -8,10 +9,11 @@
|
||||
android:name=".MogoApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:label="@string/app_shell_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App">
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
|
||||
</application>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
// MogoModulePaths.addModule( new MogoModule( Demo2Constants.TAG, "CARD_DEMO2" ) );
|
||||
DebugConfig.setNetMode( DebugConfig.NET_MODE_QA );
|
||||
MogoModulePaths.addModule(new MogoModule(OnLineCarConstants.TAG, "CARD_TYPE_ROAD_ONLINECAR"));
|
||||
// MogoModulePaths.addModule( new MogoModule( TanluConstants.TAG, "CARD_TYPE_ROAD_CODITION" ) );
|
||||
MogoModulePaths.addModule( new MogoModule( TanluConstants.TAG, "CARD_TYPE_ROAD_CODITION" ) );
|
||||
MogoModulePaths.addModule(new MogoModule( CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME));
|
||||
MogoModulePaths.addModule(new MogoModule( MediaConstants.TAG, MediaConstants.MODULE_TYPE) );
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">MogoLauncher</string>
|
||||
<string name="app_shell_name">Launcher2.0</string>
|
||||
</resources>
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.mogo.map.navi.OnCalculatePathItemClickInteraction;
|
||||
import com.mogo.utils.WindowUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
@@ -57,7 +58,7 @@ public class NaviOverlayHelper implements OnCalculatePathItemClickInteraction {
|
||||
|
||||
private int mSelectedPathId;
|
||||
private CalculatePathItem mSelectedCalculatePathItem;
|
||||
private OnCalculatePathItemClickInteraction mLineClickInteraction;
|
||||
private SoftReference< OnCalculatePathItemClickInteraction > mLineClickInteractionRef;
|
||||
|
||||
public NaviOverlayHelper( AMapNavi mAMapNavi, AMap mAMap, Context mContext ) {
|
||||
this.mAMapNavi = mAMapNavi;
|
||||
@@ -180,7 +181,6 @@ public class NaviOverlayHelper implements OnCalculatePathItemClickInteraction {
|
||||
if ( mPaths != null ) {
|
||||
mPaths.clear();
|
||||
}
|
||||
mLineClickInteraction = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -196,8 +196,8 @@ public class NaviOverlayHelper implements OnCalculatePathItemClickInteraction {
|
||||
if ( mPaths != null && !mPaths.isEmpty() ) {
|
||||
for ( MogoCalculatePath path : mPaths ) {
|
||||
if ( TextUtils.equals( path.getTagId(), polyline.getId() ) ) {
|
||||
if ( mLineClickInteraction != null ) {
|
||||
mLineClickInteraction.onItemClicked( path.getTagId() );
|
||||
if ( mLineClickInteractionRef != null && mLineClickInteractionRef.get() != null ) {
|
||||
mLineClickInteractionRef.get().onItemClicked( path.getTagId() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -317,6 +317,9 @@ public class NaviOverlayHelper implements OnCalculatePathItemClickInteraction {
|
||||
}
|
||||
|
||||
public void setLineClickInteraction( OnCalculatePathItemClickInteraction lineClickInteraction ) {
|
||||
mLineClickInteraction = lineClickInteraction;
|
||||
if ( mLineClickInteractionRef != null ) {
|
||||
mLineClickInteractionRef.clear();
|
||||
}
|
||||
mLineClickInteractionRef = new SoftReference<>( lineClickInteraction );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="bottom"
|
||||
android:paddingBottom="@dimen/dp_33">
|
||||
android:paddingBottom="@dimen/dp_61">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_apps_id_navigation"
|
||||
|
||||
@@ -137,6 +137,7 @@ public class FragmentStack {
|
||||
mFragmentTransaction.remove( descriptor.getFragment() );
|
||||
}
|
||||
mFragmentTransaction.commitAllowingStateLoss();
|
||||
mFragmentStack.clear();
|
||||
mCurrentFragment = null;
|
||||
if ( getFragmentStackTransactionListener() != null ) {
|
||||
getFragmentStackTransactionListener().onTransaction();
|
||||
|
||||
@@ -53,6 +53,13 @@ public interface IMogoStatusManager extends IProvider {
|
||||
*/
|
||||
boolean isUserInteracted();
|
||||
|
||||
/**
|
||||
* 用户是否在搜索
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isSearchUIShow();
|
||||
|
||||
/**
|
||||
* 设置小智语音UI状态
|
||||
*
|
||||
@@ -102,6 +109,11 @@ public interface IMogoStatusManager extends IProvider {
|
||||
*/
|
||||
void setUserInteractionStatus( String tag, boolean interrupt, boolean callback );
|
||||
|
||||
/**
|
||||
* 搜索页面显示状态
|
||||
*/
|
||||
void setSearchUIShow( String tag, boolean isShow );
|
||||
|
||||
/**
|
||||
* 注册监听
|
||||
*
|
||||
|
||||
@@ -36,5 +36,10 @@ public enum StatusDescriptor {
|
||||
/**
|
||||
* 用户交互状态
|
||||
*/
|
||||
USER_INTERACTED
|
||||
USER_INTERACTED,
|
||||
|
||||
/**
|
||||
* 搜索页面
|
||||
*/
|
||||
SEARCH_UI;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -79,35 +78,35 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
public void setVoiceUIShow( String tag, boolean show ) {
|
||||
mStatus.put( StatusDescriptor.VOICE_UI, show );
|
||||
invokeStatusChangedListener( StatusDescriptor.VOICE_UI, show );
|
||||
recorderStatusModifier( tag, StatusDescriptor.VOICE_UI );
|
||||
recordStatusModifier( tag, StatusDescriptor.VOICE_UI );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setADASUIShow( String tag, boolean show ) {
|
||||
mStatus.put( StatusDescriptor.ADAS_UI, show );
|
||||
invokeStatusChangedListener( StatusDescriptor.ADAS_UI, show );
|
||||
recorderStatusModifier( tag, StatusDescriptor.ADAS_UI );
|
||||
recordStatusModifier( tag, StatusDescriptor.ADAS_UI );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setV2XUIShow( String tag, boolean show ) {
|
||||
mStatus.put( StatusDescriptor.V2X_UI, show );
|
||||
invokeStatusChangedListener( StatusDescriptor.V2X_UI, show );
|
||||
recorderStatusModifier( tag, StatusDescriptor.V2X_UI );
|
||||
recordStatusModifier( tag, StatusDescriptor.V2X_UI );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPushUIShow( String tag, boolean show ) {
|
||||
mStatus.put( StatusDescriptor.PUSH_UI, show );
|
||||
invokeStatusChangedListener( StatusDescriptor.PUSH_UI, show );
|
||||
recorderStatusModifier( tag, StatusDescriptor.PUSH_UI );
|
||||
recordStatusModifier( tag, StatusDescriptor.PUSH_UI );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAccStatus( String tag, boolean isOn ) {
|
||||
mStatus.put( StatusDescriptor.ACC_STATUS, isOn );
|
||||
invokeStatusChangedListener( StatusDescriptor.ACC_STATUS, isOn );
|
||||
recorderStatusModifier( tag, StatusDescriptor.ACC_STATUS );
|
||||
recordStatusModifier( tag, StatusDescriptor.ACC_STATUS );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,7 +115,14 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
if ( callback ) {
|
||||
invokeStatusChangedListener( StatusDescriptor.USER_INTERACTED, interrupt );
|
||||
}
|
||||
recorderStatusModifier( tag, StatusDescriptor.USER_INTERACTED );
|
||||
recordStatusModifier( tag, StatusDescriptor.USER_INTERACTED );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSearchUIShow( String tag, boolean isShow ) {
|
||||
mStatus.put( StatusDescriptor.SEARCH_UI, isShow );
|
||||
invokeStatusChangedListener( StatusDescriptor.SEARCH_UI, isShow );
|
||||
recordStatusModifier( tag, StatusDescriptor.SEARCH_UI );
|
||||
}
|
||||
|
||||
private void invokeStatusChangedListener( StatusDescriptor descriptor, boolean status ) {
|
||||
@@ -131,7 +137,7 @@ public class MogoStatusManager implements IMogoStatusManager {
|
||||
}
|
||||
}
|
||||
|
||||
private void recorderStatusModifier( String tag, StatusDescriptor descriptor ) {
|
||||
private void recordStatusModifier( String tag, StatusDescriptor descriptor ) {
|
||||
mModifier.put( descriptor, tag );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user