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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/IntentHelper.java

Issue 10830012: [Android] Add chrome_java target for building Java code in the chromium layer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@reland
Patch Set: fix java build error Created 8 years, 4 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 unified diff | Download patch
« no previous file with comments | « chrome/android/java/chrome.xml ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.accounts.Account; 7 import android.accounts.Account;
8 import android.accounts.AccountManager; 8 import android.accounts.AccountManager;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 Intent send = new Intent(Intent.ACTION_SEND); 55 Intent send = new Intent(Intent.ACTION_SEND);
56 send.setType("message/rfc822"); 56 send.setType("message/rfc822");
57 if (possibleEmails.size() != 0) { 57 if (possibleEmails.size() != 0) {
58 send.putExtra(Intent.EXTRA_EMAIL, 58 send.putExtra(Intent.EXTRA_EMAIL,
59 possibleEmails.toArray(new String[possibleEmails.size()])); 59 possibleEmails.toArray(new String[possibleEmails.size()]));
60 } 60 }
61 send.putExtra(Intent.EXTRA_SUBJECT, subject); 61 send.putExtra(Intent.EXTRA_SUBJECT, subject);
62 send.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(body)); 62 send.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(body));
63 try { 63 try {
64 Intent chooser = Intent.createChooser(send, chooserTitle)); 64 Intent chooser = Intent.createChooser(send, chooserTitle);
65 // we start this activity outside the main activity. 65 // we start this activity outside the main activity.
66 chooser.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 66 chooser.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
67 context.startActivity(chooser); 67 context.startActivity(chooser);
68 } catch (android.content.ActivityNotFoundException ex) { 68 } catch (android.content.ActivityNotFoundException ex) {
69 // If no app handles it, do nothing. 69 // If no app handles it, do nothing.
70 } 70 }
71 } 71 }
72 } 72 }
OLDNEW
« no previous file with comments | « chrome/android/java/chrome.xml ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698