summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeff Hamilton <jham@android.com>2011-06-17 14:31:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-17 14:31:01 -0700
commit61a8e3508d8c9a885b9b064f70a4ce23b698d372 (patch)
treeeec4dae4ccc608659d3b6534120814647ddcd24a /src
parent90ee0619c5befc888569bbda46ad12dd3af2baa6 (diff)
parentfd77aaaa6b1b79ba0438a78e357aa877552830b1 (diff)
downloadpackages_apps_Browser-61a8e3508d8c9a885b9b064f70a4ce23b698d372.zip
packages_apps_Browser-61a8e3508d8c9a885b9b064f70a4ce23b698d372.tar.gz
packages_apps_Browser-61a8e3508d8c9a885b9b064f70a4ce23b698d372.tar.bz2
Merge "Launch into browser when a URL is received over NFC."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/IntentHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/browser/IntentHandler.java b/src/com/android/browser/IntentHandler.java
index 8d1b784..4a8fa22 100644
--- a/src/com/android/browser/IntentHandler.java
+++ b/src/com/android/browser/IntentHandler.java
@@ -27,6 +27,7 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
+import android.nfc.NfcAdapter;
import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.Browser;
@@ -95,6 +96,7 @@ public class IntentHandler {
boolean activateVoiceSearch = RecognizerResultsIntent
.ACTION_VOICE_SEARCH_RESULTS.equals(action);
if (Intent.ACTION_VIEW.equals(action)
+ || NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)
|| Intent.ACTION_SEARCH.equals(action)
|| MediaStore.INTENT_ACTION_MEDIA_SEARCH.equals(action)
|| Intent.ACTION_WEB_SEARCH.equals(action)
@@ -214,7 +216,8 @@ public class IntentHandler {
if (intent != null
&& (intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) == 0) {
final String action = intent.getAction();
- if (Intent.ACTION_VIEW.equals(action)) {
+ if (Intent.ACTION_VIEW.equals(action) ||
+ NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)) {
url = UrlUtils.smartUrlFilter(intent.getData());
if (url != null && url.startsWith("http")) {
final Bundle pairs = intent