mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Add ActivityOptions for SecondDisplayLaucher to launch activity
Currently, SecondDisplayLauncher doesn't specify ActivityOption to
launch on second display, so application will launch on main display
even the user tries to launch APP from SecondDisplayLauncher.
So need to specify ActivityOption then activity can launch on the correct
display
Bug: 162042798
Test: manual testing
Change-Id: Iceb4e01b725834983a5d01cf54350f61851ad172
(cherry picked from commit 3a8075366c)
This commit is contained in:
@@ -20,6 +20,7 @@ import android.animation.AnimatorListenerAdapter;
|
||||
import android.app.ActivityOptions;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Display;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewAnimationUtils;
|
||||
@@ -168,7 +169,9 @@ public class SecondaryDisplayLauncher extends BaseDraggingActivity
|
||||
|
||||
@Override
|
||||
public ActivityOptions getActivityLaunchOptions(View v) {
|
||||
return null;
|
||||
final Display display = getWindow().getDecorView().getDisplay();
|
||||
return display != null ? ActivityOptions.makeBasic().setLaunchDisplayId(
|
||||
display.getDisplayId()) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user