Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30942055 authored by linyuh's avatar linyuh Committed by android-build-merger
Browse files

Merge changes I00d58071,I98cea86b

am: 74b03c70

Change-Id: I99002f8a9b300e1668cd732622309c2be35d517b
parents 4fd65fc0 74b03c70
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
    }
  }
+3 −1
Original line number Diff line number Diff line
@@ -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);
+19 −0
Original line number Diff line number Diff line
@@ -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";
@@ -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;

@@ -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.
   *
@@ -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;
+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>
+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