Remove Nfc beam sharing capability

The Nfc Beam feature is now removed.

Test: m Gallery2
Bug: 236980291
Change-Id: I0de0904e74a73471a785b87cafebccbe25e7450f
(cherry picked from commit 617969afea0cca94aa2e76e23edc068453383389)
diff --git a/src/com/android/gallery3d/ui/ActionModeHandler.java b/src/com/android/gallery3d/ui/ActionModeHandler.java
index 605de39..5e3a559 100644
--- a/src/com/android/gallery3d/ui/ActionModeHandler.java
+++ b/src/com/android/gallery3d/ui/ActionModeHandler.java
@@ -21,7 +21,6 @@
 import android.app.AlertDialog;
 import android.content.Intent;
 import android.net.Uri;
-import android.nfc.NfcAdapter;
 import android.os.Handler;
 import android.view.ActionMode;
 import android.view.ActionMode.Callback;
@@ -70,7 +69,6 @@
     private final AbstractGalleryActivity mActivity;
     private final MenuExecutor mMenuExecutor;
     private final SelectionManager mSelectionManager;
-    private final NfcAdapter mNfcAdapter;
     private Menu mMenu;
     private MenuItem mSharePanoramaMenuItem;
     private MenuItem mShareMenuItem;
@@ -133,7 +131,6 @@
         mSelectionManager = Utils.checkNotNull(selectionManager);
         mMenuExecutor = new MenuExecutor(activity, selectionManager);
         mMainHandler = new Handler(activity.getMainLooper());
-        mNfcAdapter = NfcAdapter.getDefaultAdapter(mActivity.getAndroidContext());
         mToolbar = mActivity.getToolbar();
     }
 
@@ -352,14 +349,6 @@
         return size <= max;
     }
 
-    @TargetApi(ApiHelper.VERSION_CODES.JELLY_BEAN)
-    private void setNfcBeamPushUris(Uri[] uris) {
-        if (mNfcAdapter != null && ApiHelper.HAS_SET_BEAM_PUSH_URIS) {
-            mNfcAdapter.setBeamPushUrisCallback(null, mActivity);
-            mNfcAdapter.setBeamPushUris(uris, mActivity);
-        }
-    }
-
     // Share intent needs to expand the selection set so we can get URI of
     // each media item
     private Intent computePanoramaSharingIntent(JobContext jc, int maxItems) {
@@ -398,7 +387,6 @@
     private Intent computeSharingIntent(JobContext jc, int maxItems) {
         ArrayList<Path> expandedPaths = mSelectionManager.getSelected(true, maxItems);
         if (expandedPaths == null || expandedPaths.size() == 0) {
-            setNfcBeamPushUris(null);
             return new Intent();
         }
         final ArrayList<Uri> uris = new ArrayList<Uri>();
@@ -429,9 +417,6 @@
                 intent.putExtra(Intent.EXTRA_STREAM, uris.get(0));
             }
             intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
-            setNfcBeamPushUris(uris.toArray(new Uri[uris.size()]));
-        } else {
-            setNfcBeamPushUris(null);
         }
 
         return intent;