Fix screenshot work profile badge padding

Bug: 254245929
Fix: 254245929
Test: manual (visual change)

Change-Id: Ic068500d2819134423c7c82f5f4cb7c2908a2894
This commit is contained in:
Miranda Kephart
2023-01-06 11:12:24 -05:00
parent 523afd2f27
commit 10df523dae
3 changed files with 16 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2020 The Android Open Source Project
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
@@ -14,8 +14,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="oval">
<solid android:color="?androidprv:attr/colorSurface"/>
</shape>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
android:pathData="M0,0M48,48"/>
</vector>

View File

@@ -107,13 +107,10 @@
app:layout_constraintTop_toTopOf="@id/screenshot_preview_border"/>
<ImageView
android:id="@+id/screenshot_badge"
android:layout_width="24dp"
android:layout_height="24dp"
android:padding="4dp"
android:layout_width="48dp"
android:layout_height="48dp"
android:visibility="gone"
android:background="@drawable/overlay_badge_background"
android:elevation="8dp"
android:src="@drawable/overlay_cancel"
app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"
app:layout_constraintEnd_toEndOf="@id/screenshot_preview_border"/>
<FrameLayout

View File

@@ -685,8 +685,8 @@ public class ScreenshotController {
});
if (mFlags.isEnabled(SCREENSHOT_WORK_PROFILE_POLICY)) {
mScreenshotView.badgeScreenshot(
mContext.getPackageManager().getUserBadgeForDensity(owner, 0));
mScreenshotView.badgeScreenshot(mContext.getPackageManager().getUserBadgedIcon(
mContext.getDrawable(R.drawable.overlay_badge_background), owner));
}
mScreenshotView.setScreenshot(mScreenBitmap, screenInsets);
if (DEBUG_WINDOW) {
@@ -784,9 +784,9 @@ public class ScreenshotController {
mLongScreenshotHolder.setLongScreenshot(longScreenshot);
mLongScreenshotHolder.setTransitionDestinationCallback(
(transitionDestination, onTransitionEnd) -> {
mScreenshotView.startLongScreenshotTransition(
transitionDestination, onTransitionEnd,
longScreenshot);
mScreenshotView.startLongScreenshotTransition(
transitionDestination, onTransitionEnd,
longScreenshot);
// TODO: Do this via ActionIntentExecutor instead.
mContext.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
}