Loading src/com/android/contacts/editor/CompactContactEditorFragment.java +8 −0 Original line number Diff line number Diff line Loading @@ -80,7 +80,11 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl Log.w(TAG, "Invalid photo selected"); } getContent().setPhoto(bitmap); // If a new photo was chosen but not yet saved, // we need to update the UI immediately mUpdatedPhotos.putParcelable(String.valueOf(mPhotoRawContactId), uri); getContent().setFullSizePhoto(uri); } @Override Loading Loading @@ -224,6 +228,10 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl // Set up the photo widget mPhotoHandler = createPhotoHandler(); mPhotoRawContactId = editorView.getPhotoRawContactId(); if (mUpdatedPhotos.containsKey(String.valueOf(mPhotoRawContactId))) { editorView.setFullSizePhoto((Uri) mUpdatedPhotos.getParcelable( String.valueOf(mPhotoRawContactId))); } editorView.setPhotoHandler(mPhotoHandler); // The editor is ready now so make it visible Loading src/com/android/contacts/editor/CompactPhotoEditorView.java +0 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ public class CompactPhotoEditorView extends LinearLayout implements View.OnClick private ValuesDelta mValuesDelta; private boolean mReadOnly; private boolean mIsPhotoSet; private MaterialColorMapUtils.MaterialPalette mMaterialPalette; private QuickContactImageView mPhotoImageView; Loading Loading @@ -94,7 +93,6 @@ public class CompactPhotoEditorView extends LinearLayout implements View.OnClick ViewIdGenerator viewIdGenerator) { mValuesDelta = valuesDelta; mReadOnly = readOnly; mMaterialPalette = materialPalette; setId(viewIdGenerator.getId(rawContactDelta, dataKind, valuesDelta, /* viewIndex =*/ 0)); Loading src/com/android/contacts/editor/CompactRawContactsEditorView.java +8 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import com.android.contacts.editor.CompactContactEditorFragment.PhotoHandler; import android.content.Context; import android.graphics.Bitmap; import android.net.Uri; import android.provider.ContactsContract.CommonDataKinds.Email; import android.provider.ContactsContract.CommonDataKinds.GroupMembership; import android.provider.ContactsContract.CommonDataKinds.Nickname; Loading Loading @@ -218,6 +219,13 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O mPhoto.setPhoto(bitmap); } /** * Pass through to {@link CompactPhotoEditorView#setFullSizedPhoto(Uri)}. */ public void setFullSizePhoto(Uri photoUri) { mPhoto.setFullSizedPhoto(photoUri); } /** * Pass through to {@link CompactPhotoEditorView#isWritablePhotoSet}. */ Loading Loading
src/com/android/contacts/editor/CompactContactEditorFragment.java +8 −0 Original line number Diff line number Diff line Loading @@ -80,7 +80,11 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl Log.w(TAG, "Invalid photo selected"); } getContent().setPhoto(bitmap); // If a new photo was chosen but not yet saved, // we need to update the UI immediately mUpdatedPhotos.putParcelable(String.valueOf(mPhotoRawContactId), uri); getContent().setFullSizePhoto(uri); } @Override Loading Loading @@ -224,6 +228,10 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl // Set up the photo widget mPhotoHandler = createPhotoHandler(); mPhotoRawContactId = editorView.getPhotoRawContactId(); if (mUpdatedPhotos.containsKey(String.valueOf(mPhotoRawContactId))) { editorView.setFullSizePhoto((Uri) mUpdatedPhotos.getParcelable( String.valueOf(mPhotoRawContactId))); } editorView.setPhotoHandler(mPhotoHandler); // The editor is ready now so make it visible Loading
src/com/android/contacts/editor/CompactPhotoEditorView.java +0 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ public class CompactPhotoEditorView extends LinearLayout implements View.OnClick private ValuesDelta mValuesDelta; private boolean mReadOnly; private boolean mIsPhotoSet; private MaterialColorMapUtils.MaterialPalette mMaterialPalette; private QuickContactImageView mPhotoImageView; Loading Loading @@ -94,7 +93,6 @@ public class CompactPhotoEditorView extends LinearLayout implements View.OnClick ViewIdGenerator viewIdGenerator) { mValuesDelta = valuesDelta; mReadOnly = readOnly; mMaterialPalette = materialPalette; setId(viewIdGenerator.getId(rawContactDelta, dataKind, valuesDelta, /* viewIndex =*/ 0)); Loading
src/com/android/contacts/editor/CompactRawContactsEditorView.java +8 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import com.android.contacts.editor.CompactContactEditorFragment.PhotoHandler; import android.content.Context; import android.graphics.Bitmap; import android.net.Uri; import android.provider.ContactsContract.CommonDataKinds.Email; import android.provider.ContactsContract.CommonDataKinds.GroupMembership; import android.provider.ContactsContract.CommonDataKinds.Nickname; Loading Loading @@ -218,6 +219,13 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O mPhoto.setPhoto(bitmap); } /** * Pass through to {@link CompactPhotoEditorView#setFullSizedPhoto(Uri)}. */ public void setFullSizePhoto(Uri photoUri) { mPhoto.setFullSizedPhoto(photoUri); } /** * Pass through to {@link CompactPhotoEditorView#isWritablePhotoSet}. */ Loading