Finish blocking activity when it goes invisible.
This way we avoid potential stale string when the blocking activity is
re-surfaced.
Change-Id: Ife17ef765822797be87f49942e143656319d5b47
Fixes: 113126734
Test: tested on device
(cherry picked from commit fdfeeb087c4a5d50f2b33eb6a6f09c4b6ac933cb)
diff --git a/service/src/com/android/car/pm/ActivityBlockingActivity.java b/service/src/com/android/car/pm/ActivityBlockingActivity.java
index fd792a6..aabdb72 100644
--- a/service/src/com/android/car/pm/ActivityBlockingActivity.java
+++ b/service/src/com/android/car/pm/ActivityBlockingActivity.java
@@ -197,6 +197,14 @@
}
@Override
+ protected void onStop() {
+ super.onStop();
+ // Finish when blocking activity goes invisible to avoid it accidentally re-surfaces with
+ // stale string regarding blocked activity.
+ finish();
+ }
+
+ @Override
protected void onDestroy() {
super.onDestroy();
if (mCar.isConnected() && mUxRManager != null) {