Removing some unnecessary interfaces and merging them to ActivityContext

Bug: 259733681
Test: Everything compiles
Change-Id: If6b530f6e589a851cf8554f5de0849843bd66dd4
This commit is contained in:
Sunny Goyal committed 2022-12-08 10:15:55 -08:00
1 parent 1c744c996c
commit 54fa110bba
16 files changed
+277 -302

No files matched your search

@@ -20,15 +20,21 @@ import android.content.ContextWrapper;
import android.view.ContextThemeWrapper;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.BaseDragLayer;
import java.util.ArrayList;
import java.util.List;
/**
* {@link ContextWrapper} with internal Launcher interface for testing
*/
public class ActivityContextWrapper extends ContextThemeWrapper implements ActivityContext {
private final List<OnDeviceProfileChangeListener> mDpChangeListeners = new ArrayList<>();
private final DeviceProfile mProfile;
private final MyDragLayer mMyDragLayer;
@@ -43,6 +49,11 @@ public class ActivityContextWrapper extends ContextThemeWrapper implements Activ
return mMyDragLayer;
}
@Override
public List<OnDeviceProfileChangeListener> getOnDeviceProfileChangeListeners() {
return mDpChangeListeners;
}
@Override
public DeviceProfile getDeviceProfile() {
return mProfile;