Merge branch 'dev' into dev_1.1.2
This commit is contained in:
@@ -75,7 +75,7 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
|
||||
# 在线车辆F
|
||||
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2
|
||||
# 推送
|
||||
MOGO_MODULE_PUSH_VERSION=1.1.6
|
||||
MOGO_MODULE_PUSH_VERSION=1.1.6.1
|
||||
MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.5
|
||||
MOGO_MODULE_PUSH_NOOP_VERSION=1.1.5.6
|
||||
# 广告资源位
|
||||
|
||||
@@ -34,8 +34,8 @@ public class BackToMainHomeManager {
|
||||
}
|
||||
|
||||
public static void backToLauncher() {
|
||||
if (mStatusManager == null) {
|
||||
Logger.e(TAG,"未初始化完成");
|
||||
if ( mStatusManager == null ) {
|
||||
Logger.e( TAG, "未初始化完成" );
|
||||
return;
|
||||
}
|
||||
if ( mStatusManager.isMainPageOnResume() ) {
|
||||
@@ -45,6 +45,10 @@ public class BackToMainHomeManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mStatusManager.isAppListUIShow() ) {
|
||||
mApis.getIntentManagerApi().invoke( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, new Intent() );
|
||||
}
|
||||
|
||||
Logger.d( TAG, "返回桌面" );
|
||||
|
||||
Intent intent = new Intent();
|
||||
@@ -75,7 +79,7 @@ public class BackToMainHomeManager {
|
||||
params.x = AbsMogoApplication.getApp().getResources().getDimensionPixelOffset( R.dimen.module_back_main_home_icon_left );
|
||||
params.y = AbsMogoApplication.getApp().getResources().getDimensionPixelOffset( R.dimen.module_back_main_home_icon_top );
|
||||
params.gravity = Gravity.LEFT | Gravity.CENTER;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ) {
|
||||
params.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
|
||||
} else {
|
||||
params.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<item>周五</item>
|
||||
<item>周六</item>
|
||||
</string-array>
|
||||
<string name="module_ext_str_dots">99+</string>
|
||||
<string name="module_ext_str_dots">···</string>
|
||||
|
||||
<string name="module_map_str_search_hint">搜索目的地</string>
|
||||
<string name="module_map_str_upload_road_condition">分享</string>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package com.mogo.module.push.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.module.push.Config
|
||||
import com.mogo.module.push.base.PushUIConstants
|
||||
import com.mogo.module.push.R
|
||||
import com.mogo.module.push.adapter.PushMessageAdapter
|
||||
import com.mogo.module.push.base.PushUIConstants
|
||||
import com.mogo.module.push.model.PushBean
|
||||
import com.mogo.module.push.repository.PushRepository
|
||||
import com.mogo.module.push.utils.AnalyticsUtils
|
||||
@@ -16,12 +17,15 @@ import com.mogo.module.push.utils.HandlerUtils
|
||||
import com.mogo.module.push.utils.startClearAnimator
|
||||
import com.mogo.module.push.view.PushItemAnimator
|
||||
import com.mogo.module.push.view.SwipeItemLayout
|
||||
import com.mogo.module.push.view.getApis
|
||||
import com.mogo.module.push.viewmodel.MessageViewModel
|
||||
import com.mogo.service.intent.IMogoIntentListener
|
||||
import com.mogo.utils.UiThreadHandler
|
||||
import com.mogo.utils.logger.Logger
|
||||
import kotlinx.android.synthetic.main.module_push_message_activity.*
|
||||
|
||||
@Route(path = PushUIConstants.Push_MESSAGE_ACTIVITY_PATH)
|
||||
class PushMessageActivity : AppCompatActivity() {
|
||||
class PushMessageActivity : AppCompatActivity(), IMogoIntentListener {
|
||||
private lateinit var viewModel: MessageViewModel
|
||||
private var adapter = PushMessageAdapter()
|
||||
private var clearing = false
|
||||
@@ -54,7 +58,7 @@ class PushMessageActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
module_push_activity_clear.visibility =
|
||||
if (show) View.VISIBLE else View.GONE
|
||||
if (show) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
override fun deleteBean(bean: PushBean, action: Boolean) {
|
||||
@@ -77,10 +81,10 @@ class PushMessageActivity : AppCompatActivity() {
|
||||
module_push_activity_recycler_view.adapter = adapter
|
||||
module_push_activity_recycler_view.itemAnimator = PushItemAnimator()
|
||||
module_push_activity_recycler_view.addOnItemTouchListener(
|
||||
SwipeItemLayout.OnSwipeItemTouchListener(this)
|
||||
SwipeItemLayout.OnSwipeItemTouchListener(this)
|
||||
)
|
||||
viewModel = MessageViewModel(object :
|
||||
MessageViewModel.MessageListChange {
|
||||
MessageViewModel.MessageListChange {
|
||||
override fun messageListChange(list: MutableList<PushBean>?) {
|
||||
runOnUiThread {
|
||||
var size = list?.size ?: 0
|
||||
@@ -90,6 +94,8 @@ class PushMessageActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
getApis(this).intentManagerApi.registerIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this)
|
||||
}
|
||||
|
||||
private fun updateHistoryMessageCount(){
|
||||
@@ -105,4 +111,16 @@ class PushMessageActivity : AppCompatActivity() {
|
||||
super.onResume()
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onIntentReceived(intentStr: String?, intent: Intent?) {
|
||||
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(intentStr)) {
|
||||
Logger.d("PushMessageActivity", "close by home key.")
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
getApis(this).intentManagerApi.unregisterIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this)
|
||||
}
|
||||
}
|
||||
@@ -720,11 +720,11 @@ public class MogoServices implements IMogoMapListener,
|
||||
initLocationServiceProcess( mContext );
|
||||
mADASController.showADAS();
|
||||
refreshStrategy();
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getSingletonLocationClient( mContext ).stop();
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getSingletonLocationClient( mContext ).start();
|
||||
} else {
|
||||
try {
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getMarkerManager( mContext ).removeMarkers();
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getSingletonLocationClient( mContext ).start();
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getSingletonLocationClient( mContext ).stop();
|
||||
} catch ( Exception e ) {
|
||||
Logger.e( TAG, e, "error." );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user