Merge "Add config for registering shell task organizer" into tm-qpr-dev
This commit is contained in:
@@ -19,6 +19,10 @@
|
|||||||
by the resources of the app using the Shell library. -->
|
by the resources of the app using the Shell library. -->
|
||||||
<bool name="config_enableShellMainThread">false</bool>
|
<bool name="config_enableShellMainThread">false</bool>
|
||||||
|
|
||||||
|
<!-- Determines whether to register the shell task organizer on init.
|
||||||
|
TODO(b/238217847): This config is temporary until we refactor the base WMComponent. -->
|
||||||
|
<bool name="config_registerShellTaskOrganizerOnInit">true</bool>
|
||||||
|
|
||||||
<!-- Animation duration for PIP when entering. -->
|
<!-- Animation duration for PIP when entering. -->
|
||||||
<integer name="config_pipEnterAnimationDuration">425</integer>
|
<integer name="config_pipEnterAnimationDuration">425</integer>
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import android.view.WindowManager;
|
|||||||
import com.android.internal.logging.UiEventLogger;
|
import com.android.internal.logging.UiEventLogger;
|
||||||
import com.android.launcher3.icons.IconProvider;
|
import com.android.launcher3.icons.IconProvider;
|
||||||
import com.android.wm.shell.ProtoLogController;
|
import com.android.wm.shell.ProtoLogController;
|
||||||
|
import com.android.wm.shell.R;
|
||||||
import com.android.wm.shell.RootDisplayAreaOrganizer;
|
import com.android.wm.shell.RootDisplayAreaOrganizer;
|
||||||
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
|
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
|
||||||
import com.android.wm.shell.ShellTaskOrganizer;
|
import com.android.wm.shell.ShellTaskOrganizer;
|
||||||
@@ -173,6 +174,7 @@ public abstract class WMShellBaseModule {
|
|||||||
@WMSingleton
|
@WMSingleton
|
||||||
@Provides
|
@Provides
|
||||||
static ShellTaskOrganizer provideShellTaskOrganizer(
|
static ShellTaskOrganizer provideShellTaskOrganizer(
|
||||||
|
Context context,
|
||||||
ShellInit shellInit,
|
ShellInit shellInit,
|
||||||
ShellCommandHandler shellCommandHandler,
|
ShellCommandHandler shellCommandHandler,
|
||||||
CompatUIController compatUI,
|
CompatUIController compatUI,
|
||||||
@@ -180,6 +182,10 @@ public abstract class WMShellBaseModule {
|
|||||||
Optional<RecentTasksController> recentTasksOptional,
|
Optional<RecentTasksController> recentTasksOptional,
|
||||||
@ShellMainThread ShellExecutor mainExecutor
|
@ShellMainThread ShellExecutor mainExecutor
|
||||||
) {
|
) {
|
||||||
|
if (!context.getResources().getBoolean(R.bool.config_registerShellTaskOrganizerOnInit)) {
|
||||||
|
// TODO(b/238217847): Force override shell init if registration is disabled
|
||||||
|
shellInit = new ShellInit(mainExecutor);
|
||||||
|
}
|
||||||
return new ShellTaskOrganizer(shellInit, shellCommandHandler, compatUI,
|
return new ShellTaskOrganizer(shellInit, shellCommandHandler, compatUI,
|
||||||
unfoldAnimationController, recentTasksOptional, mainExecutor);
|
unfoldAnimationController, recentTasksOptional, mainExecutor);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user