Loading java/com/android/dialer/app/calllog/CallLogFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ public class CallLogFragment extends Fragment @Override public void fetchCalls() { callLogQueryHandler.fetchCalls(callTypeFilter, dateLimit); if (!isCallLogActivity) { if (!isCallLogActivity && getActivity() != null && !getActivity().isFinishing()) { FragmentUtils.getParentUnsafe(this, CallLogFragmentListener.class).updateTabUnreadCounts(); } } Loading java/com/android/dialer/dialpadview/DialpadFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -393,7 +393,9 @@ public class DialpadFragment extends Fragment digits.addTextChangedListener(this); digits.setElegantTextHeight(false); if (!MotorolaUtils.shouldDisablePhoneNumberFormatting(getContext())) { initPhoneNumberFormattingTextWatcherExecutor.executeSerial(getCurrentCountryIso()); } // Check for the presence of the keypad View oneButton = fragmentView.findViewById(R.id.one); Loading java/com/android/dialer/oem/MotorolaUtils.java +19 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,9 @@ public class MotorolaUtils { private static final String CONFIG_WIFI_CALL_SHOW_ICON_IN_CALL_LOG_ENABLED = "wifi_call_show_icon_in_call_log_enabled"; @VisibleForTesting static final String CONFIG_DISABLE_PHONE_NUMBER_FORMATTING = "disable_phone_number_formatting"; // This is used to check if a Motorola device supports HD voice call feature, which comes from // system feature setting. private static final String HD_CALL_FEATRURE = "com.motorola.software.sprint.hd_call"; Loading @@ -46,6 +49,7 @@ public class MotorolaUtils { @VisibleForTesting static final String HIDDEN_MENU_FEATURE = "com.motorola.software.sprint.hidden_menu"; private static Boolean disablePhoneNumberFormattingForTest = null; private static boolean hasCheckedSprintWifiCall; private static boolean supportSprintWifiCall; Loading Loading @@ -87,6 +91,16 @@ public class MotorolaUtils { && isSupportingSprintWifiCall(context); } public static boolean shouldDisablePhoneNumberFormatting(Context context) { if (disablePhoneNumberFormattingForTest != null) { return disablePhoneNumberFormattingForTest; } return ConfigProviderBindings.get(context) .getBoolean(CONFIG_DISABLE_PHONE_NUMBER_FORMATTING, true) && context.getResources().getBoolean(R.bool.motorola_disable_phone_number_formatting); } /** * Handle special char sequence entered in dialpad. This may launch special intent based on input. * Loading Loading @@ -129,6 +143,11 @@ public class MotorolaUtils { return supportSprintWifiCall; } @VisibleForTesting(otherwise = VisibleForTesting.NONE) public static void setDisablePhoneNumberFormattingForTest(boolean disablePhoneNumberFormatting) { disablePhoneNumberFormattingForTest = disablePhoneNumberFormatting; } @VisibleForTesting public static void resetForTest() { hasCheckedSprintWifiCall = false; Loading java/com/android/dialer/oem/res/values-mcc334/motorola_config.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2018 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> <!-- Flag to control whether to disable phone number formatting --> <bool name="motorola_disable_phone_number_formatting">true</bool> </resources> java/com/android/dialer/oem/res/values-mcc338/motorola_config.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2018 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> <!-- Flag to control whether to disable phone number formatting --> <bool name="motorola_disable_phone_number_formatting">true</bool> </resources> Loading
java/com/android/dialer/app/calllog/CallLogFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ public class CallLogFragment extends Fragment @Override public void fetchCalls() { callLogQueryHandler.fetchCalls(callTypeFilter, dateLimit); if (!isCallLogActivity) { if (!isCallLogActivity && getActivity() != null && !getActivity().isFinishing()) { FragmentUtils.getParentUnsafe(this, CallLogFragmentListener.class).updateTabUnreadCounts(); } } Loading
java/com/android/dialer/dialpadview/DialpadFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -393,7 +393,9 @@ public class DialpadFragment extends Fragment digits.addTextChangedListener(this); digits.setElegantTextHeight(false); if (!MotorolaUtils.shouldDisablePhoneNumberFormatting(getContext())) { initPhoneNumberFormattingTextWatcherExecutor.executeSerial(getCurrentCountryIso()); } // Check for the presence of the keypad View oneButton = fragmentView.findViewById(R.id.one); Loading
java/com/android/dialer/oem/MotorolaUtils.java +19 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,9 @@ public class MotorolaUtils { private static final String CONFIG_WIFI_CALL_SHOW_ICON_IN_CALL_LOG_ENABLED = "wifi_call_show_icon_in_call_log_enabled"; @VisibleForTesting static final String CONFIG_DISABLE_PHONE_NUMBER_FORMATTING = "disable_phone_number_formatting"; // This is used to check if a Motorola device supports HD voice call feature, which comes from // system feature setting. private static final String HD_CALL_FEATRURE = "com.motorola.software.sprint.hd_call"; Loading @@ -46,6 +49,7 @@ public class MotorolaUtils { @VisibleForTesting static final String HIDDEN_MENU_FEATURE = "com.motorola.software.sprint.hidden_menu"; private static Boolean disablePhoneNumberFormattingForTest = null; private static boolean hasCheckedSprintWifiCall; private static boolean supportSprintWifiCall; Loading Loading @@ -87,6 +91,16 @@ public class MotorolaUtils { && isSupportingSprintWifiCall(context); } public static boolean shouldDisablePhoneNumberFormatting(Context context) { if (disablePhoneNumberFormattingForTest != null) { return disablePhoneNumberFormattingForTest; } return ConfigProviderBindings.get(context) .getBoolean(CONFIG_DISABLE_PHONE_NUMBER_FORMATTING, true) && context.getResources().getBoolean(R.bool.motorola_disable_phone_number_formatting); } /** * Handle special char sequence entered in dialpad. This may launch special intent based on input. * Loading Loading @@ -129,6 +143,11 @@ public class MotorolaUtils { return supportSprintWifiCall; } @VisibleForTesting(otherwise = VisibleForTesting.NONE) public static void setDisablePhoneNumberFormattingForTest(boolean disablePhoneNumberFormatting) { disablePhoneNumberFormattingForTest = disablePhoneNumberFormatting; } @VisibleForTesting public static void resetForTest() { hasCheckedSprintWifiCall = false; Loading
java/com/android/dialer/oem/res/values-mcc334/motorola_config.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2018 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> <!-- Flag to control whether to disable phone number formatting --> <bool name="motorola_disable_phone_number_formatting">true</bool> </resources>
java/com/android/dialer/oem/res/values-mcc338/motorola_config.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2018 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> <!-- Flag to control whether to disable phone number formatting --> <bool name="motorola_disable_phone_number_formatting">true</bool> </resources>