blob: 904be82b8715166593152e24db2a3e123d3dd85b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
package com.android.dialer.settings;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.preference.PreferenceActivity.Header;
import android.view.MenuItem;
import com.android.contacts.common.preference.DisplayOptionsPreferenceFragment;
import com.android.dialer.DialtactsActivity;
import com.android.dialer.R;
import java.util.List;
public class DialerSettingsActivity extends PreferenceActivity {
protected SharedPreferences mPreferences;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
}
@Override
public void onBuildHeaders(List<Header> target) {
final Header contactDisplayHeader = new Header();
contactDisplayHeader.titleRes = R.string.settings_contact_display_options_title;
contactDisplayHeader.summaryRes = R.string.settings_contact_display_options_description;
contactDisplayHeader.fragment = DisplayOptionsPreferenceFragment.class.getName();
target.add(contactDisplayHeader);
final Header callSettingHeader = new Header();
callSettingHeader.titleRes = R.string.call_settings_label;
callSettingHeader.summaryRes = R.string.call_settings_description;
callSettingHeader.intent = DialtactsActivity.getCallSettingsIntent();
target.add(callSettingHeader);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
return true;
}
return false;
}
@Override
protected boolean isValidFragment(String fragmentName) {
return true;
}
}
|