Android 修改默认按键不震动

入口在Setting中的情景模式下面的标准里面,checkbox 选项 触摸时震动
mediatek\frameworks\base\media\audio\java\com\mediatek\audioprofile\AudioProfileManager.java
开机广播修改参数 RestoreRotationReceiver.java

关键执行函数类:Editprofile.java

AudioProfileManager mProfileManager=(AudioProfileManager) context.getSystemService(Context.AUDIOPROFILE_SERVICE);
             mProfileManager.setHapticFeedbackEnabled("mtk_audioprofile_general",false);

\packages\apps\Settings\src\com\android\settings\ SoundSettings.java

       mHapticFeedback.setChecked(Settings.System.getInt(resolver,Settings.System.HAPTIC_FEEDBACK_ENABLED, 1) != 0);

//lhw  modify 
 //Settings.System.putInt(getContentResolver(), Settings.System.HAPTIC_FEEDBACK_ENABLED,
                  //  mHapticFeedback.isChecked() ? 1 : 0);
          Settings.System.putInt(getContentResolver(), Settings.System.HAPTIC_FEEDBACK_ENABLED,
                   mHapticFeedback.isChecked() ? 0 : 1);

你可能感兴趣的:(Android,MTK开发笔记集)