Showing recents in search

A list of recent queries will display when search first launches, or
when text query is empty.

Fix: 32452066
Test: make RunSettingsRoboTests
Change-Id: Ic697f8c0795f2315a01406537c7ce1bbf9a813be
This commit is contained in:
Fan Zhang
2017-01-19 16:17:16 -08:00
parent e44be9f729
commit a8b089db8a
20 changed files with 658 additions and 38 deletions

View File

@@ -29,7 +29,7 @@ import java.lang.annotation.RetentionPolicy;
public abstract class ResultPayload implements Parcelable {
@IntDef({PayloadType.INLINE_SLIDER, PayloadType.INLINE_SWITCH,
PayloadType.INTENT})
PayloadType.INTENT, PayloadType.SAVED_QUERY})
@Retention(RetentionPolicy.SOURCE)
public @interface PayloadType {
/**
@@ -46,6 +46,11 @@ public abstract class ResultPayload implements Parcelable {
* Result is a inline widget, using a toggle widget as UI.
*/
int INLINE_SWITCH = 2;
/**
* Result is a recently saved query.
*/
int SAVED_QUERY = 3;
}
@IntDef({SettingsSource.UNKNOWN, SettingsSource.SYSTEM, SettingsSource.SECURE,
@@ -59,5 +64,6 @@ public abstract class ResultPayload implements Parcelable {
}
@ResultPayload.PayloadType public abstract int getType();
@ResultPayload.PayloadType
public abstract int getType();
}