From 3151f53974425c6b07c12e94eb4e6f4ab72818bc Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 21 Oct 2015 14:00:31 -0700 Subject: Prevent fragment rotation crashes. Also, causes right fragment to retain after rotation and recreation. Bug: 25154818 Bug: 24910704 Change-Id: Icafbc7ba6f3ad877c2d28d92e510b9afbd822b65 --- .../android/dialer/filterednumber/ManageBlockedNumbersActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java b/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java index 581ff98b5..f785cf77a 100644 --- a/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java +++ b/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java @@ -49,7 +49,10 @@ public class ManageBlockedNumbersActivity extends AppCompatActivity super.onCreate(savedInstanceState); setContentView(R.layout.blocked_numbers_activity); - showManagementUi(); + // If savedInstanceState != null, the Activity will automatically restore the last fragment. + if (savedInstanceState == null) { + showManagementUi(); + } } public void showManagementUi() { -- cgit v1.2.3