diff options
author | Yorke Lee <yorkelee@google.com> | 2015-02-19 09:08:08 -0800 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-02-19 19:00:54 +0000 |
commit | a0c11ee3b8e2a92243b58f587c0398e1c58d2b0e (patch) | |
tree | 0813c155512543a6b9ac3473e66c4fd297efe408 | |
parent | 97fc7e48b100b82848e6e49eaac22027cb842ed1 (diff) |
Fix for solid blue screen if CircularRevealActivity is not finished
If the ActivityManager doesn't finish and destroy
CircularRevealActivity automatically it can trigger onNewIntent on
the activity instead of onCreate the next time a call is started.
Make sure to handle that case as well.
Bug: 19428365
Change-Id: If051ebd449a7deddfdc60ae856e9e1a0f3cda77d
-rw-r--r-- | InCallUI/src/com/android/incallui/CircularRevealActivity.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/CircularRevealActivity.java b/InCallUI/src/com/android/incallui/CircularRevealActivity.java index 7a9b7ccbf..4dc58baa8 100644 --- a/InCallUI/src/com/android/incallui/CircularRevealActivity.java +++ b/InCallUI/src/com/android/incallui/CircularRevealActivity.java @@ -59,9 +59,7 @@ public class CircularRevealActivity extends Activity { super.onCreate(savedInstanceState); overridePendingTransition(0, 0); setContentView(R.layout.outgoing_call_animation); - final Point touchPoint = getIntent().getParcelableExtra(TouchPointManager.TOUCH_POINT); - final MaterialPalette palette = getIntent().getParcelableExtra(EXTRA_THEME_COLORS); - setupDecorView(touchPoint, palette); + prepareDecorViewFromIntent(getIntent()); } @Override @@ -81,6 +79,18 @@ public class CircularRevealActivity extends Activity { super.onStop(); } + @Override + protected void onNewIntent(Intent intent) { + setIntent(intent); + prepareDecorViewFromIntent(intent); + } + + private void prepareDecorViewFromIntent(Intent intent) { + final Point touchPoint = intent.getParcelableExtra(TouchPointManager.TOUCH_POINT); + final MaterialPalette palette = intent.getParcelableExtra(EXTRA_THEME_COLORS); + setupDecorView(touchPoint, palette); + } + private void setupDecorView(final Point touchPoint, MaterialPalette palette) { final View view = getWindow().getDecorView(); |