Android 系统APK-闹钟 移除时钟内的音量按钮

相关文件
packages/apps/DeskClock/res/values/strings.xml
packages/apps/DeskClock/res/xml/settings.xml
packages/apps/DeskClock/src/com/android/deskclock/settings/SettingsActivity.java

移除字样
packages/apps/DeskClock/res/values/strings.xml

++ <!--    &lt;!&ndash; Title of the setting to change hardware button behavior. This string-->
++ <!--         should be changed for each piece of hardware. [CHAR LIMIT=20] &ndash;&gt;-->
++ <!--    <string name="volume_button_setting_title">Volume buttons</string>-->

++ <!--    &lt;!&ndash; Entries listed in the setting for the side-button action. &ndash;&gt;-->
++ <!--    <string-array name="volume_button_setting_entries">-->
++ <!--        <item>Snooze</item>-->
++ <!--        <item>Dismiss</item>-->
++ <!--        <item>Control volume</item>-->
++ <!--    </string-array>-->

移除布局
packages/apps/DeskClock/res/xml/settings.xml

++ <!--        <com.android.deskclock.settings.SimpleMenuPreference-->
++ <!--            android:defaultValue="0"-->
++ <!--            android:dialogTitle="@string/volume_button_setting_title"-->
++ <!--            android:entries="@array/volume_button_setting_entries"-->
++ <!--            android:entryValues="@array/volume_button_setting_values"-->
++ <!--            android:key="volume_button_setting"-->
++ <!--            android:title="@string/volume_button_setting_title" />-->

移除选项
packages/apps/DeskClock/src/com/android/deskclock/settings/SettingsActivity.java

private void refresh() {
         final SimpleMenuPreference clockStylePref = (SimpleMenuPreference)
                    findPreference(KEY_CLOCK_STYLE);
            clockStylePref.setSummary(clockStylePref.getEntry());
            clockStylePref.setOnPreferenceChangeListener(this);
++ //            final SimpleMenuPreference volumeButtonsPref = (SimpleMenuPreference)
++ //                    findPreference(KEY_VOLUME_BUTTONS);
++ //            volumeButtonsPref.setSummary(volumeButtonsPref.getEntry());
++ //            volumeButtonsPref.setOnPreferenceChangeListener(this);
}
  final Preference clockSecondsPref = findPreference(KEY_CLOCK_DISPLAY_SECONDS);
            clockSecondsPref.setOnPreferenceChangeListener(this);
  @Override
        public void onCreatePreferences(Bundle bundle, String rootKey) {
            getPreferenceManager().setStorageDeviceProtected();
            addPreferencesFromResource(R.xml.settings);
            final Preference timerVibrate = findPreference(KEY_TIMER_VIBRATE);
            final boolean hasVibrator = ((Vibrator) timerVibrate.getContext()
                    .getSystemService(VIBRATOR_SERVICE)).hasVibrator();
           timerVibrate.setVisible(hasVibrator);
++            //timerVibrate.setVisible(false);
            loadTimeZoneList();
        }
上一篇:[Nginx]在线给nginx添加模块


下一篇:bzoj 1493 暴力