Making ActivityContext extend SavedStateRegistryOwner

Bug: 390572144
Test: Presubmit
Flag: EXEMPT refactor

Change-Id: I8272e95a8d2da95b3c93ec616fdf877b89db5b26
This commit is contained in:
Sunny Goyal
2025-02-18 14:28:56 -08:00
parent 19bdf47a31
commit 84e0e6a188
14 changed files with 259 additions and 329 deletions

View File

@@ -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;