blob: 0e529bd3766840f3922a981ea2df3056fb734883 [file] [log] [blame]
Adam Cohen79d90c52016-04-22 13:29:20 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Adam Cohen9211d422014-10-07 18:14:53 -070017package com.android.launcher3;
18
Adam Cohen9211d422014-10-07 18:14:53 -070019import android.os.Bundle;
Adam Cohen9211d422014-10-07 18:14:53 -070020
21import java.io.FileDescriptor;
22import java.io.PrintWriter;
Adam Cohen9211d422014-10-07 18:14:53 -070023
24/**
25 * LauncherCallbacks is an interface used to extend the Launcher activity. It includes many hooks
26 * in order to add additional functionality. Some of these are very general, and give extending
27 * classes the ability to react to Activity life-cycle or specific user interactions. Others
28 * are more specific and relate to replacing parts of the application, for example, the search
29 * interface or the wallpaper picker.
30 */
31public interface LauncherCallbacks {
32
33 /*
34 * Activity life-cycle methods. These methods are triggered after
35 * the code in the corresponding Launcher method is executed.
36 */
Mario Bertschlerc06af332017-03-28 12:23:22 -070037 void onCreate(Bundle savedInstanceState);
Mario Bertschlerc06af332017-03-28 12:23:22 -070038 void dump(String prefix, FileDescriptor fd, PrintWriter w, String[] args);
Sunny Goyal85462132018-04-24 11:39:37 -070039 void onHomeIntent(boolean internalStateHandled);
Adam Cohen9211d422014-10-07 18:14:53 -070040
Sunny Goyal6f28e712016-09-13 14:19:29 -070041 /**
42 * Starts a search with {@param initialQuery}. Return false if search was not started.
43 */
Mario Bertschlerc06af332017-03-28 12:23:22 -070044 boolean startSearch(
Sunny Goyal6f28e712016-09-13 14:19:29 -070045 String initialQuery, boolean selectInitialQuery, Bundle appSearchData);
Adam Cohen9211d422014-10-07 18:14:53 -070046}