Java Code Examples for android.app.assist.AssistContent#setWebUri()

The following examples show how to use android.app.assist.AssistContent#setWebUri() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChromeActivity.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
@TargetApi(Build.VERSION_CODES.M)
public void onProvideAssistContent(AssistContent outContent) {
    if (getAssistStatusHandler() == null || !getAssistStatusHandler().isAssistSupported()) {
        // No information is provided in incognito mode.
        return;
    }
    Tab tab = getActivityTab();
    if (tab != null && !isInOverviewMode()) {
        outContent.setWebUri(Uri.parse(tab.getUrl()));
    }
}
 
Example 2
Source File: ChromeActivity.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
@TargetApi(Build.VERSION_CODES.M)
public void onProvideAssistContent(AssistContent outContent) {
    if (getAssistStatusHandler() == null || !getAssistStatusHandler().isAssistSupported()) {
        // No information is provided in incognito mode.
        return;
    }
    Tab tab = getActivityTab();
    if (tab != null && !isInOverviewMode()) {
        outContent.setWebUri(Uri.parse(tab.getUrl()));
    }
}
 
Example 3
Source File: ChromeActivity.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
@TargetApi(Build.VERSION_CODES.M)
public void onProvideAssistContent(AssistContent outContent) {
    if (getAssistStatusHandler() == null || !getAssistStatusHandler().isAssistSupported()) {
        // No information is provided in incognito mode.
        return;
    }
    Tab tab = getActivityTab();
    if (tab != null && !isInOverviewMode()) {
        outContent.setWebUri(Uri.parse(tab.getUrl()));
    }
}
 
Example 4
Source File: PostActivity.java    From materialup with Apache License 2.0 4 votes vote down vote up
@Override
@TargetApi(Build.VERSION_CODES.M)
public void onProvideAssistContent(AssistContent outContent) {
    outContent.setWebUri(Uri.parse(shot.url));
}
 
Example 5
Source File: DesignerNewsStory.java    From android-proguards with Apache License 2.0 4 votes vote down vote up
@Override @TargetApi(Build.VERSION_CODES.M)
public void onProvideAssistContent(AssistContent outContent) {
    outContent.setWebUri(Uri.parse(story.url));
}
 
Example 6
Source File: DribbbleShot.java    From android-proguards with Apache License 2.0 4 votes vote down vote up
@Override @TargetApi(Build.VERSION_CODES.M)
public void onProvideAssistContent(AssistContent outContent) {
    outContent.setWebUri(Uri.parse(shot.url));
}