Merge "Show a toast message for apps not supporting multiple instances split" into tm-qpr-dev
This commit is contained in:
@@ -66,8 +66,10 @@
|
|||||||
<!-- Multi-Window strings -->
|
<!-- Multi-Window strings -->
|
||||||
<!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity to be displayed in split-screen and that things might crash/not work properly [CHAR LIMIT=NONE] -->
|
<!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity to be displayed in split-screen and that things might crash/not work properly [CHAR LIMIT=NONE] -->
|
||||||
<string name="dock_forced_resizable">App may not work with split-screen.</string>
|
<string name="dock_forced_resizable">App may not work with split-screen.</string>
|
||||||
<!-- Warning message when we try to dock a non-resizeable task and launch it in fullscreen instead. -->
|
<!-- Warning message when we try to dock a non-resizeable task and launch it in fullscreen instead [CHAR LIMIT=NONE] -->
|
||||||
<string name="dock_non_resizeble_failed_to_dock_text">App does not support split-screen.</string>
|
<string name="dock_non_resizeble_failed_to_dock_text">App does not support split-screen.</string>
|
||||||
|
<!-- Warning message when we try to dock an app not supporting multiple instances split into multiple sides [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="dock_multi_instances_not_supported_text">This app can only be opened in 1 window.</string>
|
||||||
<!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity to be displayed on a secondary display and that things might crash/not work properly [CHAR LIMIT=NONE] -->
|
<!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity to be displayed on a secondary display and that things might crash/not work properly [CHAR LIMIT=NONE] -->
|
||||||
<string name="forced_resizable_secondary_display">App may not work on a secondary display.</string>
|
<string name="forced_resizable_secondary_display">App may not work on a secondary display.</string>
|
||||||
<!-- Warning message when we try to launch a non-resizeable activity on a secondary display and launch it on the primary instead. -->
|
<!-- Warning message when we try to launch a non-resizeable activity on a secondary display and launch it on the primary instead. -->
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ import android.view.RemoteAnimationTarget;
|
|||||||
import android.view.SurfaceControl;
|
import android.view.SurfaceControl;
|
||||||
import android.view.SurfaceSession;
|
import android.view.SurfaceSession;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.widget.Toast;
|
||||||
import android.window.RemoteTransition;
|
import android.window.RemoteTransition;
|
||||||
import android.window.WindowContainerTransaction;
|
import android.window.WindowContainerTransaction;
|
||||||
|
|
||||||
@@ -597,6 +598,10 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
|
|||||||
} else if (isSplitScreenVisible()) {
|
} else if (isSplitScreenVisible()) {
|
||||||
mStageCoordinator.switchSplitPosition("startIntent");
|
mStageCoordinator.switchSplitPosition("startIntent");
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
Toast.makeText(mContext, R.string.dock_multi_instances_not_supported_text,
|
||||||
|
Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user