mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 869123: Fix setIntent() call in ActionProvider. [r=mfinkle]
--HG-- extra : rebase_source : 413831c09b3df15383ba07671468af999e89134d
This commit is contained in:
parent
09fcd73c21
commit
4f6c161558
@ -1542,9 +1542,16 @@ abstract public class BrowserApp extends GeckoApp
|
||||
if (Build.VERSION.SDK_INT >= 14) {
|
||||
GeckoActionProvider provider = (GeckoActionProvider) share.getActionProvider();
|
||||
if (provider != null) {
|
||||
Intent shareIntent = GeckoAppShell.getShareIntent(this, url,
|
||||
"text/plain", tab.getDisplayTitle());
|
||||
provider.setIntent(shareIntent);
|
||||
Intent shareIntent = provider.getIntent();
|
||||
|
||||
if (shareIntent == null) {
|
||||
shareIntent = GeckoAppShell.getShareIntent(this, url,
|
||||
"text/plain", tab.getDisplayTitle());
|
||||
provider.setIntent(shareIntent);
|
||||
} else {
|
||||
shareIntent.putExtra(Intent.EXTRA_TEXT, url);
|
||||
shareIntent.putExtra(Intent.EXTRA_SUBJECT, tab.getDisplayTitle());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,6 +101,11 @@ public class GeckoActionProvider extends ActionProvider {
|
||||
mHistoryFileName = historyFile;
|
||||
}
|
||||
|
||||
public Intent getIntent() {
|
||||
ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mHistoryFileName);
|
||||
return dataModel.getIntent();
|
||||
}
|
||||
|
||||
public void setIntent(Intent intent) {
|
||||
ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mHistoryFileName);
|
||||
dataModel.setIntent(intent);
|
||||
|
Loading…
Reference in New Issue
Block a user