diff options
| author | Adnan <adnan@cyngn.com> | 2014-11-12 12:16:57 -0800 |
|---|---|---|
| committer | Matt Garnes <matt@cyngn.com> | 2014-11-12 12:16:57 -0800 |
| commit | 4717db97377abc6c7944336ccf0a37c57b732b21 (patch) | |
| tree | 9fdb5a05d77734c7b1cbc2c922cd8b18aa1aef80 | |
| parent | 9e1216c0f9c94611777e8baf5790917f9a8e2ce0 (diff) | |
| download | packages_apps_Contacts-4717db97377abc6c7944336ccf0a37c57b732b21.tar.gz packages_apps_Contacts-4717db97377abc6c7944336ccf0a37c57b732b21.tar.bz2 packages_apps_Contacts-4717db97377abc6c7944336ccf0a37c57b732b21.zip | |
ContactsCommon: Add direct call from contact list feature (2/2)
- Requires cmcc overlay flag to be set in Contacts.
Change-Id: I014240c6d70db904f6ae027cd168cebe2d5c2977
| -rwxr-xr-x[-rw-r--r--] | AndroidManifest.xml | 1 | ||||
| -rwxr-xr-x | res/values/config.xml | 19 | ||||
| -rw-r--r-- | res/values/styles.xml | 1 | ||||
| -rwxr-xr-x[-rw-r--r--] | src/com/android/contacts/activities/PeopleActivity.java | 3 |
4 files changed, 24 insertions, 0 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4ad944bf3..128627a47 100644..100755 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -21,6 +21,7 @@ <original-package android:name="com.android.contacts" /> <uses-permission android:name="android.permission.CALL_PHONE" /> + <uses-permission android:name="android.permission.CALL_PRIVILEGED" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_CONTACTS" /> <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /> diff --git a/res/values/config.xml b/res/values/config.xml new file mode 100755 index 000000000..439564caa --- /dev/null +++ b/res/values/config.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The CyanogenMod 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> + <!-- CMCC feature --> + <bool name="config_show_quick_call_button" translatable="false">true</bool> +</resources>
\ No newline at end of file diff --git a/res/values/styles.xml b/res/values/styles.xml index e2bf0aaae..8b058fa75 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -88,6 +88,7 @@ <item name="list_item_presence_icon_margin">4dip</item> <item name="list_item_presence_icon_size">16dip</item> <item name="list_item_photo_size">@dimen/contact_browser_list_item_photo_size</item> + <item name="list_item_quick_call_size">48dip</item> <item name="list_item_profile_photo_size">70dip</item> <item name="list_item_prefix_highlight_color">@color/people_app_theme_color</item> <item name="list_item_background_color">@color/list_item_pinned_header_color</item> diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java index 40f483e45..4e2636224 100644..100755 --- a/src/com/android/contacts/activities/PeopleActivity.java +++ b/src/com/android/contacts/activities/PeopleActivity.java @@ -900,6 +900,9 @@ public class PeopleActivity extends ContactsActivity implements mAllFragment.setVerticalScrollbarPosition(getScrollBarPosition()); mAllFragment.setSelectionVisible(false); + final boolean cmccFeature = getResources(). + getBoolean(R.bool.config_show_quick_call_button); + mAllFragment.setQuickCallButtonEnabled(cmccFeature); } private int getScrollBarPosition() { |
