diff --git a/alps/packages/apps/Launcher3/src/com/android/launcher3/graphics/LauncherIcons.java b/alps/packages/apps/Launcher3/src/com/android/launcher3/graphics/LauncherIcons.java
--- a/alps/packages/apps/Launcher3/src/com/android/launcher3/graphics/LauncherIcons.java

+++ b/alps/packages/apps/Launcher3/src/com/android/launcher3/graphics/LauncherIcons.java

/**
     * Returns a bitmap suitable for the all apps view. The icon is badged for {@param user}.
     * The bitmap is also visually normalized with other icons.
     */
    public static Bitmap createBadgedIconBitmap(
            Drawable icon, UserHandle user, Context context, int iconAppTargetSdk) {

        IconNormalizer normalizer;
        float scale = 1f;
        if (!FeatureFlags.LAUNCHER3_DISABLE_ICON_NORMALIZATION) {
            normalizer = IconNormalizer.getInstance(context);
            /*if (Utilities.isAtLeastO() && iconAppTargetSdk >= Build.VERSION_CODES.O) {
                boolean[] outShape = new boolean[1];
                AdaptiveIconDrawable dr = (AdaptiveIconDrawable)
                        context.getDrawable(R.drawable.adaptive_icon_drawable_wrapper).mutate();
                dr.setBounds(0, 0, 1, 1);
                //scale = normalizer.getScale(icon, null, dr.getIconMask(), outShape); //chenyl del for ro.sf.lcd_density=224
                if (FeatureFlags.LEGACY_ICON_TREATMENT &&
                        !outShape[0]){
                    Drawable wrappedIcon = wrapToAdaptiveIconDrawable(context, icon, scale);
                    if (wrappedIcon != icon) {
                        icon = wrappedIcon;
                        //scale = normalizer.getScale(icon, null, null, null); //chenyl del for ro.sf.lcd_density=224
                    }
                }
            } else {
                //scale = normalizer.getScale(icon, null, null, null); //chenyl del for ro.sf.lcd_density=224
            }*/
        }
        Bitmap bitmap = createIconBitmap(icon, context, scale);
        if (FeatureFlags.ADAPTIVE_ICON_SHADOW && Utilities.isAtLeastO() &&
                icon instanceof AdaptiveIconDrawable) {
            bitmap = ShadowGenerator.getInstance(context).recreateIcon(bitmap);
        }
        return badgeIconForUser(bitmap, user, context);
    }

 

注释掉Utilities.isAtLeastO() && iconAppTargetSdk >= Build.VERSION_CODES.O 判断里的代码

更多相关文章

  1. Android的Listview用法总结和Adapter的使用
  2. 判断当前网络是否可用和调用系统设置wifi界面
  3. android代码分析,及Terminal使用
  4. Android应用程序绑定服务(bindService)的过程源代码分析(2)
  5. 使用代码为textview设置drawableLeft
  6. Android(安卓)判断SD卡是否存在及容量查询
  7. 【翻译】(14)Stable APIs
  8. android中判断网络是否连接
  9. android登录窗口——基础编

随机推荐

  1. android获取短信验证码自动填入
  2. android manifest
  3. android 设置各种颜色 android:backgrou
  4. Using the Android Camera - Android OS
  5. android studio Missing Constraints in
  6. Android CLAT
  7. Android之xml属性
  8. item点击波纹动画
  9. Android SDK 证书没接受问题
  10. shape带边框的背景