mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Removing unused interfaces from Launcher
Bug: 301661768 Test: Presubmit Flag: N/A Change-Id: Ia042805080bd314efff5a9bb4877f4f830fb3998
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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) { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user