Handle tap on intent based search results.

Also fix how icon is loaded. IconResId is specific to the package of the
indexed result. If result comes from external app, icon needs to be
decoded against the external app's package context.

Bug: 33432310
Test: RunSettingsRoboTests
Change-Id: Ia0c53e63be757405dfaeceb2d865e7d8de87c5ee
This commit is contained in:
Fan Zhang
2016-12-08 15:40:05 -08:00
parent 6c6c0e1151
commit 12daf6830d
6 changed files with 166 additions and 58 deletions

View File

@@ -31,8 +31,19 @@ public abstract class ResultPayload implements Parcelable {
@IntDef({PayloadType.INLINE_SLIDER, PayloadType.INLINE_SWITCH, PayloadType.INTENT})
@Retention(RetentionPolicy.SOURCE)
public @interface PayloadType {
/**
* Resulting page will be started using an intent
*/
int INTENT = 0;
/**
* Result is a inline widget, using a slider widget as UI.
*/
int INLINE_SLIDER = 1;
/**
* Result is a inline widget, using a toggle widget as UI.
*/
int INLINE_SWITCH = 2;
}