Android 8.0 Settings 相关修改记录

Settings修改

修改第三方图标:

在alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/dashboard/DashboardAdapter.java

private void onBindTile(DashboardItemHolder holder, Tile tile)else条件中添加:
//Redmine 113769 (UI需求)设置界面图标 modify by 20171222 begin
            if(tile.intent != null && tile.intent.getComponent() != null){
                    if("com.google.android.gms.app.settings.GoogleSettingsIALink".equalsIgnoreCase(tile.intent.getComponent().getClassName())){
                            holder.icon.setImageDrawable(mCache.getIcon(Icon.createWithResource(mContext, R.drawable.ic_settings_google)));
//Redmine 112347 modified gota ui 2018 01 02 begin
                    }else if("com.android.settings.Settings$SystemUpdateDashboardActivity".equalsIgnoreCase(tile.intent.getComponent().getClassName())){   
                        boolean needUpdate = "1".equals(Settings.System.getString(mContext.getContentResolver(),"isNeedUpdate"))? true : false;
                        android.util.Log.d("log","needUpdate = "+needUpdate);
                        if(needUpdate){
                            holder.icon.setImageDrawable(mCache.getIcon(Icon.createWithResource(mContext, R.drawable.system_update_icon)));    
                        }
//Redmine 112347 modified gota ui 2018 01 02 end
                    }
                    //Redmine 119444 modify for the duraspeed icon of settings by begin
                    if("com.mediatek.duraspeed.view.RunningBoosterMainActivity".equalsIgnoreCase(tile.intent.getComponent().getClassName())){
                            holder.icon.setImageDrawable(mCache.getIcon(Icon.createWithResource(mContext, R.drawable.ic_settings_duraspeed)));
                    }
                    //Redmine 119444 modify for the duraspeed icon of settings by end
            }
            //Redmine 113769 (UI需求)设置界面图标 modify by 20171222 end

待机界面长按添加小部件,图标不易看清:
在alps/vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/CreateShortcut.java

protected Intent createResultIntent(Intent shortcutIntent, ResolveInfo resolveInfo, CharSequence label)        中做如下修改:
//Redmine 120595 modify for the shortcut show by 20180125 begin
        /**Icon maskableIcon = activityInfo.icon != 0 ? Icon.createWithAdaptiveBitmap(
                createIcon(activityInfo.icon,
                        R.layout.shortcut_badge_maskable,
                        getResources().getDimensionPixelSize(R.dimen.shortcut_size_maskable))) :
                Icon.createWithResource(this, R.drawable.ic_launcher_settings);
        String shortcutId = SHORTCUT_ID_PREFIX +
                shortcutIntent.getComponent().flattenToShortString();
        ShortcutInfo info = new ShortcutInfo.Builder(this, shortcutId)
                .setShortLabel(label)
                .setIntent(shortcutIntent)
                .setIcon(maskableIcon)
                .build();**/
        //Intent intent = sm.createShortcutResultIntent(info);
        Intent intent = new Intent();
//Redmine 120595 modify for the shortcut show by 20180125 end

你可能感兴趣的:(Android之旅)