summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2023-09-22 15:54:37 -0700
committerSunny Goyal <sunnygoyal@google.com>2023-10-03 10:19:39 -0700
commit81039b2d730e66e21a64405caf77defbd4a84440 (patch)
tree5953a08932b6aab6c142b3f7389a38299f4cbdbe
parent2cce534cbbd6f1bbd2ec3538f8250424a70ac69a (diff)
downloadLauncher3-81039b2d730e66e21a64405caf77defbd4a84440.tar.gz
Removing unused interfaces from Launcher
Bug: 301661768 Test: Presubmit Flag: N/A Change-Id: Ia042805080bd314efff5a9bb4877f4f830fb3998
-rw-r--r--src/com/android/launcher3/Launcher.java39
-rw-r--r--src/com/android/launcher3/LauncherCallbacks.java46
-rw-r--r--src_plugins/com/android/systemui/plugins/shared/LauncherOverlayManager.java4
3 files changed, 0 insertions, 89 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2b433f152c..8455fcd407 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -576,9 +576,6 @@ public class Launcher extends StatefulActivity<LauncherState>
getSystemUiController().updateUiState(SystemUiController.UI_STATE_BASE_WINDOW,
Themes.getAttrBoolean(this, R.attr.isWorkspaceDarkText));
- if (mLauncherCallbacks != null) {
- mLauncherCallbacks.onCreate(savedInstanceState);
- }
mOverlayManager = getDefaultOverlay();
PluginManagerWrapper.INSTANCE.get(this).addPluginListener(this,
LauncherOverlayPlugin.class, false /* allowedMultiple */);
@@ -788,8 +785,6 @@ public class Launcher extends StatefulActivity<LauncherState>
return true;
}
- private LauncherCallbacks mLauncherCallbacks;
-
@Override
public void invalidateParent(ItemInfo info) {
if (info.container >= 0) {
@@ -1581,9 +1576,6 @@ public class Launcher extends StatefulActivity<LauncherState>
}
}
- if (mLauncherCallbacks != null) {
- mLauncherCallbacks.onHomeIntent(internalStateHandled);
- }
if (FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE.get()) {
handleSplitAnimationGoingToHome();
}
@@ -1752,28 +1744,6 @@ public class Launcher extends StatefulActivity<LauncherState>
}
}
- /**
- * Indicates that we want global search for this activity by setting the globalSearch
- * argument for {@link #startSearch} to true.
- */
- @Override
- public void startSearch(String initialQuery, boolean selectInitialQuery,
- Bundle appSearchData, boolean globalSearch) {
- if (appSearchData == null) {
- appSearchData = new Bundle();
- appSearchData.putString("source", "launcher-search");
- }
-
- if (mLauncherCallbacks == null ||
- !mLauncherCallbacks.startSearch(initialQuery, selectInitialQuery, appSearchData)) {
- // Starting search from the callbacks failed. Start the default global search.
- super.startSearch(initialQuery, selectInitialQuery, appSearchData, true);
- }
-
- // We need to show the workspace after starting the search
- mStateManager.goToState(NORMAL);
- }
-
void addAppWidgetFromDropImpl(int appWidgetId, ItemInfo info, AppWidgetHostView boundWidget,
WidgetAddFlowHandler addFlowHandler) {
if (LOGD) {
@@ -2997,10 +2967,6 @@ public class Launcher extends StatefulActivity<LauncherState>
}
mModel.dumpState(prefix, fd, writer, args);
-
- if (mLauncherCallbacks != null) {
- mLauncherCallbacks.dump(prefix, fd, writer, args);
- }
mOverlayManager.dump(prefix, writer);
}
@@ -3244,11 +3210,6 @@ public class Launcher extends StatefulActivity<LauncherState>
mWorkspace.setLauncherOverlay(overlay);
}
- public boolean setLauncherCallbacks(LauncherCallbacks callbacks) {
- mLauncherCallbacks = callbacks;
- return true;
- }
-
/**
* Persistent callback which notifies when an activity launch is deferred because the activity
* was not yet resumed.
diff --git a/src/com/android/launcher3/LauncherCallbacks.java b/src/com/android/launcher3/LauncherCallbacks.java
deleted file mode 100644
index 0e529bd376..0000000000
--- a/src/com/android/launcher3/LauncherCallbacks.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher3;
-
-import android.os.Bundle;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-
-/**
- * LauncherCallbacks is an interface used to extend the Launcher activity. It includes many hooks
- * in order to add additional functionality. Some of these are very general, and give extending
- * classes the ability to react to Activity life-cycle or specific user interactions. Others
- * are more specific and relate to replacing parts of the application, for example, the search
- * interface or the wallpaper picker.
- */
-public interface LauncherCallbacks {
-
- /*
- * Activity life-cycle methods. These methods are triggered after
- * the code in the corresponding Launcher method is executed.
- */
- void onCreate(Bundle savedInstanceState);
- void dump(String prefix, FileDescriptor fd, PrintWriter w, String[] args);
- void onHomeIntent(boolean internalStateHandled);
-
- /**
- * Starts a search with {@param initialQuery}. Return false if search was not started.
- */
- boolean startSearch(
- String initialQuery, boolean selectInitialQuery, Bundle appSearchData);
-}
diff --git a/src_plugins/com/android/systemui/plugins/shared/LauncherOverlayManager.java b/src_plugins/com/android/systemui/plugins/shared/LauncherOverlayManager.java
index 582ab230c3..6b27503afb 100644
--- a/src_plugins/com/android/systemui/plugins/shared/LauncherOverlayManager.java
+++ b/src_plugins/com/android/systemui/plugins/shared/LauncherOverlayManager.java
@@ -41,10 +41,6 @@ public interface LauncherOverlayManager extends Application.ActivityLifecycleCal
default void hideOverlay(int duration) { }
- default boolean startSearch(byte[] config, Bundle extras) {
- return false;
- }
-
@Override
default void onActivityCreated(Activity activity, Bundle bundle) { }