The AndroidManifest.xml File - ìëë¡ì´ë 기ì 커뮤ëí° : Korea ...
The AndroidManifest.xml File - ìëë¡ì´ë 기ì 커뮤ëí° : Korea ...
The AndroidManifest.xml File - ìëë¡ì´ë 기ì 커뮤ëí° : Korea ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Parcel : Activie Objects (<strong>File</strong>Descriptor)<br />
protected final Parcel<strong>File</strong>Descriptor open<strong>File</strong>Helper(Uri uri, String mode) throws <strong>File</strong>NotFoundException {<br />
Cursor c = query(uri, new String[]{"_data"}, null, null, null);<br />
int count = (c != null) ? c.getCount() : 0;<br />
if (count != 1) {<br />
// If there is not exactly one result, throw an appropriate<br />
// exception.<br />
if (c != null) {<br />
cclose(); c.close();<br />
}<br />
if (count == 0) {<br />
throw new <strong>File</strong>NotFoundException("No entry for " + uri);<br />
}<br />
throw new <strong>File</strong>NotFoundException("Multiple ti lti l items at " + uri);<br />
}<br />
c.moveToFirst();<br />
int i = c.getColumnIndex("_data");<br />
(_ String path = (i >= 0 ? c.getString(i) : null);<br />
c.close();<br />
if (path == null) {<br />
throw new <strong>File</strong>NotFoundException("Column _data not found.");<br />
}<br />
}<br />
int modeBits = ContentResolver.modeToMode(uri, mode);<br />
return Parcel<strong>File</strong>Descriptor.open(new <strong>File</strong>(path), modeBits);<br />
<strong>Korea</strong> Android Community- www.kandroid.org<br />
29