mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Have separate DeviceProfile instances for taskbar and all apps windows.
We want to scale down the DeviceProfile for taskbar, but the all apps window should rely on the original DeviceProfile. Test: Manual Fix: 232907361 Change-Id: Ia09f674ada9e445c1d7278fa94c536ea9de13ef9 Merged-In: Ia09f674ada9e445c1d7278fa94c536ea9de13ef9
This commit is contained in:
@@ -19,7 +19,6 @@ import android.content.Context;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.DeviceProfile.DeviceProfileListenable;
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.util.Themes;
|
||||
@@ -36,8 +35,6 @@ public abstract class BaseTaskbarContext extends ContextThemeWrapper implements
|
||||
protected final LayoutInflater mLayoutInflater;
|
||||
private final List<OnDeviceProfileChangeListener> mDPChangeListeners = new ArrayList<>();
|
||||
|
||||
protected DeviceProfile mDeviceProfile;
|
||||
|
||||
public BaseTaskbarContext(Context windowContext) {
|
||||
super(windowContext, Themes.getActivityThemeRes(windowContext));
|
||||
mLayoutInflater = LayoutInflater.from(this).cloneInContext(this);
|
||||
@@ -48,19 +45,11 @@ public abstract class BaseTaskbarContext extends ContextThemeWrapper implements
|
||||
return mLayoutInflater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DeviceProfile getDeviceProfile() {
|
||||
return mDeviceProfile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<OnDeviceProfileChangeListener> getOnDeviceProfileChangeListeners() {
|
||||
return mDPChangeListeners;
|
||||
}
|
||||
|
||||
/** Updates the {@link DeviceProfile} instance to the latest representation of the screen. */
|
||||
public abstract void updateDeviceProfile(DeviceProfile dp);
|
||||
|
||||
/** Callback invoked when a drag is initiated within this context. */
|
||||
public abstract void onDragStart();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user