Loading api/current.txt +10 −0 Original line number Original line Diff line number Diff line Loading @@ -3353,6 +3353,7 @@ package android.app { method public android.content.SharedPreferences getPreferences(int); method public android.content.SharedPreferences getPreferences(int); method public android.net.Uri getReferrer(); method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public int getTaskId(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor(); method public final int getTitleColor(); Loading Loading @@ -3435,6 +3436,7 @@ package android.app { method public deprecated java.lang.Object onRetainNonConfigurationInstance(); method public deprecated java.lang.Object onRetainNonConfigurationInstance(); method protected void onSaveInstanceState(android.os.Bundle); method protected void onSaveInstanceState(android.os.Bundle); method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle); method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method protected void onStart(); method protected void onStart(); method protected void onStop(); method protected void onStop(); Loading Loading @@ -4112,6 +4114,7 @@ package android.app { method public android.view.View getCurrentFocus(); method public android.view.View getCurrentFocus(); method public android.view.LayoutInflater getLayoutInflater(); method public android.view.LayoutInflater getLayoutInflater(); method public final android.app.Activity getOwnerActivity(); method public final android.app.Activity getOwnerActivity(); method public final android.view.SearchEvent getSearchEvent(); method public final int getVolumeControlStream(); method public final int getVolumeControlStream(); method public android.view.Window getWindow(); method public android.view.Window getWindow(); method public void hide(); method public void hide(); Loading Loading @@ -4145,6 +4148,7 @@ package android.app { method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public void onRestoreInstanceState(android.os.Bundle); method public void onRestoreInstanceState(android.os.Bundle); method public android.os.Bundle onSaveInstanceState(); method public android.os.Bundle onSaveInstanceState(); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method protected void onStart(); method protected void onStart(); method protected void onStop(); method protected void onStop(); Loading Loading @@ -28214,6 +28218,7 @@ package android.service.dreams { method public boolean onMenuOpened(int, android.view.Menu); method public boolean onMenuOpened(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method public void onWakeUp(); method public void onWakeUp(); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); Loading Loading @@ -34556,6 +34561,10 @@ package android.view { method public void onScaleEnd(android.view.ScaleGestureDetector); method public void onScaleEnd(android.view.ScaleGestureDetector); } } public class SearchEvent { method public android.view.InputDevice getInputDevice(); } public class SoundEffectConstants { public class SoundEffectConstants { method public static int getContantForFocusDirection(int); method public static int getContantForFocusDirection(int); field public static final int CLICK = 0; // 0x0 field public static final int CLICK = 0; // 0x0 Loading Loading @@ -36078,6 +36087,7 @@ package android.view { method public abstract void onPanelClosed(int, android.view.Menu); method public abstract void onPanelClosed(int, android.view.Menu); method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu); method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu); method public abstract boolean onSearchRequested(); method public abstract boolean onSearchRequested(); method public abstract boolean onSearchRequested(android.view.SearchEvent); method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public abstract void onWindowFocusChanged(boolean); method public abstract void onWindowFocusChanged(boolean); method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback); method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback); api/system-current.txt +10 −0 Original line number Original line Diff line number Diff line Loading @@ -3435,6 +3435,7 @@ package android.app { method public android.content.SharedPreferences getPreferences(int); method public android.content.SharedPreferences getPreferences(int); method public android.net.Uri getReferrer(); method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public int getTaskId(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor(); method public final int getTitleColor(); Loading Loading @@ -3519,6 +3520,7 @@ package android.app { method public deprecated java.lang.Object onRetainNonConfigurationInstance(); method public deprecated java.lang.Object onRetainNonConfigurationInstance(); method protected void onSaveInstanceState(android.os.Bundle); method protected void onSaveInstanceState(android.os.Bundle); method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle); method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method protected void onStart(); method protected void onStart(); method protected void onStop(); method protected void onStop(); Loading Loading @@ -4203,6 +4205,7 @@ package android.app { method public android.view.View getCurrentFocus(); method public android.view.View getCurrentFocus(); method public android.view.LayoutInflater getLayoutInflater(); method public android.view.LayoutInflater getLayoutInflater(); method public final android.app.Activity getOwnerActivity(); method public final android.app.Activity getOwnerActivity(); method public final android.view.SearchEvent getSearchEvent(); method public final int getVolumeControlStream(); method public final int getVolumeControlStream(); method public android.view.Window getWindow(); method public android.view.Window getWindow(); method public void hide(); method public void hide(); Loading Loading @@ -4236,6 +4239,7 @@ package android.app { method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public void onRestoreInstanceState(android.os.Bundle); method public void onRestoreInstanceState(android.os.Bundle); method public android.os.Bundle onSaveInstanceState(); method public android.os.Bundle onSaveInstanceState(); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method protected void onStart(); method protected void onStart(); method protected void onStop(); method protected void onStop(); Loading Loading @@ -30214,6 +30218,7 @@ package android.service.dreams { method public boolean onMenuOpened(int, android.view.Menu); method public boolean onMenuOpened(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method public void onWakeUp(); method public void onWakeUp(); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); Loading Loading @@ -37178,6 +37183,10 @@ package android.view { method public void onScaleEnd(android.view.ScaleGestureDetector); method public void onScaleEnd(android.view.ScaleGestureDetector); } } public class SearchEvent { method public android.view.InputDevice getInputDevice(); } public class SoundEffectConstants { public class SoundEffectConstants { method public static int getContantForFocusDirection(int); method public static int getContantForFocusDirection(int); field public static final int CLICK = 0; // 0x0 field public static final int CLICK = 0; // 0x0 Loading Loading @@ -38701,6 +38710,7 @@ package android.view { method public abstract void onPanelClosed(int, android.view.Menu); method public abstract void onPanelClosed(int, android.view.Menu); method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu); method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu); method public abstract boolean onSearchRequested(); method public abstract boolean onSearchRequested(); method public abstract boolean onSearchRequested(android.view.SearchEvent); method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public abstract void onWindowFocusChanged(boolean); method public abstract void onWindowFocusChanged(boolean); method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback); method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback); core/java/android/app/Activity.java +25 −0 Original line number Original line Diff line number Diff line Loading @@ -89,6 +89,7 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.MenuItem; import android.view.MotionEvent; import android.view.MotionEvent; import android.view.PhoneWindow; import android.view.PhoneWindow; import android.view.SearchEvent; import android.view.View; import android.view.View; import android.view.View.OnCreateContextMenuListener; import android.view.View.OnCreateContextMenuListener; import android.view.ViewGroup; import android.view.ViewGroup; Loading Loading @@ -787,6 +788,8 @@ public class Activity extends ContextThemeWrapper private TranslucentConversionListener mTranslucentCallback; private TranslucentConversionListener mTranslucentCallback; private boolean mChangeCanvasToTranslucent; private boolean mChangeCanvasToTranslucent; private SearchEvent mSearchEvent; private boolean mTitleReady = false; private boolean mTitleReady = false; private int mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; private int mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; Loading Loading @@ -3547,12 +3550,23 @@ public class Activity extends ContextThemeWrapper * implementation changes to simply return false and you must supply your own custom * implementation changes to simply return false and you must supply your own custom * implementation if you want to support search.</p> * implementation if you want to support search.</p> * * * @param searchEvent The {@link SearchEvent} that signaled this search. * @return Returns {@code true} if search launched, and {@code false} if the activity does * @return Returns {@code true} if search launched, and {@code false} if the activity does * not respond to search. The default implementation always returns {@code true}, except * not respond to search. The default implementation always returns {@code true}, except * when in {@link Configuration#UI_MODE_TYPE_TELEVISION} mode where it returns false. * when in {@link Configuration#UI_MODE_TYPE_TELEVISION} mode where it returns false. * * * @see android.app.SearchManager * @see android.app.SearchManager */ */ public boolean onSearchRequested(@Nullable SearchEvent searchEvent) { mSearchEvent = searchEvent; boolean result = onSearchRequested(); mSearchEvent = null; return result; } /** * @see #onSearchRequested(SearchEvent) */ public boolean onSearchRequested() { public boolean onSearchRequested() { if ((getResources().getConfiguration().uiMode&Configuration.UI_MODE_TYPE_MASK) if ((getResources().getConfiguration().uiMode&Configuration.UI_MODE_TYPE_MASK) != Configuration.UI_MODE_TYPE_TELEVISION) { != Configuration.UI_MODE_TYPE_TELEVISION) { Loading @@ -3563,6 +3577,17 @@ public class Activity extends ContextThemeWrapper } } } } /** * During the onSearchRequested() callbacks, this function will return the * {@link SearchEvent} that triggered the callback, if it exists. * * @return SearchEvent The SearchEvent that triggered the {@link * #onSearchRequested} callback. */ public final SearchEvent getSearchEvent() { return mSearchEvent; } /** /** * This hook is called to launch the search UI. * This hook is called to launch the search UI. * * Loading core/java/android/app/Dialog.java +22 −0 Original line number Original line Diff line number Diff line Loading @@ -49,6 +49,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.MenuItem; import android.view.MotionEvent; import android.view.MotionEvent; import android.view.PhoneWindow; import android.view.PhoneWindow; import android.view.SearchEvent; import android.view.View; import android.view.View; import android.view.View.OnCreateContextMenuListener; import android.view.View.OnCreateContextMenuListener; import android.view.ViewGroup; import android.view.ViewGroup; Loading Loading @@ -123,6 +124,8 @@ public class Dialog implements DialogInterface, Window.Callback, private Handler mListenersHandler; private Handler mListenersHandler; private SearchEvent mSearchEvent; private ActionMode mActionMode; private ActionMode mActionMode; private int mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; private int mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; Loading Loading @@ -992,6 +995,14 @@ public class Dialog implements DialogInterface, Window.Callback, public void onContextMenuClosed(Menu menu) { public void onContextMenuClosed(Menu menu) { } } /** * This hook is called when the user signals the desire to start a search. */ public boolean onSearchRequested(SearchEvent searchEvent) { mSearchEvent = searchEvent; return onSearchRequested(); } /** /** * This hook is called when the user signals the desire to start a search. * This hook is called when the user signals the desire to start a search. */ */ Loading @@ -1010,6 +1021,17 @@ public class Dialog implements DialogInterface, Window.Callback, } } } } /** * During the onSearchRequested() callbacks, this function will return the * {@link SearchEvent} that triggered the callback, if it exists. * * @return SearchEvent The SearchEvent that triggered the {@link * #onSearchRequested} callback. */ public final SearchEvent getSearchEvent() { return mSearchEvent; } /** /** * {@inheritDoc} * {@inheritDoc} */ */ Loading core/java/android/service/dreams/DreamService.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.MenuItem; import android.view.MotionEvent; import android.view.MotionEvent; import android.view.PhoneWindow; import android.view.PhoneWindow; import android.view.SearchEvent; import android.view.View; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup; import android.view.Window; import android.view.Window; Loading Loading @@ -330,6 +331,12 @@ public class DreamService extends Service implements Window.Callback { public void onPanelClosed(int featureId, Menu menu) { public void onPanelClosed(int featureId, Menu menu) { } } /** {@inheritDoc} */ @Override public boolean onSearchRequested(SearchEvent event) { return onSearchRequested(); } /** {@inheritDoc} */ /** {@inheritDoc} */ @Override @Override public boolean onSearchRequested() { public boolean onSearchRequested() { Loading Loading
api/current.txt +10 −0 Original line number Original line Diff line number Diff line Loading @@ -3353,6 +3353,7 @@ package android.app { method public android.content.SharedPreferences getPreferences(int); method public android.content.SharedPreferences getPreferences(int); method public android.net.Uri getReferrer(); method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public int getTaskId(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor(); method public final int getTitleColor(); Loading Loading @@ -3435,6 +3436,7 @@ package android.app { method public deprecated java.lang.Object onRetainNonConfigurationInstance(); method public deprecated java.lang.Object onRetainNonConfigurationInstance(); method protected void onSaveInstanceState(android.os.Bundle); method protected void onSaveInstanceState(android.os.Bundle); method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle); method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method protected void onStart(); method protected void onStart(); method protected void onStop(); method protected void onStop(); Loading Loading @@ -4112,6 +4114,7 @@ package android.app { method public android.view.View getCurrentFocus(); method public android.view.View getCurrentFocus(); method public android.view.LayoutInflater getLayoutInflater(); method public android.view.LayoutInflater getLayoutInflater(); method public final android.app.Activity getOwnerActivity(); method public final android.app.Activity getOwnerActivity(); method public final android.view.SearchEvent getSearchEvent(); method public final int getVolumeControlStream(); method public final int getVolumeControlStream(); method public android.view.Window getWindow(); method public android.view.Window getWindow(); method public void hide(); method public void hide(); Loading Loading @@ -4145,6 +4148,7 @@ package android.app { method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public void onRestoreInstanceState(android.os.Bundle); method public void onRestoreInstanceState(android.os.Bundle); method public android.os.Bundle onSaveInstanceState(); method public android.os.Bundle onSaveInstanceState(); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method protected void onStart(); method protected void onStart(); method protected void onStop(); method protected void onStop(); Loading Loading @@ -28214,6 +28218,7 @@ package android.service.dreams { method public boolean onMenuOpened(int, android.view.Menu); method public boolean onMenuOpened(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method public void onWakeUp(); method public void onWakeUp(); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); Loading Loading @@ -34556,6 +34561,10 @@ package android.view { method public void onScaleEnd(android.view.ScaleGestureDetector); method public void onScaleEnd(android.view.ScaleGestureDetector); } } public class SearchEvent { method public android.view.InputDevice getInputDevice(); } public class SoundEffectConstants { public class SoundEffectConstants { method public static int getContantForFocusDirection(int); method public static int getContantForFocusDirection(int); field public static final int CLICK = 0; // 0x0 field public static final int CLICK = 0; // 0x0 Loading Loading @@ -36078,6 +36087,7 @@ package android.view { method public abstract void onPanelClosed(int, android.view.Menu); method public abstract void onPanelClosed(int, android.view.Menu); method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu); method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu); method public abstract boolean onSearchRequested(); method public abstract boolean onSearchRequested(); method public abstract boolean onSearchRequested(android.view.SearchEvent); method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public abstract void onWindowFocusChanged(boolean); method public abstract void onWindowFocusChanged(boolean); method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback); method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
api/system-current.txt +10 −0 Original line number Original line Diff line number Diff line Loading @@ -3435,6 +3435,7 @@ package android.app { method public android.content.SharedPreferences getPreferences(int); method public android.content.SharedPreferences getPreferences(int); method public android.net.Uri getReferrer(); method public android.net.Uri getReferrer(); method public int getRequestedOrientation(); method public int getRequestedOrientation(); method public final android.view.SearchEvent getSearchEvent(); method public int getTaskId(); method public int getTaskId(); method public final java.lang.CharSequence getTitle(); method public final java.lang.CharSequence getTitle(); method public final int getTitleColor(); method public final int getTitleColor(); Loading Loading @@ -3519,6 +3520,7 @@ package android.app { method public deprecated java.lang.Object onRetainNonConfigurationInstance(); method public deprecated java.lang.Object onRetainNonConfigurationInstance(); method protected void onSaveInstanceState(android.os.Bundle); method protected void onSaveInstanceState(android.os.Bundle); method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle); method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method protected void onStart(); method protected void onStart(); method protected void onStop(); method protected void onStop(); Loading Loading @@ -4203,6 +4205,7 @@ package android.app { method public android.view.View getCurrentFocus(); method public android.view.View getCurrentFocus(); method public android.view.LayoutInflater getLayoutInflater(); method public android.view.LayoutInflater getLayoutInflater(); method public final android.app.Activity getOwnerActivity(); method public final android.app.Activity getOwnerActivity(); method public final android.view.SearchEvent getSearchEvent(); method public final int getVolumeControlStream(); method public final int getVolumeControlStream(); method public android.view.Window getWindow(); method public android.view.Window getWindow(); method public void hide(); method public void hide(); Loading Loading @@ -4236,6 +4239,7 @@ package android.app { method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public void onRestoreInstanceState(android.os.Bundle); method public void onRestoreInstanceState(android.os.Bundle); method public android.os.Bundle onSaveInstanceState(); method public android.os.Bundle onSaveInstanceState(); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method protected void onStart(); method protected void onStart(); method protected void onStop(); method protected void onStop(); Loading Loading @@ -30214,6 +30218,7 @@ package android.service.dreams { method public boolean onMenuOpened(int, android.view.Menu); method public boolean onMenuOpened(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onSearchRequested(android.view.SearchEvent); method public boolean onSearchRequested(); method public boolean onSearchRequested(); method public void onWakeUp(); method public void onWakeUp(); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); Loading Loading @@ -37178,6 +37183,10 @@ package android.view { method public void onScaleEnd(android.view.ScaleGestureDetector); method public void onScaleEnd(android.view.ScaleGestureDetector); } } public class SearchEvent { method public android.view.InputDevice getInputDevice(); } public class SoundEffectConstants { public class SoundEffectConstants { method public static int getContantForFocusDirection(int); method public static int getContantForFocusDirection(int); field public static final int CLICK = 0; // 0x0 field public static final int CLICK = 0; // 0x0 Loading Loading @@ -38701,6 +38710,7 @@ package android.view { method public abstract void onPanelClosed(int, android.view.Menu); method public abstract void onPanelClosed(int, android.view.Menu); method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu); method public abstract boolean onPreparePanel(int, android.view.View, android.view.Menu); method public abstract boolean onSearchRequested(); method public abstract boolean onSearchRequested(); method public abstract boolean onSearchRequested(android.view.SearchEvent); method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public abstract void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public abstract void onWindowFocusChanged(boolean); method public abstract void onWindowFocusChanged(boolean); method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback); method public abstract android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback);
core/java/android/app/Activity.java +25 −0 Original line number Original line Diff line number Diff line Loading @@ -89,6 +89,7 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.MenuItem; import android.view.MotionEvent; import android.view.MotionEvent; import android.view.PhoneWindow; import android.view.PhoneWindow; import android.view.SearchEvent; import android.view.View; import android.view.View; import android.view.View.OnCreateContextMenuListener; import android.view.View.OnCreateContextMenuListener; import android.view.ViewGroup; import android.view.ViewGroup; Loading Loading @@ -787,6 +788,8 @@ public class Activity extends ContextThemeWrapper private TranslucentConversionListener mTranslucentCallback; private TranslucentConversionListener mTranslucentCallback; private boolean mChangeCanvasToTranslucent; private boolean mChangeCanvasToTranslucent; private SearchEvent mSearchEvent; private boolean mTitleReady = false; private boolean mTitleReady = false; private int mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; private int mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; Loading Loading @@ -3547,12 +3550,23 @@ public class Activity extends ContextThemeWrapper * implementation changes to simply return false and you must supply your own custom * implementation changes to simply return false and you must supply your own custom * implementation if you want to support search.</p> * implementation if you want to support search.</p> * * * @param searchEvent The {@link SearchEvent} that signaled this search. * @return Returns {@code true} if search launched, and {@code false} if the activity does * @return Returns {@code true} if search launched, and {@code false} if the activity does * not respond to search. The default implementation always returns {@code true}, except * not respond to search. The default implementation always returns {@code true}, except * when in {@link Configuration#UI_MODE_TYPE_TELEVISION} mode where it returns false. * when in {@link Configuration#UI_MODE_TYPE_TELEVISION} mode where it returns false. * * * @see android.app.SearchManager * @see android.app.SearchManager */ */ public boolean onSearchRequested(@Nullable SearchEvent searchEvent) { mSearchEvent = searchEvent; boolean result = onSearchRequested(); mSearchEvent = null; return result; } /** * @see #onSearchRequested(SearchEvent) */ public boolean onSearchRequested() { public boolean onSearchRequested() { if ((getResources().getConfiguration().uiMode&Configuration.UI_MODE_TYPE_MASK) if ((getResources().getConfiguration().uiMode&Configuration.UI_MODE_TYPE_MASK) != Configuration.UI_MODE_TYPE_TELEVISION) { != Configuration.UI_MODE_TYPE_TELEVISION) { Loading @@ -3563,6 +3577,17 @@ public class Activity extends ContextThemeWrapper } } } } /** * During the onSearchRequested() callbacks, this function will return the * {@link SearchEvent} that triggered the callback, if it exists. * * @return SearchEvent The SearchEvent that triggered the {@link * #onSearchRequested} callback. */ public final SearchEvent getSearchEvent() { return mSearchEvent; } /** /** * This hook is called to launch the search UI. * This hook is called to launch the search UI. * * Loading
core/java/android/app/Dialog.java +22 −0 Original line number Original line Diff line number Diff line Loading @@ -49,6 +49,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.MenuItem; import android.view.MotionEvent; import android.view.MotionEvent; import android.view.PhoneWindow; import android.view.PhoneWindow; import android.view.SearchEvent; import android.view.View; import android.view.View; import android.view.View.OnCreateContextMenuListener; import android.view.View.OnCreateContextMenuListener; import android.view.ViewGroup; import android.view.ViewGroup; Loading Loading @@ -123,6 +124,8 @@ public class Dialog implements DialogInterface, Window.Callback, private Handler mListenersHandler; private Handler mListenersHandler; private SearchEvent mSearchEvent; private ActionMode mActionMode; private ActionMode mActionMode; private int mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; private int mActionModeTypeStarting = ActionMode.TYPE_PRIMARY; Loading Loading @@ -992,6 +995,14 @@ public class Dialog implements DialogInterface, Window.Callback, public void onContextMenuClosed(Menu menu) { public void onContextMenuClosed(Menu menu) { } } /** * This hook is called when the user signals the desire to start a search. */ public boolean onSearchRequested(SearchEvent searchEvent) { mSearchEvent = searchEvent; return onSearchRequested(); } /** /** * This hook is called when the user signals the desire to start a search. * This hook is called when the user signals the desire to start a search. */ */ Loading @@ -1010,6 +1021,17 @@ public class Dialog implements DialogInterface, Window.Callback, } } } } /** * During the onSearchRequested() callbacks, this function will return the * {@link SearchEvent} that triggered the callback, if it exists. * * @return SearchEvent The SearchEvent that triggered the {@link * #onSearchRequested} callback. */ public final SearchEvent getSearchEvent() { return mSearchEvent; } /** /** * {@inheritDoc} * {@inheritDoc} */ */ Loading
core/java/android/service/dreams/DreamService.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.MenuItem; import android.view.MotionEvent; import android.view.MotionEvent; import android.view.PhoneWindow; import android.view.PhoneWindow; import android.view.SearchEvent; import android.view.View; import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup; import android.view.Window; import android.view.Window; Loading Loading @@ -330,6 +331,12 @@ public class DreamService extends Service implements Window.Callback { public void onPanelClosed(int featureId, Menu menu) { public void onPanelClosed(int featureId, Menu menu) { } } /** {@inheritDoc} */ @Override public boolean onSearchRequested(SearchEvent event) { return onSearchRequested(); } /** {@inheritDoc} */ /** {@inheritDoc} */ @Override @Override public boolean onSearchRequested() { public boolean onSearchRequested() { Loading