diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-09-25 17:31:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-25 17:31:27 +0000 |
commit | cf882d5b703b965c0338cbca3adb18993671b1f0 (patch) | |
tree | fdf5a33c05237b8d1ae77575528a2c810707ba8f /java | |
parent | 0da8a41123f1c8a54623a41252010a7e7f3fadce (diff) | |
parent | 1e80bdd0a34901d8ccd3c097e2e39cd357d939d1 (diff) |
Merge changes If7872377,Ie255f0d9
* changes:
Update HD and Wifi feature of call log to use framework API.
Updated image asset in location permission request.
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/oem/MotorolaUtils.java | 13 | ||||
-rw-r--r-- | java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-hdpi/business_asset.png | bin | 0 -> 2150 bytes | |||
-rw-r--r-- | java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-mdpi/business_asset.png | bin | 0 -> 1389 bytes | |||
-rw-r--r-- | java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xhdpi/business_asset.png | bin | 0 -> 3047 bytes | |||
-rw-r--r-- | java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xxhdpi/business_asset.png | bin | 0 -> 4668 bytes | |||
-rw-r--r-- | java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xxxhdpi/business_asset.png | bin | 0 -> 6636 bytes | |||
-rw-r--r-- | java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml | 22 |
7 files changed, 16 insertions, 19 deletions
diff --git a/java/com/android/dialer/oem/MotorolaUtils.java b/java/com/android/dialer/oem/MotorolaUtils.java index ffab8ea23..5f5bde61a 100644 --- a/java/com/android/dialer/oem/MotorolaUtils.java +++ b/java/com/android/dialer/oem/MotorolaUtils.java @@ -17,6 +17,7 @@ package com.android.dialer.oem; import android.content.Context; import android.content.res.Resources; +import android.provider.CallLog.Calls; import android.telephony.TelephonyManager; import com.android.dialer.common.LogUtil; import com.android.dialer.common.PackageUtils; @@ -45,12 +46,6 @@ public class MotorolaUtils { // Thi is used to check if a Motorola device supports hidden menu feature. private static final String HIDDEN_MENU_FEATURE = "com.motorola.software.sprint.hidden_menu"; - // Feature flag indicates it's a HD call, currently this is only used by Motorola system build. - // TODO(b/35359461): Use reference to android.provider.CallLog once it's in new SDK. - private static final int FEATURES_HD_CALL = 0x4; - // Feature flag indicates it's a WiFi call, currently this is only used by Motorola system build. - private static final int FEATURES_WIFI = 0x8; - private static boolean hasCheckedSprintWifiCall; private static boolean supportSprintWifiCall; @@ -58,7 +53,7 @@ public class MotorolaUtils { * Returns true if SPN is specified and matched the current sim operator name. This is necessary * since mcc310-mnc000 is not sufficient to identify Sprint network. */ - static boolean isSpnMatched(Context context) { + private static boolean isSpnMatched(Context context) { try { String spnResource = context.getResources().getString(R.string.motorola_enabled_spn); return spnResource.equalsIgnoreCase( @@ -88,14 +83,14 @@ public class MotorolaUtils { public static boolean shouldShowHdIconInCallLog(Context context, int features) { return ConfigProviderBindings.get(context) .getBoolean(CONFIG_HD_CODEC_SHOW_ICON_IN_CALL_LOG_ENABLED, true) - && (features & FEATURES_HD_CALL) == FEATURES_HD_CALL + && (features & Calls.FEATURES_HD_CALL) == Calls.FEATURES_HD_CALL && isSupportingSprintHdCodec(context); } public static boolean shouldShowWifiIconInCallLog(Context context, int features) { return ConfigProviderBindings.get(context) .getBoolean(CONFIG_WIFI_CALL_SHOW_ICON_IN_CALL_LOG_ENABLED, true) - && (features & FEATURES_WIFI) == FEATURES_WIFI + && (features & Calls.FEATURES_WIFI) == Calls.FEATURES_WIFI && isSupportingSprintWifiCall(context); } diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-hdpi/business_asset.png b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-hdpi/business_asset.png Binary files differnew file mode 100644 index 000000000..56f666436 --- /dev/null +++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-hdpi/business_asset.png diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-mdpi/business_asset.png b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-mdpi/business_asset.png Binary files differnew file mode 100644 index 000000000..1fc9a63e9 --- /dev/null +++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-mdpi/business_asset.png diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xhdpi/business_asset.png b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xhdpi/business_asset.png Binary files differnew file mode 100644 index 000000000..b217c3617 --- /dev/null +++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xhdpi/business_asset.png diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xxhdpi/business_asset.png b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xxhdpi/business_asset.png Binary files differnew file mode 100644 index 000000000..17c0b615e --- /dev/null +++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xxhdpi/business_asset.png diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xxxhdpi/business_asset.png b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xxxhdpi/business_asset.png Binary files differnew file mode 100644 index 000000000..99d6fbdf7 --- /dev/null +++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/drawable-xxxhdpi/business_asset.png diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml b/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml index 4204a4f1f..66a3e0c49 100644 --- a/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml +++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml @@ -19,16 +19,14 @@ android:layout_height="wrap_content" android:paddingStart="16dp" android:paddingEnd="16dp" - android:paddingTop="16dp" - android:paddingBottom="8dp"> + android:paddingTop="16dp"> <ImageView android:id="@+id/permission_image" android:layout_width="40dp" android:layout_height="40dp" android:layout_marginEnd="16dp" - android:src="@drawable/quantum_ic_my_location_vd_theme_24" - android:tint="@color/dialer_secondary_text_color"/> + android:src="@drawable/business_asset"/> <TextView android:id="@+id/permission_text" @@ -44,21 +42,25 @@ <Button android:id="@+id/location_permission_allow" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="52dp" android:layout_alignParentEnd="true" android:layout_below="@id/permission_text" - android:layout_marginTop="24dp" + android:layout_marginTop="16dp" + android:paddingTop="8dp" + android:paddingBottom="8dp" android:text="@string/nearby_places_allow"/> <Button android:id="@+id/location_permission_dismiss" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="52dp" android:layout_toStartOf="@+id/location_permission_allow" android:layout_below="@id/permission_text" - android:layout_marginEnd="16dp" - android:layout_marginTop="24dp" + android:layout_marginEnd="8dp" + android:layout_marginTop="16dp" + android:paddingTop="8dp" + android:paddingBottom="8dp" android:text="@string/nearby_places_dismiss" android:textColor="@color/dialer_theme_color" style="@style/Widget.AppCompat.Button.Borderless"/> -</RelativeLayout>
\ No newline at end of file +</RelativeLayout> |