diff options
author | Anne Rong <annerong@google.com> | 2015-09-21 18:16:02 -0700 |
---|---|---|
committer | Anne Rong <annerong@google.com> | 2015-09-21 18:16:02 -0700 |
commit | d994a776ad912c322a078b991fe6498c3f228d33 (patch) | |
tree | d43631e77aa11f0c0aa0ebff68940b5b23b11d5d | |
parent | 8dda5a08ea2b95b1c38b706366a963dcbf7907e2 (diff) |
Fix snackbar using out of scope View in blocked numbers list.
Bug: 24272126, 24273593
Change-Id: I79f3ffbc745a914a11f9a61e5f06bb87be9d54de
-rw-r--r-- | res/layout/blocked_number_fragment.xml | 1 | ||||
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockedNumberAdapter.java | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/res/layout/blocked_number_fragment.xml b/res/layout/blocked_number_fragment.xml index b1e4d0f57..bbface6de 100644 --- a/res/layout/blocked_number_fragment.xml +++ b/res/layout/blocked_number_fragment.xml @@ -15,6 +15,7 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" + android:id="@+id/blocked_number_fragment" android:orientation="vertical" android:background="@color/blocked_number_background" android:layout_width="match_parent" diff --git a/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java b/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java index 504b5205b..5041ed849 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java +++ b/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java @@ -89,7 +89,8 @@ public class BlockedNumberAdapter extends SimpleCursorAdapter { FilterNumberDialogFragment.newInstance(id, normalizedNumber, number, countryIso, displayNumber); newFragment.setQueryHandler(mFilteredNumberAsyncQueryHandler); - newFragment.setParentView(view); + newFragment.setParentView( + ((Activity) mContext).findViewById(R.id.blocked_number_fragment)); newFragment.show(((Activity) mContext).getFragmentManager(), FilterNumberDialogFragment.BLOCK_DIALOG_FRAGMENT); } |