diff options
| author | Adnan <adnan@cyngn.com> | 2014-10-21 20:43:16 +0300 |
|---|---|---|
| committer | doc HD <doc.divxm@gmail.com> | 2014-10-21 23:14:16 +0200 |
| commit | 25ca4d125ab5b7bc9ba027a1026a5f6def5261b0 (patch) | |
| tree | 463bfd9164627b8a807dba65e6c7727621043c4f | |
| parent | 5937bc168ac2a7249c7a65e60f047fa9040243b5 (diff) | |
Contacts: Add direct call from contact list feature. (2/2)kitkat
- Requires cmcc overlay flag to be set in Contacts.
PS2: Set config_show_quick_call_button to true
Change-Id: I014240c6d70db904f6ae027cd168cebe2d5c2977
| -rw-r--r-- | AndroidManifest.xml | 1 | ||||
| -rw-r--r-- | res/values-sw600dp-land/styles.xml | 1 | ||||
| -rw-r--r-- | res/values-sw600dp/styles.xml | 1 | ||||
| -rw-r--r-- | res/values-sw720dp/styles.xml | 1 | ||||
| -rw-r--r-- | res/values/config.xml | 19 | ||||
| -rw-r--r-- | res/values/styles.xml | 1 | ||||
| -rw-r--r-- | src/com/android/contacts/activities/PeopleActivity.java | 4 |
7 files changed, 27 insertions, 1 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index fbcc740db..f60705936 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -20,6 +20,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" /> diff --git a/res/values-sw600dp-land/styles.xml b/res/values-sw600dp-land/styles.xml index 01116d716..a7ff12813 100644 --- a/res/values-sw600dp-land/styles.xml +++ b/res/values-sw600dp-land/styles.xml @@ -37,6 +37,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">64dip</item> + <item name="list_item_quick_call_size">48dip</item> <item name="list_item_profile_photo_size">80dip</item> <item name="list_item_prefix_highlight_color">@color/people_app_theme_color</item> <item name="list_item_header_text_indent">8dip</item> diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml index 7ab909e08..505a342dc 100644 --- a/res/values-sw600dp/styles.xml +++ b/res/values-sw600dp/styles.xml @@ -38,6 +38,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">64dip</item> + <item name="list_item_quick_call_size">48dip</item> <item name="list_item_profile_photo_size">80dip</item> <item name="list_item_prefix_highlight_color">@color/people_app_theme_color</item> <item name="list_item_header_text_indent">8dip</item> diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml index 22653738d..6acc456ff 100644 --- a/res/values-sw720dp/styles.xml +++ b/res/values-sw720dp/styles.xml @@ -38,6 +38,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">64dip</item> + <item name="list_item_quick_call_size">48dip</item> <item name="list_item_profile_photo_size">80dip</item> <item name="list_item_prefix_highlight_color">@color/people_app_theme_color</item> <item name="list_item_header_text_indent">8dip</item> diff --git a/res/values/config.xml b/res/values/config.xml new file mode 100644 index 000000000..883c9240f --- /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> diff --git a/res/values/styles.xml b/res/values/styles.xml index 0c7c0eafe..6d9aa34a0 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -78,6 +78,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_header_text_color">@color/people_app_theme_color</item> diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java index 567d29195..d5867b277 100644 --- a/src/com/android/contacts/activities/PeopleActivity.java +++ b/src/com/android/contacts/activities/PeopleActivity.java @@ -998,10 +998,12 @@ public class PeopleActivity extends ContactsActivity mAllFragment.setFilter(mContactListFilterController.getFilter()); final boolean useTwoPane = PhoneCapabilityTester.isUsingTwoPanes(this); - + final boolean cmccFeature = getResources(). + getBoolean(R.bool.config_show_quick_call_button); mAllFragment.setVerticalScrollbarPosition(getScrollBarPosition(useTwoPane)); mAllFragment.setSelectionVisible(useTwoPane); mAllFragment.setQuickContactEnabled(!useTwoPane); + mAllFragment.setQuickCallButtonEnabled(cmccFeature && !useTwoPane); } private int getScrollBarPosition(boolean useTwoPane) { |
