Only allow Settings app launch search result page

Bug: 68199963
Test: robotest
Change-Id: I0018e9c60b0dd46fc2420a563a93b706bf252dc4
This commit is contained in:
Fan Zhang
2017-10-24 09:27:02 -07:00
parent 01ff9a80d0
commit 25f29bf126
28 changed files with 178 additions and 69 deletions

View File

@@ -16,6 +16,8 @@
*/
package com.android.settings.search;
import android.annotation.NonNull;
import android.content.ComponentName;
import android.content.Context;
import android.view.View;
@@ -32,6 +34,15 @@ public interface SearchFeatureProvider {
*/
boolean isEnabled(Context context);
/**
* Ensures the caller has necessary privilege to launch search result page.
*
* @throws IllegalArgumentException when caller is null
* @throws SecurityException when caller is not allowed to launch search result page
*/
void verifyLaunchSearchResultPageCaller(Context context, @NonNull ComponentName caller)
throws SecurityException, IllegalArgumentException;
/**
* Returns a new loader to search in index database.
*/