mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Making ActivityContext extend SavedStateRegistryOwner
Bug: 390572144 Test: Presubmit Flag: EXEMPT refactor Change-Id: I8272e95a8d2da95b3c93ec616fdf877b89db5b26
This commit is contained in:
@@ -19,25 +19,19 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.os.UserHandle;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.popup.SystemShortcut;
|
||||
import com.android.launcher3.util.BaseContext;
|
||||
import com.android.launcher3.util.Themes;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
// TODO(b/218912746): Share more behavior to avoid all apps context depending directly on taskbar.
|
||||
/** Base for common behavior between taskbar window contexts. */
|
||||
public abstract class BaseTaskbarContext extends ContextThemeWrapper implements ActivityContext,
|
||||
SystemShortcut.BubbleActivityStarter {
|
||||
public abstract class BaseTaskbarContext extends BaseContext
|
||||
implements SystemShortcut.BubbleActivityStarter {
|
||||
|
||||
protected final LayoutInflater mLayoutInflater;
|
||||
private final List<OnDeviceProfileChangeListener> mDPChangeListeners = new ArrayList<>();
|
||||
|
||||
public BaseTaskbarContext(Context windowContext) {
|
||||
super(windowContext, Themes.getActivityThemeRes(windowContext));
|
||||
@@ -49,11 +43,6 @@ public abstract class BaseTaskbarContext extends ContextThemeWrapper implements
|
||||
return mLayoutInflater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<OnDeviceProfileChangeListener> getOnDeviceProfileChangeListeners() {
|
||||
return mDPChangeListeners;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showShortcutBubble(ShortcutInfo info) {
|
||||
if (info == null) return;
|
||||
|
||||
Reference in New Issue
Block a user