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

Commit 1dfd0154 authored by Yorke Lee's avatar Yorke Lee Committed by The Android Automerger
Browse files

Fix crash in Dialer in landscape mode

Bug 9369806

Change-Id: I286ebb828c0f6ce7c005c541661b9aa67284847e
parent 3a18654b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -368,7 +368,8 @@ public class DialpadFragment extends Fragment
        mDialpadChooser = (ListView) fragmentView.findViewById(R.id.dialpadChooser);
        mDialpadChooser.setOnItemClickListener(this);

        // Smart dial
        // Smart dial container. This is null if in landscape mode since it is not present
        // in the landscape dialer layout.
        mSmartDialContainer = (RelativeLayout) fragmentView.findViewById(
                R.id.dialpad_smartdial_container);

@@ -556,7 +557,7 @@ public class DialpadFragment extends Fragment

        // retrieve dialpad autocomplete setting
        mSmartDialEnabled = Settings.Secure.getInt(contentResolver,
                Settings.Secure.DIALPAD_AUTOCOMPLETE, 0) == 1;
                Settings.Secure.DIALPAD_AUTOCOMPLETE, 0) == 1 && mSmartDialContainer != null;

        stopWatch.lap("dtwd");

@@ -1731,7 +1732,9 @@ public class DialpadFragment extends Fragment
                mSmartDialCache.cacheIfNeeded(true);
            }
        } else {
            if (mSmartDialContainer != null) {
                mSmartDialContainer.setVisibility(View.GONE);
            }
            mSmartDialCache = null;
        }
    }