[charter]
[debug] [tag 混乱问题]
This commit is contained in:
@@ -129,7 +129,7 @@ class DebugViewWatchDogFragment :
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionFragment"
|
||||
const val TAG = "DebugViewWatchDogFragment"
|
||||
@JvmStatic
|
||||
fun newInstance(): DebugViewWatchDogFragment {
|
||||
val args = Bundle()
|
||||
@@ -143,15 +143,15 @@ class DebugViewWatchDogFragment :
|
||||
debugViewWatchDogFragment: DebugViewWatchDogFragment?
|
||||
) {
|
||||
|
||||
val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(M1ContainFragment.TAG)
|
||||
val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(TAG)
|
||||
if (fragmentByTag is DialogFragment) {
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "正在展示")
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.isAdded) {
|
||||
if (AppStateManager.currentActivity() == null) { // 没有在当前应用内 在启动页面关闭应用
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "权限验证")
|
||||
CallerLogger.d(M_BUS_P + TAG, "权限验证")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -165,10 +165,10 @@ class DebugViewWatchDogFragment :
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
debugViewWatchDogFragment.show(parentFragmentManager, MainFragment.TAG)
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "展示开关门")
|
||||
debugViewWatchDogFragment.show(parentFragmentManager, TAG)
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示开关门")
|
||||
} else {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "dialog 1s内执行一次")
|
||||
CallerLogger.d(M_BUS_P + TAG, "dialog 1s内执行一次")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerCarUseAndNoOrderPresenter
|
||||
import com.mogo.och.bus.passenger.ui.MainFragment
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
|
||||
import com.mogo.och.common.module.voice.VoiceManager
|
||||
import kotlinx.android.synthetic.main.m1_order_end.*
|
||||
@@ -113,7 +112,7 @@ class M1CarUserNoOrderFragment :
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionFragment"
|
||||
const val TAG = "M1CarUserNoOrderFragment"
|
||||
@JvmStatic
|
||||
fun newInstance(): M1CarUserNoOrderFragment {
|
||||
val args = Bundle()
|
||||
@@ -129,15 +128,15 @@ class M1CarUserNoOrderFragment :
|
||||
m1CarUserNoOrderFragment: M1CarUserNoOrderFragment?
|
||||
) {
|
||||
|
||||
val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(M1ContainFragment.TAG)
|
||||
val fragmentByTag: Fragment? = parentFragmentManager.findFragmentByTag(TAG)
|
||||
if (fragmentByTag is DialogFragment) {
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + MainFragment.TAG, "正在展示")
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.isAdded) {
|
||||
if (AppStateManager.currentActivity() == null) { // 没有在当前应用内 在启动页面关闭应用
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + MainFragment.TAG, "权限验证")
|
||||
CallerLogger.d(M_BUS_P + TAG, "权限验证")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -151,11 +150,11 @@ class M1CarUserNoOrderFragment :
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
m1CarUserNoOrderFragment.show(parentFragmentManager, MainFragment.TAG)
|
||||
m1CarUserNoOrderFragment.show(parentFragmentManager, TAG)
|
||||
VoiceManager.endOrder()
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "展示开关门")
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示开关门")
|
||||
} else {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "dialog 1s内执行一次")
|
||||
CallerLogger.d(M_BUS_P + TAG, "dialog 1s内执行一次")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.bean.event.EventLineSites
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionPresenter
|
||||
import com.mogo.och.bus.passenger.ui.MainFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1OrderLineFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1SoftFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1VideoFragment
|
||||
@@ -238,7 +237,7 @@ class M1ContainFragment :
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionFragment"
|
||||
const val TAG = "M1ContainFragment"
|
||||
|
||||
/**
|
||||
* 娱乐视频
|
||||
@@ -279,15 +278,15 @@ class M1ContainFragment :
|
||||
bpFunctionGroup: M1ContainFragment?,
|
||||
tab: String
|
||||
) {
|
||||
val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(M1ContainFragment.TAG)
|
||||
val fragmentByTag: Fragment? = parentFragmentManager.findFragmentByTag(TAG)
|
||||
if (fragmentByTag is DialogFragment) {
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "正在展示")
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.isAdded) {
|
||||
if (AppStateManager.currentActivity() == null) { // 没有在当前应用内 在启动页面关闭应用
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "权限验证")
|
||||
CallerLogger.d(M_BUS_P + TAG, "权限验证")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -300,13 +299,13 @@ class M1ContainFragment :
|
||||
if (bpFunctionGroup.isAdded) {
|
||||
//解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(bpFunctionGroup)
|
||||
.commitAllowingStateLoss()
|
||||
.commitNow()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
bpFunctionGroup.show(parentFragmentManager, MainFragment.TAG)
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "展示$tab")
|
||||
bpFunctionGroup.show(parentFragmentManager, TAG)
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示$tab")
|
||||
} else {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "dialog 1s内执行一次")
|
||||
CallerLogger.d(M_BUS_P + TAG, "dialog 1s内执行一次")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,15 +320,15 @@ class NoviceGuidanceFragment :
|
||||
bpFunctionGroup: NoviceGuidanceFragment?,
|
||||
) {
|
||||
val fragmentByTag: Fragment? =
|
||||
childFragmentManager.findFragmentByTag(NoviceGuidanceFragment.TAG)
|
||||
parentFragmentManager.findFragmentByTag(TAG)
|
||||
if (fragmentByTag is DialogFragment) {
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "正在展示")
|
||||
CallerLogger.d(M_BUS_P + TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.isAdded) {
|
||||
if (AppStateManager.currentActivity() == null) { // 没有在当前应用内 在启动页面关闭应用
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "权限验证")
|
||||
CallerLogger.d(M_BUS_P + TAG, "权限验证")
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -343,10 +343,10 @@ class NoviceGuidanceFragment :
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
bpFunctionGroup.show(parentFragmentManager, MainFragment.TAG)
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "展示")
|
||||
bpFunctionGroup.show(parentFragmentManager, TAG)
|
||||
CallerLogger.d(M_BUS_P + TAG, "展示")
|
||||
} else {
|
||||
CallerLogger.d(M_BUS_P + MainFragment.TAG, "dialog 1s内执行一次")
|
||||
CallerLogger.d(M_BUS_P + TAG, "dialog 1s内执行一次")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user