Merge "Fix clipping wrapped Button text" into lmp-mr1-dev
diff --git a/src/com/android/contacts/activities/ContactEditorActivity.java b/src/com/android/contacts/activities/ContactEditorActivity.java
index 5f382a7..c350da9 100644
--- a/src/com/android/contacts/activities/ContactEditorActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorActivity.java
@@ -95,31 +95,15 @@
ActionBar actionBar = getActionBar();
if (actionBar != null) {
- // Inflate a custom action bar that contains the "done" button for saving changes
- // to the contact
- LayoutInflater inflater = (LayoutInflater) getSystemService
- (Context.LAYOUT_INFLATER_SERVICE);
- View customActionBarView = inflater.inflate(R.layout.editor_custom_action_bar, null);
- View saveMenuItem = customActionBarView.findViewById(R.id.save_menu_item);
- saveMenuItem.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- mFragment.doSaveAction();
- }
- });
- TextView title = (TextView) customActionBarView.findViewById(R.id.title);
if (Intent.ACTION_EDIT.equals(action)) {
- title.setText(getResources().getString(
+ actionBar.setTitle(getResources().getString(
R.string.contact_editor_title_existing_contact));
} else {
- title.setText(getResources().getString(
+ actionBar.setTitle(getResources().getString(
R.string.contact_editor_title_new_contact));
}
- // Show the custom action bar but hide the home icon and title
- actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
- ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME |
- ActionBar.DISPLAY_SHOW_TITLE);
- actionBar.setCustomView(customActionBarView);
+ actionBar.setDisplayShowHomeEnabled(true);
+ actionBar.setDisplayHomeAsUpEnabled(true);
}
mFragment = (ContactEditorFragment) getFragmentManager().findFragmentById(
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index a5057d3..4ff6b9e 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -1125,6 +1125,7 @@
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
+ case android.R.id.home:
case R.id.menu_done:
return save(SaveMode.CLOSE);
case R.id.menu_discard:
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 849bae3..277d1bf 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -2224,6 +2224,9 @@
}
private boolean isShortcutCreatable() {
+ if (mContactData == null || mContactData.isUserProfile()) {
+ return false;
+ }
final Intent createShortcutIntent = new Intent();
createShortcutIntent.setAction(ACTION_INSTALL_SHORTCUT);
final List<ResolveInfo> receivers = getPackageManager()