diff options
author | Eric Erfanian <erfanian@google.com> | 2017-10-17 15:43:46 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-10-17 15:43:46 -0700 |
commit | 30b973450f12cf0b694c7bf06018830a698ce40a (patch) | |
tree | 42d6ec4551d925c039f931355d9f9d858dadc3d8 /java/com/android/dialer/assisteddialing/ui | |
parent | c2590357cf857e714f875f2a7c222d1bd128c2c5 (diff) |
Add temporary assisted dialing setting to Dialer.
Bug: 63994464
Test: integration test
PiperOrigin-RevId: 172499750
Change-Id: I7a7c23b403f649c1bbec0bb068e1285e02fddd22
Diffstat (limited to 'java/com/android/dialer/assisteddialing/ui')
4 files changed, 106 insertions, 0 deletions
diff --git a/java/com/android/dialer/assisteddialing/ui/AndroidManifest.xml b/java/com/android/dialer/assisteddialing/ui/AndroidManifest.xml new file mode 100644 index 000000000..6625dff07 --- /dev/null +++ b/java/com/android/dialer/assisteddialing/ui/AndroidManifest.xml @@ -0,0 +1,22 @@ +<!-- Copyright (C) 2017 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.dialer.assisteddialing"> + + <uses-sdk + android:minSdkVersion="23" + android:targetSdkVersion="24"/> + +</manifest>
\ No newline at end of file diff --git a/java/com/android/dialer/assisteddialing/ui/AssistedDialingSettingFragment.java b/java/com/android/dialer/assisteddialing/ui/AssistedDialingSettingFragment.java new file mode 100644 index 000000000..8847448cd --- /dev/null +++ b/java/com/android/dialer/assisteddialing/ui/AssistedDialingSettingFragment.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ +package com.android.dialer.assisteddialing.ui; + +import android.os.Bundle; +import android.preference.PreferenceFragment; + +/** The setting for Assisted Dialing */ +public class AssistedDialingSettingFragment extends PreferenceFragment { + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // Load the preferences from an XML resource + addPreferencesFromResource(R.xml.assisted_dialing_setting); + } +} diff --git a/java/com/android/dialer/assisteddialing/ui/res/values/string.xml b/java/com/android/dialer/assisteddialing/ui/res/values/string.xml new file mode 100644 index 000000000..cd159bfd5 --- /dev/null +++ b/java/com/android/dialer/assisteddialing/ui/res/values/string.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> + +<resources> + <!-- Label for a setting enabling assisted dialing [CHAR LIMIT=40]--> + <string name="assisted_dialing_setting_title">Assisted dialing</string> + + <!-- Label for a setting enabling assisted dialing switch preference--> + <string name="assisted_dialing_setting_summary">Automatically correct the phone number prefix when traveling and calling international numbers</string> + + <!-- Key for the assisted dialing setting toggle--> + <string name="assisted_dialing_setting_toggle_key" translatable="false">assisted_dialing_setting_toggle_key</string> +</resources>
\ No newline at end of file diff --git a/java/com/android/dialer/assisteddialing/ui/res/xml/assisted_dialing_setting.xml b/java/com/android/dialer/assisteddialing/ui/res/xml/assisted_dialing_setting.xml new file mode 100644 index 000000000..8e3c62dde --- /dev/null +++ b/java/com/android/dialer/assisteddialing/ui/res/xml/assisted_dialing_setting.xml @@ -0,0 +1,26 @@ +<!-- + ~ Copyright (C) 2017 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<PreferenceScreen + xmlns:android="http://schemas.android.com/apk/res/android"> + + <SwitchPreference + android:defaultValue="false" + android:key="@string/assisted_dialing_setting_toggle_key" + android:title="@string/assisted_dialing_setting_title" + android:summary="@string/assisted_dialing_setting_summary" /> + +</PreferenceScreen>
\ No newline at end of file |