version:3.9
fix:修复解锁后无限重置的bug update:更换图标,增加解锁后显示所有app
This commit is contained in:
@@ -120,15 +120,16 @@ public class IconCache extends BaseIconCache {
|
||||
|
||||
/**
|
||||
* Fetches high-res icon for the provided ItemInfo and updates the caller when done.
|
||||
*
|
||||
* @return a request ID that can be used to cancel the request.
|
||||
*/
|
||||
public IconLoadRequest updateIconInBackground(final ItemInfoUpdateReceiver caller,
|
||||
final ItemInfoWithIcon info) {
|
||||
final ItemInfoWithIcon info) {
|
||||
Preconditions.assertUIThread();
|
||||
if (mPendingIconRequestCount <= 0) {
|
||||
LauncherModel.setWorkerPriority(Process.THREAD_PRIORITY_FOREGROUND);
|
||||
}
|
||||
mPendingIconRequestCount ++;
|
||||
mPendingIconRequestCount++;
|
||||
|
||||
IconLoadRequest request = new IconLoadRequest(mWorkerHandler, this::onIconRequestEnd) {
|
||||
@Override
|
||||
@@ -149,7 +150,7 @@ public class IconCache extends BaseIconCache {
|
||||
}
|
||||
|
||||
private void onIconRequestEnd() {
|
||||
mPendingIconRequestCount --;
|
||||
mPendingIconRequestCount--;
|
||||
if (mPendingIconRequestCount <= 0) {
|
||||
LauncherModel.setWorkerPriority(Process.THREAD_PRIORITY_BACKGROUND);
|
||||
}
|
||||
@@ -171,7 +172,7 @@ public class IconCache extends BaseIconCache {
|
||||
* Fill in {@param info} with the icon and label for {@param activityInfo}
|
||||
*/
|
||||
public synchronized void getTitleAndIcon(ItemInfoWithIcon info,
|
||||
LauncherActivityInfo activityInfo, boolean useLowResIcon) {
|
||||
LauncherActivityInfo activityInfo, boolean useLowResIcon) {
|
||||
// If we already have activity info, no need to use package icon
|
||||
getTitleAndIcon(info, () -> activityInfo, false, useLowResIcon);
|
||||
}
|
||||
@@ -229,10 +230,13 @@ public class IconCache extends BaseIconCache {
|
||||
info.contentDescription = entry.contentDescription;
|
||||
info.applyFrom((entry.icon == null) ? getDefaultIcon(info.user) : entry);
|
||||
}
|
||||
|
||||
private List<String> appClassNameList = new ArrayList<String>() {
|
||||
{
|
||||
this.add("com.android.appstore");//应用市场
|
||||
this.add("com.android.browser.BrowserActivity");//浏览器
|
||||
this.add("com.aoleyun.appstore.activity.SplashActivity");//应用市场
|
||||
this.add("com.aoleyun.browser.BrowserActivity");//浏览器
|
||||
this.add("com.aoleyun.sn.activity.SplashActivity");//
|
||||
this.add("com.aoleyun.info.activity.main.MainActivity");//
|
||||
this.add("com.android.calculator2.Calculator");//计算器
|
||||
this.add("com.android.calendar.AllInOneActivity");//日历
|
||||
this.add("com.android.camera.CameraLauncher");//相机
|
||||
@@ -260,6 +264,8 @@ public class IconCache extends BaseIconCache {
|
||||
private List<String> appIconList = new ArrayList<String>() {{
|
||||
this.add("com_android_appstore");
|
||||
this.add("com_android_browser");
|
||||
this.add("com_aoleyun_sn");
|
||||
this.add("com_aoleyun_info");
|
||||
this.add("com_android_calculator2");
|
||||
this.add("com_android_calendar");
|
||||
this.add("com_android_camera");
|
||||
@@ -294,7 +300,7 @@ public class IconCache extends BaseIconCache {
|
||||
|
||||
if (null != info) {
|
||||
String name = info.getComponentName().getClassName();
|
||||
// Log.e("fht", "getDeskClockIcon:"+name);
|
||||
Log.e("getFullResIcon", "getDeskClockIcon: " + name);
|
||||
if (appClassNameList.indexOf(info.getComponentName().getClassName()) == -1) {
|
||||
icon = BitmapUtils.getRoundedBitmap(mIconProvider.getIcon(info, mIconDpi, flattenDrawable), mContext);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user