Merge "Let activity resume after bubbles expanded" into rvc-dev
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 static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.ActivityManager;
|
||||||
import android.app.ActivityOptions;
|
import android.app.ActivityOptions;
|
||||||
import android.app.ActivityTaskManager;
|
import android.app.ActivityTaskManager;
|
||||||
import android.app.ActivityView;
|
import android.app.ActivityView;
|
||||||
@@ -126,6 +127,7 @@ public class BubbleExpandedView extends LinearLayout {
|
|||||||
|
|
||||||
private BubbleController mBubbleController = Dependency.get(BubbleController.class);
|
private BubbleController mBubbleController = Dependency.get(BubbleController.class);
|
||||||
private WindowManager mWindowManager;
|
private WindowManager mWindowManager;
|
||||||
|
private ActivityManager mActivityManager;
|
||||||
|
|
||||||
private BubbleStackView mStackView;
|
private BubbleStackView mStackView;
|
||||||
private View mVirtualImeView;
|
private View mVirtualImeView;
|
||||||
@@ -191,6 +193,10 @@ public class BubbleExpandedView extends LinearLayout {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
mActivityViewStatus = ActivityViewStatus.ACTIVITY_STARTED;
|
mActivityViewStatus = ActivityViewStatus.ACTIVITY_STARTED;
|
||||||
|
break;
|
||||||
|
case ACTIVITY_STARTED:
|
||||||
|
post(() -> mActivityManager.moveTaskToFront(mTaskId, 0));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,6 +258,7 @@ public class BubbleExpandedView extends LinearLayout {
|
|||||||
int defStyleRes) {
|
int defStyleRes) {
|
||||||
super(context, attrs, defStyleAttr, defStyleRes);
|
super(context, attrs, defStyleAttr, defStyleRes);
|
||||||
updateDimensions();
|
updateDimensions();
|
||||||
|
mActivityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateDimensions() {
|
void updateDimensions() {
|
||||||
|
|||||||
Reference in New Issue
Block a user