summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-05-13 09:40:35 -0700
committerDeepanshu Gupta <deepanshu@google.com>2014-05-13 09:40:35 -0700
commita5461ebfaebf3337a0cf1c752334f23de145a6d1 (patch)
tree782c3d3179416b3ef5f3743b2e07477dcd402220 /core
parent9053261a5413f401168d25fa4a9749723b232949 (diff)
parent6d3c4ab2456a30c5517f4ad6fb8df8d64c517beb (diff)
downloadframeworks_base-a5461ebfaebf3337a0cf1c752334f23de145a6d1.zip
frameworks_base-a5461ebfaebf3337a0cf1c752334f23de145a6d1.tar.gz
frameworks_base-a5461ebfaebf3337a0cf1c752334f23de145a6d1.tar.bz2
resolved conflicts for merge of 6d3c4ab2 to jb-mr1-dev
Change-Id: I5c4634897882deb663f32d8148202d7c9189521d
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/ShareActionProvider.java6
-rw-r--r--core/java/com/android/internal/app/ActionBarImpl.java15
2 files changed, 16 insertions, 5 deletions
diff --git a/core/java/android/widget/ShareActionProvider.java b/core/java/android/widget/ShareActionProvider.java
index 4045497..1ae77b3 100644
--- a/core/java/android/widget/ShareActionProvider.java
+++ b/core/java/android/widget/ShareActionProvider.java
@@ -166,9 +166,11 @@ public class ShareActionProvider extends ActionProvider {
@Override
public View onCreateActionView() {
// Create the view and set its data model.
- ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
ActivityChooserView activityChooserView = new ActivityChooserView(mContext);
- activityChooserView.setActivityChooserModel(dataModel);
+ if (!activityChooserView.isInEditMode()) {
+ ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
+ activityChooserView.setActivityChooserModel(dataModel);
+ }
// Lookup and set the expand action icon.
TypedValue outTypedValue = new TypedValue();
diff --git a/core/java/com/android/internal/app/ActionBarImpl.java b/core/java/com/android/internal/app/ActionBarImpl.java
index 46478ca..a95fe2b 100644
--- a/core/java/com/android/internal/app/ActionBarImpl.java
+++ b/core/java/com/android/internal/app/ActionBarImpl.java
@@ -162,6 +162,15 @@ public class ActionBarImpl extends ActionBar {
init(dialog.getWindow().getDecorView());
}
+ /**
+ * Only for edit mode.
+ * @hide
+ */
+ public ActionBarImpl(View layout) {
+ assert layout.isInEditMode();
+ init(layout);
+ }
+
private void init(View decor) {
mContext = decor.getContext();
mOverlayLayout = (ActionBarOverlayLayout) decor.findViewById(
@@ -552,8 +561,8 @@ public class ActionBarImpl extends ActionBar {
return;
}
- final FragmentTransaction trans = mActivity.getFragmentManager().beginTransaction()
- .disallowAddToBackStack();
+ final FragmentTransaction trans = mActionView.isInEditMode() ? null :
+ mActivity.getFragmentManager().beginTransaction().disallowAddToBackStack();
if (mSelectedTab == tab) {
if (mSelectedTab != null) {
@@ -571,7 +580,7 @@ public class ActionBarImpl extends ActionBar {
}
}
- if (!trans.isEmpty()) {
+ if (trans != null && !trans.isEmpty()) {
trans.commit();
}
}