Fix keyguard dismiss animation with occludable activities.

See b/203044476#comment27 for before/after videos.

Test: Manual
Bug: 203044476
Change-Id: Ie80187a5ca9b61b8178bbe977bf252db654d9fa4
This commit is contained in:
Jordan Demeulenaere
2022-04-13 11:33:24 +02:00
parent f87e6944ed
commit 1a3135ee5c
2 changed files with 14 additions and 14 deletions

View File

@@ -16,19 +16,13 @@
* limitations under the License.
*/
-->
<ripple
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:color="?android:attr/textColorPrimary">
<item>
<shape
android:shape="rectangle">
<solid android:color="?androidprv:attr/colorSurface"/>
<size
android:width="@dimen/keyguard_affordance_width"
android:height="@dimen/keyguard_affordance_height"/>
<corners android:radius="@dimen/keyguard_affordance_fixed_radius"/>
</shape>
</item>
</ripple>
android:shape="rectangle">
<solid android:color="?androidprv:attr/colorSurface"/>
<size
android:width="@dimen/keyguard_affordance_width"
android:height="@dimen/keyguard_affordance_height"/>
<corners android:radius="@dimen/keyguard_affordance_fixed_radius"/>
</shape>

View File

@@ -2513,6 +2513,12 @@ public class CentralSurfacesImpl extends CoreStartable implements
animate, intent.getPackage(), (adapter) -> {
ActivityOptions options = new ActivityOptions(
CentralSurfaces.getActivityOptions(mDisplayId, adapter));
// We know that the intent of the caller is to dismiss the keyguard and
// this runnable is called right after the keyguard is solved, so we tell
// WM that we should dismiss it to avoid flickers when opening an activity
// that can also be shown over the keyguard.
options.setDismissKeyguard();
options.setDisallowEnterPictureInPictureWhileLaunching(
disallowEnterPictureInPictureWhileLaunching);
if (CameraIntents.isInsecureCameraIntent(intent)) {