• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
17 package com.android.launcher3;
18 
19 import android.os.Bundle;
20 
21 import java.io.FileDescriptor;
22 import java.io.PrintWriter;
23 
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  */
31 public 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      */
onCreate(Bundle savedInstanceState)37     void onCreate(Bundle savedInstanceState);
dump(String prefix, FileDescriptor fd, PrintWriter w, String[] args)38     void dump(String prefix, FileDescriptor fd, PrintWriter w, String[] args);
onHomeIntent(boolean internalStateHandled)39     void onHomeIntent(boolean internalStateHandled);
40 
41     /**
42      * Starts a search with {@param initialQuery}. Return false if search was not started.
43      */
startSearch( String initialQuery, boolean selectInitialQuery, Bundle appSearchData)44     boolean startSearch(
45             String initialQuery, boolean selectInitialQuery, Bundle appSearchData);
46 }
47