Merge "Fixing getSafeZone() method in AdaptiveIcon" into tm-qpr-dev am: 065fd52a00
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19520338 Change-Id: Icd60febf2975617cc273bb137ee8ca57bec2e66b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -359,10 +359,10 @@ public class AdaptiveIconDrawable extends Drawable implements Drawable.Callback
|
|||||||
/** @hide */
|
/** @hide */
|
||||||
@TestApi
|
@TestApi
|
||||||
public Region getSafeZone() {
|
public Region getSafeZone() {
|
||||||
mMaskMatrix.reset();
|
Path mask = getIconMask();
|
||||||
mMaskMatrix.setScale(SAFEZONE_SCALE, SAFEZONE_SCALE, getBounds().centerX(), getBounds().centerY());
|
mMaskMatrix.setScale(SAFEZONE_SCALE, SAFEZONE_SCALE, getBounds().centerX(), getBounds().centerY());
|
||||||
Path p = new Path();
|
Path p = new Path();
|
||||||
mMask.transform(mMaskMatrix, p);
|
mask.transform(mMaskMatrix, p);
|
||||||
Region safezoneRegion = new Region(getBounds());
|
Region safezoneRegion = new Region(getBounds());
|
||||||
safezoneRegion.setPath(p, safezoneRegion);
|
safezoneRegion.setPath(p, safezoneRegion);
|
||||||
return safezoneRegion;
|
return safezoneRegion;
|
||||||
|
|||||||
Reference in New Issue
Block a user