Home
last modified time | relevance | path

Searched refs:urlAsString (Results 1 – 2 of 2) sorted by relevance

/development/samples/ShortcutSample/src/com/example/android/shortcutsample/
DShortcutHelper.java161 public ShortcutInfo createShortcutForUrl(String urlAsString) { in createShortcutForUrl() argument
162 Log.i(TAG, "createShortcutForUrl: " + urlAsString); in createShortcutForUrl()
163 urlAsString = normalizeUrl(urlAsString); in createShortcutForUrl()
165 final ShortcutInfo.Builder b = new ShortcutInfo.Builder(mContext, urlAsString); in createShortcutForUrl()
167 final Uri uri = Uri.parse(urlAsString); in createShortcutForUrl()
199 private String normalizeUrl(String urlAsString) { in normalizeUrl() argument
200 if (urlAsString.startsWith("http://") || urlAsString.startsWith("https://")) { in normalizeUrl()
201 return urlAsString; in normalizeUrl()
203 return "http://" + urlAsString; in normalizeUrl()
207 public void addWebSiteShortcut(String urlAsString, boolean forPin) { in addWebSiteShortcut() argument
[all …]
/development/samples/browseable/AppShortcuts/src/com.example.android.appshortcuts/
DShortcutHelper.java159 private ShortcutInfo createShortcutForUrl(String urlAsString) { in createShortcutForUrl() argument
160 Log.i(TAG, "createShortcutForUrl: " + urlAsString); in createShortcutForUrl()
162 final ShortcutInfo.Builder b = new ShortcutInfo.Builder(mContext, urlAsString); in createShortcutForUrl()
164 final Uri uri = Uri.parse(urlAsString); in createShortcutForUrl()
196 private String normalizeUrl(String urlAsString) { in normalizeUrl() argument
197 if (urlAsString.startsWith("http://") || urlAsString.startsWith("https://")) { in normalizeUrl()
198 return urlAsString; in normalizeUrl()
200 return "http://" + urlAsString; in normalizeUrl()
204 public void addWebSiteShortcut(String urlAsString) { in addWebSiteShortcut() argument
205 final String uriFinal = urlAsString; in addWebSiteShortcut()