Android windowIsTranslucent更改生命周期,但进入锁屏时出错

Android windowIsTranslucent更改生命周期,但进入锁屏时出错,android,android-activity,transparent,android-lifecycle,lockscreen,Android,Android Activity,Transparent,Android Lifecycle,Lockscreen,我体验到true正在改变Android生命周期的处理方式。 我猜这样做是因为如果窗口是半透明的,您仍然可以看到基线活动。我们称之为活动A 让我们看一下下面的示例,其中在活动A上有另一个活动。这个其他活动称为B Activity A Started - This activity is the first activity Activity A Stopped - Now you start activity B. Activity B Started - This activity has wi

我体验到
true
正在改变Android生命周期的处理方式。 我猜这样做是因为如果窗口是半透明的,您仍然可以看到基线活动。我们称之为活动A

让我们看一下下面的示例,其中在活动A上有另一个活动。这个其他活动称为B

Activity A Started - This activity is the first activity
Activity A Stopped - Now you start activity B.
Activity B Started - This activity has windowIsTranslucent set to false. Hence we can't see anything of activity A anymore which is why activity A stopped.
Now hit the power button to go into lockscreen mode. 
Activity B Stopped - Since none is visible anymore activity B also stops. 
让我们看看另一个场景,其中活动B的windowIsTranslucent设置为true

Activity A Started - This activity is the first activity
Activity A Paused - Now you start activity B.
Activity B Started - This activity has windowIsTranslucent true (we want to see through it so it's still possible to see activity A)
Now hit the power button to go into lockscreen mode. 
Activity B Paused
Activity B Stopped
Activity A Stopped
Everything looks fine expect a RuntimeException is thrown that for me makes no sense since it's not stopped before?

E/ActivityThread: Performing stop of activity that is already stopped: {testapp/ActivityA}
java.lang.RuntimeException: Performing stop of activity that is already stopped: {testapp/ActivityA}
    at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3996)
    at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4084)
    at android.app.ActivityThread.-wrap24(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1622)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

你们有谁知道为什么要扔这个吗?有什么解决办法吗?或者我可以在不使用windowIsTranslucent的情况下使活动透明吗?

遇到同样的问题…有解决办法吗?我有奇怪的生命周期问题,如果我从另一个活动启动,我可能无法返回到另一个活动。但我需要半透明,因为启动时间会减少(假装启动屏幕)