Enabling secondary deviceprofile creation in windowcontext
Test: Built and ran locally
Flag: com.android.launcher3.enable_fallback_overview_in_window
com.android.launcher3.enable_launcher_overview_in_window
Change-Id: Iafb75840c4acadb35eb9e89810e9de61bbeda326
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.quickstep.fallback.window
|
||||
import android.content.Context
|
||||
import android.graphics.PixelFormat
|
||||
import android.view.ContextThemeWrapper
|
||||
import android.view.Display
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
|
||||
@@ -62,7 +63,10 @@ open class RecentsWindowContext(windowContext: Context, wallpaperColorHints: Int
|
||||
}
|
||||
|
||||
fun initDeviceProfile() {
|
||||
deviceProfile = InvariantDeviceProfile.INSTANCE[this].getDeviceProfile(this)
|
||||
deviceProfile =
|
||||
if (displayId == Display.DEFAULT_DISPLAY)
|
||||
InvariantDeviceProfile.INSTANCE[this].getDeviceProfile(this)
|
||||
else InvariantDeviceProfile.INSTANCE[this].createDeviceProfileForSecondaryDisplay(this)
|
||||
}
|
||||
|
||||
override fun getDeviceProfile(): DeviceProfile {
|
||||
|
||||
@@ -81,7 +81,6 @@ import com.android.quickstep.views.RecentsViewContainer
|
||||
import com.android.systemui.shared.recents.model.ThumbnailData
|
||||
import com.android.systemui.shared.system.TaskStackChangeListener
|
||||
import com.android.systemui.shared.system.TaskStackChangeListeners
|
||||
import java.util.function.Predicate
|
||||
|
||||
/**
|
||||
* Class that will manage RecentsView lifecycle within a window and interface correctly where
|
||||
@@ -135,7 +134,6 @@ class RecentsWindowManager(context: Context, wallpaperColorHints: Int) :
|
||||
// Callback array that corresponds to events defined in @ActivityEvent
|
||||
private val eventCallbacks =
|
||||
listOf(RunnableList(), RunnableList(), RunnableList(), RunnableList())
|
||||
private var onInitListener: Predicate<Boolean>? = null
|
||||
|
||||
private val animationToHomeFactory =
|
||||
RemoteAnimationFactory {
|
||||
@@ -336,10 +334,6 @@ class RecentsWindowManager(context: Context, wallpaperColorHints: Int) :
|
||||
return taskbarUIController
|
||||
}
|
||||
|
||||
fun registerInitListener(onInitListener: Predicate<Boolean>) {
|
||||
this.onInitListener = onInitListener
|
||||
}
|
||||
|
||||
override fun collectStateHandlers(out: MutableList<StateManager.StateHandler<RecentsState?>>?) {
|
||||
out!!.add(FallbackRecentsStateController(this))
|
||||
}
|
||||
|
||||
@@ -144,7 +144,6 @@ import com.android.launcher3.BaseActivity.MultiWindowModeChangedListener;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Flags;
|
||||
import com.android.launcher3.Insettable;
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.PagedView;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
@@ -574,8 +573,6 @@ public abstract class RecentsView<
|
||||
// Keeps track of the previously known visible tasks for purposes of loading/unloading task data
|
||||
private final SparseBooleanArray mHasVisibleTaskData = new SparseBooleanArray();
|
||||
|
||||
private final InvariantDeviceProfile mIdp;
|
||||
|
||||
/**
|
||||
* Getting views should be done via {@link #getTaskViewFromPool(int)}
|
||||
*/
|
||||
@@ -912,7 +909,6 @@ public abstract class RecentsView<
|
||||
mFastFlingVelocity = getResources()
|
||||
.getDimensionPixelSize(R.dimen.recents_fast_fling_velocity);
|
||||
mModel = RecentsModel.INSTANCE.get(context);
|
||||
mIdp = InvariantDeviceProfile.INSTANCE.get(context);
|
||||
|
||||
mClearAllButton = (ClearAllButton) LayoutInflater.from(context)
|
||||
.inflate(R.layout.overview_clear_all_button, this, false);
|
||||
|
||||
Reference in New Issue
Block a user