summaryrefslogtreecommitdiffstats
path: root/java/com/android/dialer/oem
diff options
context:
space:
mode:
authorwangqi <wangqi@google.com>2017-09-22 16:22:16 -0700
committerEric Erfanian <erfanian@google.com>2017-09-25 08:51:11 -0700
commit1e80bdd0a34901d8ccd3c097e2e39cd357d939d1 (patch)
treefdf5a33c05237b8d1ae77575528a2c810707ba8f /java/com/android/dialer/oem
parent0cee101082da924205f349995c55ef14959bacac (diff)
downloadandroid_packages_apps_Dialer-1e80bdd0a34901d8ccd3c097e2e39cd357d939d1.tar.gz
android_packages_apps_Dialer-1e80bdd0a34901d8ccd3c097e2e39cd357d939d1.tar.bz2
android_packages_apps_Dialer-1e80bdd0a34901d8ccd3c097e2e39cd357d939d1.zip
Update HD and Wifi feature of call log to use framework API.
Bug: 35359461 Test: none PiperOrigin-RevId: 169752834 Change-Id: If78723774babb86a55e07d4b94d9f1d784791b76
Diffstat (limited to 'java/com/android/dialer/oem')
-rw-r--r--java/com/android/dialer/oem/MotorolaUtils.java13
1 files changed, 4 insertions, 9 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);
}