Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1178)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/nfc/BeamCallback.java

Issue 2895293002: Android: tidy up outdated version checks. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/nfc/BeamCallback.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/nfc/BeamCallback.java b/chrome/android/java/src/org/chromium/chrome/browser/nfc/BeamCallback.java
index b9d733537eaf0fba2baee2be715cd237a8719b24..57c155ab8d5915216001f8f3a609934a32cd4938 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/nfc/BeamCallback.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/nfc/BeamCallback.java
@@ -4,14 +4,12 @@
package org.chromium.chrome.browser.nfc;
-import android.annotation.SuppressLint;
import android.app.Activity;
import android.nfc.NdefMessage;
import android.nfc.NdefRecord;
import android.nfc.NfcAdapter.CreateNdefMessageCallback;
import android.nfc.NfcAdapter.OnNdefPushCompleteCallback;
import android.nfc.NfcEvent;
-import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
@@ -52,13 +50,6 @@ class BeamCallback implements CreateNdefMessageCallback, OnNdefPushCompleteCallb
}
}
- // In ICS returning null from createNdefMessage will cause beam to send our market
- // link so we need to hook to the return from the beam overlay to display the error.
- // But in SDK_INT >= 16, beam won't activate, so the hook wouldn't go off. (b/5943350)
- // TODO(crbug.com/635567): Fix this properly.
- @SuppressLint("ObsoleteSdkInt")
- private static final boolean NFC_BUGS_ACTIVE = Build.VERSION.SDK_INT < 16;
-
// Arbitrarily chosen interval to delay toast to allow NFC animations to finish
// and our app to return to foreground.
private static final int TOAST_ERROR_DELAY_MS = 400;
@@ -124,11 +115,7 @@ class BeamCallback implements CreateNdefMessageCallback, OnNdefPushCompleteCallb
Toast.makeText(mActivity, errorStringId, Toast.LENGTH_SHORT).show();
}
};
- if (NFC_BUGS_ACTIVE) {
- mErrorRunnableIfBeamSent = errorRunnable;
- } else {
- ThreadUtils.runOnUiThread(errorRunnable);
- }
+ ThreadUtils.runOnUiThread(errorRunnable);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698