Index: demos/src/main/java/org/chromium/customtabsdemos/ShareBroadcastReceiver.java |
diff --git a/demos/src/main/java/org/chromium/customtabsdemos/ShareBroadcastReceiver.java b/demos/src/main/java/org/chromium/customtabsdemos/ShareBroadcastReceiver.java |
deleted file mode 100644 |
index e87a416c34f018fe6197ef3195bfda8cc9eccf9e..0000000000000000000000000000000000000000 |
--- a/demos/src/main/java/org/chromium/customtabsdemos/ShareBroadcastReceiver.java |
+++ /dev/null |
@@ -1,41 +0,0 @@ |
-// Copyright 2015 Google Inc. All Rights Reserved. |
-// |
-// Licensed under the Apache License, Version 2.0 (the "License"); |
-// you may not use this file except in compliance with the License. |
-// You may obtain a copy of the License at |
-// |
-// http://www.apache.org/licenses/LICENSE-2.0 |
-// |
-// Unless required by applicable law or agreed to in writing, software |
-// distributed under the License is distributed on an "AS IS" BASIS, |
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
-// See the License for the specific language governing permissions and |
-// limitations under the License. |
- |
-package org.chromium.customtabsdemos; |
- |
-import android.content.BroadcastReceiver; |
-import android.content.Context; |
-import android.content.Intent; |
- |
-/** |
- * A BroadcastReceiver that handles the Action Intent from the Custom Tab and fires a Share Intent. |
- */ |
-public class ShareBroadcastReceiver extends BroadcastReceiver { |
- |
- @Override |
- public void onReceive(Context context, Intent intent) { |
- String url = intent.getDataString(); |
- |
- if (url != null) { |
- Intent shareIntent = new Intent(Intent.ACTION_SEND); |
- shareIntent.setType("text/plain"); |
- shareIntent.putExtra(Intent.EXTRA_TEXT, url); |
- |
- Intent chooserIntent = Intent.createChooser(shareIntent, "Share url"); |
- chooserIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
- |
- context.startActivity(chooserIntent); |
- } |
- } |
-} |