Android picture renamed after set as contact prompt could not load this picture

Source: Internet
Author: User

Select a picture to rename--set the picture as the contact icon--once again with the same picture renamed--When you set it to another contact Avatar to watch, the prompt cannot load this picture

Root cause: When the user goes to rename, gallery cannot receive the notification of data Chang, so the localimage filepath cannot be updated, resulting in the inability to load the picture.
Solution:cropimage before loading the picture, the first will go to the query image filepath and update.
Specific code:

Alps\packages\apps\gallery2\src\com\android\gallery3d\app\cropimage.java in the Getmediaitemfromintentdata () method:

Approx. 1404 lines:

try{
c = getcontentresolver (). Query (URI,
New string[] {Images.ImageColumns.ORIENTATION, Images.ImageColumns.DATA},
NULL, NULL, NULL);
if (c! = null && C.movetofirst ()) {
((localimage) item). Rotation = C.getint (0);
((localimage) item). FilePath = c.getstring (1);
}
}...

Android picture renamed after set as contact prompt could not load this picture

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.