Moving onboarding prefs to use LauncherPrefs

Bug: 301661768
Test: Presubmit
Flag: N/A
Change-Id: Iec8a5e739f394a152d5ffc57b01e0449e94b4084
This commit is contained in:
Sunny Goyal
2023-10-06 13:47:50 -07:00
parent b834d6eca8
commit cd44740567
18 changed files with 175 additions and 272 deletions
@@ -20,8 +20,6 @@ import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.util.OnboardingPrefs;
import com.android.launcher3.util.Themes;
import com.android.launcher3.views.ActivityContext;
@@ -34,12 +32,10 @@ public abstract class BaseTaskbarContext extends ContextThemeWrapper implements
protected final LayoutInflater mLayoutInflater;
private final List<OnDeviceProfileChangeListener> mDPChangeListeners = new ArrayList<>();
private final OnboardingPrefs<BaseTaskbarContext> mOnboardingPrefs;
public BaseTaskbarContext(Context windowContext) {
super(windowContext, Themes.getActivityThemeRes(windowContext));
mLayoutInflater = LayoutInflater.from(this).cloneInContext(this);
mOnboardingPrefs = new OnboardingPrefs<>(this, LauncherPrefs.getPrefs(this));
}
@Override
@@ -52,11 +48,6 @@ public abstract class BaseTaskbarContext extends ContextThemeWrapper implements
return mDPChangeListeners;
}
@Override
public OnboardingPrefs<BaseTaskbarContext> getOnboardingPrefs() {
return mOnboardingPrefs;
}
/** Callback invoked when a drag is initiated within this context. */
public abstract void onDragStart();