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

Unified Diff: demos/src/main/java/org/chromium/customtabsdemos/ShareBroadcastReceiver.java

Issue 1750963002: Update demo with features from support lib 23.2.0 (Closed) Base URL: https://chromium.googlesource.com/external/github.com/GoogleChrome/custom-tabs-client@master
Patch Set: Fix comment on decoding Bitmpa on UI thread Created 4 years, 10 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: 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);
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698