Moving some methods from various activities to the base interface
This allows creating some custom views in the absence of
activity context
Bug: 118758696
Change-Id: I23999290e972a2a8cbd725a521a4e0c7c2e5023e
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index 77b6010..1b953d4 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -36,6 +36,7 @@
import com.android.launcher3.uioverrides.UiFactory;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.util.SystemUiController;
+import com.android.launcher3.views.ActivityContext;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -44,7 +45,8 @@
import androidx.annotation.IntDef;
-public abstract class BaseActivity extends Activity implements UserEventDelegate, LogStateProvider{
+public abstract class BaseActivity extends Activity
+ implements UserEventDelegate, LogStateProvider, ActivityContext {
public static final int INVISIBLE_BY_STATE_HANDLER = 1 << 0;
public static final int INVISIBLE_BY_APP_TRANSITIONS = 1 << 1;
@@ -100,14 +102,11 @@
// animation
@InvisibilityFlags private int mForceInvisible;
+ @Override
public DeviceProfile getDeviceProfile() {
return mDeviceProfile;
}
- public AccessibilityDelegate getAccessibilityDelegate() {
- return null;
- }
-
public int getCurrentState() { return StatsLogUtils.LAUNCHER_STATE_BACKGROUND; }
public void modifyUserEvent(LauncherLogProto.LauncherEvent event) {}