Example usage for android.webkit URLUtil isFileUrl

List of usage examples for android.webkit URLUtil isFileUrl

Introduction

In this page you can find the example usage for android.webkit URLUtil isFileUrl.

Prototype

public static boolean isFileUrl(String url) 

Source Link

Usage

From source file:com.nttec.everychan.ui.MainActivity.java

private void handleUriIntent(Intent intent) {
    TabsTrackerService.clearUnread();/*from  www  .  jav  a 2 s. com*/
    if (intent != null) {
        if (intent.getBooleanExtra(TabsTrackerService.EXTRA_CLEAR_SUBSCRIPTIONS, false))
            TabsTrackerService.clearSubscriptions();
        if (MainApplication.getInstance().settings.useFakeBrowser())
            FakeBrowser.dismiss();
        if (intent.getData() != null && URLUtil.isFileUrl(intent.getDataString())) {
            LocalHandler.open(intent.getData().getPath(), this);
            return;
        }
        String url = intent.getDataString();
        if (url != null && url.length() != 0) {
            UrlHandler.open(url, this, MainApplication.getInstance().settings.useFakeBrowser());
        }
        intent.setData(null);
    }
}