Use system-api lib to get badged, shadowed icons(2/n)
In order to prevent DoS attack from icon size, we're using a system lib to help convert any loaded drawable into a flattened bitmap with an appropriate size. Test: Open recent app screen and then no crash Bug: 33646131 Change-Id: Ib7eae56e19cd86667bd63b6061000c6a92deaf3b
This commit is contained in:
@@ -18,7 +18,10 @@ package com.android.settings.testutils.shadow;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.hardware.fingerprint.FingerprintManager;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
@@ -144,6 +147,11 @@ public class ShadowUtils {
|
||||
return sResultLinks;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected static Drawable getBadgedIcon(Context context, ApplicationInfo appInfo) {
|
||||
return new ColorDrawable(0);
|
||||
}
|
||||
|
||||
public static void setHandledDomains(ArraySet<String> links) {
|
||||
sResultLinks = links;
|
||||
}
|
||||
|
Reference in New Issue
Block a user