Let activity resume after bubbles expanded
Add moveTaskToFront call to ensure activity resume when bubbles expanded which means activityView status is activity started. Bug: 152416787 Test: Check event log Test: Open FB messengers, expand FB messengers bubbles and click back Change-Id: I9f95e42a4573185df83c0e7438972fea84bbb176
This commit is contained in:
@@ -35,6 +35,7 @@ import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_BUBBLES;
|
||||
import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityOptions;
|
||||
import android.app.ActivityTaskManager;
|
||||
import android.app.ActivityView;
|
||||
@@ -126,6 +127,7 @@ public class BubbleExpandedView extends LinearLayout {
|
||||
|
||||
private BubbleController mBubbleController = Dependency.get(BubbleController.class);
|
||||
private WindowManager mWindowManager;
|
||||
private ActivityManager mActivityManager;
|
||||
|
||||
private BubbleStackView mStackView;
|
||||
private View mVirtualImeView;
|
||||
@@ -186,6 +188,10 @@ public class BubbleExpandedView extends LinearLayout {
|
||||
}
|
||||
});
|
||||
mActivityViewStatus = ActivityViewStatus.ACTIVITY_STARTED;
|
||||
break;
|
||||
case ACTIVITY_STARTED:
|
||||
post(() -> mActivityManager.moveTaskToFront(mTaskId, 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,6 +253,7 @@ public class BubbleExpandedView extends LinearLayout {
|
||||
int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
updateDimensions();
|
||||
mActivityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
}
|
||||
|
||||
void updateDimensions() {
|
||||
|
||||
Reference in New Issue
Block a user