ac3be9a28360051fb80b17c71e55e9e4f42b105e |
|
01-Feb-2016 |
Jeff Sharkey <jsharkey@android.com> |
File paths to system partition are okay-ish. Unless SELinux blocks it, all apps have identical access to files included on the system partition. Since there are a handful of useful files stored there, like ringtones and license files, carve out an exception to allow file:///system/ style paths. Note that StrictMode isn't a security mechanism, which is why we're not concerned about resolving canonical paths. Bug: 26895798 Change-Id: If0b659d30c4e51377edcf01445392759d1e4962e
/frameworks/base/core/java/android/net/Uri.java
|
344744b49633a7f8aa0c8e43469bbfcf9d8e2cab |
|
29-Jan-2016 |
Jeff Sharkey <jsharkey@android.com> |
Exposing file:// beyond your app is bad, m'kay? For several releases now we've told developers that sharing raw files between apps is a recipe for trouble. There are at least three major problems with sending raw files: -- Apps sending generic intents can't know who is at the other end, so they may not have access to shared storage locations. This is more likely now that runtime permissions require apps to explicitly ask users for permission. -- Apps making files in their private storage world-readable has been deprecated for several releases, and now in N it's fully blocked. If we let these intents through, the receiving app would fail to open the file, when the real blame rests on the sending app. -- Devices with user profiles can't share raw files when using cross-profile intent filters, since filesystem access is fully locked down between users. The time has finally come to communicate clearly that if you're sharing content between apps, you need to use content:// Uris. We added the simple FileProvider several years ago to give apps a clean way to migrate with minimal work on their part. Bug: 26860922, 9069185 Change-Id: I075f627f6a0d6c7fca2c090ca133b9aae9801c64
/frameworks/base/core/java/android/net/Uri.java
|
b6d1d7171dff2d2625ae183e8629d627882fb493 |
|
27-Apr-2015 |
Narayan Kamath <narayan@google.com> |
am cf6fc5ee: Merge "Fix incorrect javadoc for Uri.getQueryParameter." * commit 'cf6fc5ee13e549c6ce1a6a4fc417aa13fc0dfa17': Fix incorrect javadoc for Uri.getQueryParameter.
|
4356c95354d28b8ceb1b04e97c53c2ba3b3faa93 |
|
27-Apr-2015 |
Narayan Kamath <narayan@google.com> |
Fix incorrect javadoc for Uri.getQueryParameter. This first went out with Jelly Bean and not ICS. bug: https://code.google.com/p/android/issues/detail?id=61651 Change-Id: I26f6b18593fe089bd3a52ec1d159494923bcbad1
/frameworks/base/core/java/android/net/Uri.java
|
305ebe207a174c9f46146ad73572a601b8a28787 |
|
02-Apr-2015 |
Alex Klyubin <klyubin@google.com> |
resolved conflicts for merge of 261e7a37 to master Change-Id: If0a3389764965fe27bf567090a6e24069b61c544
|
3f24a1d94a42762c245a32272c797250a804cfc3 |
|
01-Apr-2015 |
Alex Klyubin <klyubin@google.com> |
Cleanse HTTP, HTTPS, and FTP URLs in Uri.toSafeString. This makes the hidden API android.net.Uri.toSafeString omit most parts of HTTP, HTTPS, and FTP URLs to avoid leaking anything unsafe. Only the host and port are retained for these URLs. Bug: 19215516 Change-Id: I2e9e33d9afaa9de5dd07a40532d56f0a2179f62a
/frameworks/base/core/java/android/net/Uri.java
|
b2a958fd3cbe9bf38983c25fbc25a705bc14be36 |
|
03-Feb-2015 |
Craig Mautner <cmautner@google.com> |
Remove path, query, and fragment from http Uri. For http and https schemes leave only scheme and authority in Uri.toSafeString(). Fixes bug 19217173. Change-Id: Ic07665f4754bb33ad48f7a55ce5efda185df7577
/frameworks/base/core/java/android/net/Uri.java
|
8f8a11b7fa26e603519131001ab46596aa30ba1a |
|
26-Nov-2013 |
Newton Allen <newt@google.com> |
Fix some documentation typos. Change-Id: I747a0ade5c7b9c45d4465bf327952338bbc1cfaa (cherry picked from commit 4465d1a03ee5fddc5987c19fc36b0bb79e19572f)
/frameworks/base/core/java/android/net/Uri.java
|
4465d1a03ee5fddc5987c19fc36b0bb79e19572f |
|
26-Nov-2013 |
Newton Allen <newt@google.com> |
Fix some documentation typos. Change-Id: I747a0ade5c7b9c45d4465bf327952338bbc1cfaa
/frameworks/base/core/java/android/net/Uri.java
|
846318a3250fa95f47a9decfbffb05a31dbd0006 |
|
04-Apr-2014 |
Jeff Sharkey <jsharkey@android.com> |
Allow prefix-based Uri permission grants. Define new FLAG_GRANT_PREFIX_URI_PERMISSION which indicates that a Uri permission grant should also apply to any other Uris that have matching scheme, authority, and path segments. For example, a prefix grant for /foo/ would allow /foo/bar/ but not /foo2/. Allow persistable and prefix grants to be issued directly through grantUriPermission(). Relaxing persistable is fine, since it still requires the receiver to actively take the permission. Since exact- and prefix-match grants for the same Uri can coexist, we track them separately using a new UriGrant key. (Consider the case where an app separately extends READ|PREFIX and WRITE for the same Uri: we can't let that become READ|WRITE|PREFIX.) Fix revoke to always take away persisted permissions. Move prefix matching logic to Uri and add tests. Add new flags to "am" tool, and various internal uses around Intent and Context. Switch some lagging users to ArraySet. Bug: 10607375 Change-Id: Ia8ce2b88421ff9f2fe5a979a27a026fc445d46f1
/frameworks/base/core/java/android/net/Uri.java
|
89a8250e242ee1d0b5b853154723b448d732b356 |
|
03-Aug-2013 |
Elliott Hughes <enh@google.com> |
am 710f3e2c: am 60ae2617: Merge "If frameworks wants ASCII casing, it should explicity ask for it." * commit '710f3e2cc6bc2cdc2f2cddb2190823ea31efd52a': If frameworks wants ASCII casing, it should explicity ask for it.
|
cb64d430627b71221c588ef5f23599dd34a89ee9 |
|
02-Aug-2013 |
Elliott Hughes <enh@google.com> |
If frameworks wants ASCII casing, it should explicity ask for it. http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html Bug: https://code.google.com/p/android/issues/detail?id=58359 Change-Id: Iaab02e718a7be7bda22e626dca05d79bfd2a8fc4
/frameworks/base/core/java/android/net/Uri.java
|
6e7affeb3d0d026db20690072d8a661847888a42 |
|
29-Jun-2013 |
Elliott Hughes <enh@google.com> |
am b8292830: resolved conflicts for merge of a920f25f to jb-mr2-dev-plus-aosp * commit 'b8292830f79fc76ffb9a1be5cd316212ac494d03': Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
|
a920f25fe55fc9afc7640902a200f19ce278588b |
|
29-Jun-2013 |
Elliott Hughes <enh@google.com> |
resolved conflicts for merge of fca0f92e to stage-aosp-master Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
|
d396a448b2e36e29598c954b64bfddef73f3fae0 |
|
29-Jun-2013 |
Elliott Hughes <enh@google.com> |
Switch frameworks/base over from @hidden Charsets to public StandardCharsets. Bug: 3484927 Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
/frameworks/base/core/java/android/net/Uri.java
|
4b9a4d16872bbb50712e007b419ac0b35ff1582d |
|
12-Jun-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Print - platform APIs Related changes: Skia (inlcude PDF APIs): https://googleplex-android-review.googlesource.com/#/c/305814/ Canvas to PDF: https://googleplex-android-review.googlesource.com/#/c/319367/ Settings (initial version): https://googleplex-android-review.googlesource.com/#/c/306077/ Build: https://googleplex-android-review.googlesource.com/#/c/292437/ Sample print services: https://googleplex-android-review.googlesource.com/#/c/281785/ Change-Id: I104d12efd12577f05c7b9b2a5e5e49125c0f09da
/frameworks/base/core/java/android/net/Uri.java
|
a14acd20b8d563319ea1a5974dca0e9a29f0aaef |
|
03-Apr-2013 |
Jeff Sharkey <jsharkey@android.com> |
Warn when exposing file:// Uris beyond a process. Check for file:// Uris inside Intents, ClipData, Notifications and RemoteViews when StrictMode option is enabled. Also introduces Intent.prepareToLeaveProcess() to uniformly handle Intents about to leave an app process. Bug: 8529070 Change-Id: I8efb43877cbc5f21eb029fc6492b3ee1415059ef
/frameworks/base/core/java/android/net/Uri.java
|
65c4a2b26cd8776b0927e9b0e07ecf53bd31b627 |
|
26-Sep-2012 |
Jeff Sharkey <jsharkey@android.com> |
Multi-user ringtone playback. Change RingtonePlayer to open content:// Uris based on requesting UserHandle. Grant SystemUI visibility to all emulated storage so it can play ringtones for apps without READ_EXTERNAL_STORAGE. Resolve canonical file:// Uris before passing out of source app, replacing any /emulated_legacy/-style paths with user-specific variant so they can be opened by SystemUI. Calling for RemoteViews, Ringtones, and Notifications. Bug: 7202982 Change-Id: Ibf0eca8df80c1486711144a7b648f464aadfe099
/frameworks/base/core/java/android/net/Uri.java
|
abc43ddd8ae098de7a56afc55909f904cd933016 |
|
10-May-2012 |
Jesse Wilson <jessewilson@google.com> |
Rename Uri.normalize() to Uri.normalizeScheme(). Change-Id: I67839656c7c1c16a5376c9894d699d2bad3c7a5c
/frameworks/base/core/java/android/net/Uri.java
|
ccae412deda8b0c165c86f395752c0667a3411a6 |
|
09-Jan-2012 |
Nick Pelly <npelly@google.com> |
Add API's for normalizing MIME's and URI's. Helps developers create well-behaved intents: - lower case MIME data type - strip parameters from MIME content types - lowercase URI scheme The new API's are normalizeAndSetType() normalizeAndSetData() normalizeAndSetDataAndType() Uri.normalize() normalizeMimeType() Change-Id: Ib5c907897f39b1f705bcc4c9103ba1e6f316380b
/frameworks/base/core/java/android/net/Uri.java
|
41e0839b136cdeccd2f45de1d9c56240f3933a1e |
|
11-Nov-2011 |
Jesse Wilson <jessewilson@google.com> |
Warn about changed behavior around '+' characters. Bug: http://code.google.com/p/android/issues/detail?id=21064 Change-Id: I086c2c8433f05185a1496e2662734d239d8cbb74
/frameworks/base/core/java/android/net/Uri.java
|
0f28af209ac877091f4a096f7553f02a0b401596 |
|
29-Oct-2011 |
Jesse Wilson <jessewilson@google.com> |
Interpret '+' as a space char in the URL query params. This changes Uri.decode() to use libcore's implementation of the same behavior. Bug: http://code.google.com/p/android/issues/detail?id=21064 Change-Id: If81005492b12d3aaecc745471e0a28679544a391
/frameworks/base/core/java/android/net/Uri.java
|
90c52de28691ca0bbbf7c039ef20f85ce46882cc |
|
23-Sep-2011 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #5173952: Opening a Notification From Lock Screen... ...Should Skip Unsecure Lockscreen (ICS) Also while I am in there, clean up logging of intent objects to include even less sensitive information, while showing the true Intent in dump output (since apps can't get to that). Change-Id: I35fed714645b21e4304ba38a11ebb9c4c963538e
/frameworks/base/core/java/android/net/Uri.java
|
8e8d65ff5fdef12c6af3d003dfef19aadc39bea9 |
|
12-Aug-2011 |
Dianne Hackborn <hackbod@google.com> |
Fix some crashes that are happening in the system process. - When shutting down, if the screen goes to sleep there is code that tries to do a notifyAll without holding the lock: java.lang.IllegalMonitorStateException: object not locked by thread before notifyAll() at java.lang.Object.notifyAll(Native Method) at com.android.server.am.ActivityStack.checkReadyForSleepLocked(ActivityStack.java:776) at com.android.server.am.ActivityStack$1.handleMessage(ActivityStack.java:282) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at com.android.server.ServerThread.run(SystemServer.java:603) - If an invalid Uri object is sent to the system process it can crash because the Uri class throws an assertion while unmarshalling. Change this to an IllegalArgumentException so it gets sent back to the caller: java.lang.AssertionError at android.net.Uri$PathPart.readFrom(Uri.java:2224) at android.net.Uri$HierarchicalUri.readFrom(Uri.java:1106) at android.net.Uri$1.createFromParcel(Uri.java:1689) at android.net.Uri$1.createFromParcel(Uri.java:1681) at android.content.IContentService$Stub.onTransact(IContentService.java:53) at android.content.ContentService.onTransact(ContentService.java:120) at android.os.Binder.execTransact(Binder.java:338) at dalvik.system.NativeStart.run(Native Method) - StrictMode can try to access the first index in the stack crawl of a stack crawl array of length 0. Not sure why this happens, but make the code more robust: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 at android.app.ApplicationErrorReport$CrashInfo.<init>(ApplicationErrorReport.java:341) at android.os.StrictMode$ViolationInfo.<init>(StrictMode.java:1978) at android.os.StrictMode$AndroidBlockGuardPolicy.startHandlingViolationException(StrictMode.java:1097) at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1068) at libcore.io.BlockGuardOs.read(BlockGuardOs.java:137) at libcore.io.IoBridge.read(IoBridge.java:426) at java.io.FileInputStream.read(FileInputStream.java:179) at java.io.InputStream.read(InputStream.java:148) at com.android.internal.os.ProcessStats.readFile(ProcessStats.java:804) at com.android.internal.os.ProcessStats.getCpuSpeedTimes(ProcessStats.java:564) at com.android.internal.os.ProcessStats.getLastCpuSpeedTimes(ProcessStats.java:545) at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1470) at com.android.server.am.ActivityManagerService.batteryNeedsCpuUpdate(ActivityManagerService.java:1522) at com.android.internal.os.BatteryStatsImpl$MyHandler.handleMessage(BatteryStatsImpl.java:110) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1302) (Also fix this code to not cause strict mode to trigger at all, because there is no need, because this is just reading stuff from /proc.) - The system seems to crash during boot if it thinks it needs to rotate the screen, when it is trying to take the freeze snapshot way too early. There is no need to freeze the screen during boot or if the screen is off: java.lang.NullPointerException at android.view.Surface.init(Native Method) at android.view.Surface.<init>(Surface.java:256) at com.android.server.wm.ScreenRotationAnimation.<init>(ScreenRotationAnimation.java:91) at com.android.server.wm.WindowManagerService.startFreezingDisplayLocked(WindowManagerService.java:8758) at com.android.server.wm.WindowManagerService.startAppFreezingScreenLocked(WindowManagerService.java:3971) at com.android.server.wm.WindowManagerService.startAppFreezingScreen(WindowManagerService.java:4003) at com.android.server.am.ActivityRecord.startFreezingScreenLocked(ActivityRecord.java:515) at com.android.server.am.ActivityStack.ensureActivityConfigurationLocked(ActivityStack.java:3997) at com.android.server.am.ActivityManagerService.updateConfigurationLocked(ActivityManagerService.java:12535) at com.android.server.am.ActivityManagerService.updateConfiguration(ActivityManagerService.java:12439) at com.android.server.wm.WindowManagerService.systemReady(WindowManagerService.java:6161) at com.android.server.ServerThread.run(SystemServer.java:521) Change-Id: I85062bb5f6b0909a0f52feedaa75e7611d9d7fbd
/frameworks/base/core/java/android/net/Uri.java
|
58a345936d7e2b66bdeefb492e4f777754792d7e |
|
19-Aug-2010 |
Ben Dodson <bjdodson@google.com> |
Added methods for managing uri query parameters Change-Id: Ic98c1bd159740dd4d895889079f9f2abae4fc2b9
/frameworks/base/core/java/android/net/Uri.java
|
4e8620f868e2490782ebb960404140ea9482c91d |
|
25-Aug-2010 |
Ben Dodson <bjdodson@google.com> |
Updated documentation for upcoming fix for @code tags Change-Id: Id7b163179132b9cf180afecb4e9e10ee39bcd415
/frameworks/base/core/java/android/net/Uri.java
|
f0cfe3438aea77b5193d94fb9fa0c8d37972b194 |
|
09-Aug-2010 |
Jeff Hamilton <jham@android.com> |
Add a few helpful APIs. Change-Id: Ie57aa71eb77a1e0fb058f4eb6f40d4144a6dfce7
/frameworks/base/core/java/android/net/Uri.java
|
9114a8bb8b241bb8d3be307b29e64ea64ab27901 |
|
11-May-2010 |
Keith Ito <kito@google.com> |
Fix for bug 2672749: StringIndexOutOfBoundsException in Uri.getQueryParameter Change-Id: I10b02306478d9c595dbcae0767b44c403d50e24a
/frameworks/base/core/java/android/net/Uri.java
|
e41c317348cfe23a78bfd97609c3489c6cc4a786 |
|
21-Mar-2010 |
Keith Ito <kito@google.com> |
Advance encodedKeySearchIndex if encodedKey matches a suffix of a parameter. Bug: 2524610 Change-Id: I51bbf8248133b61825d2ae14afe175cb4d0413b8
/frameworks/base/core/java/android/net/Uri.java
|
70ece8d334485af47edfb5bf3049bef2cf5f4df6 |
|
26-Oct-2009 |
Brad Fitzpatrick <bradfitz@android.com> |
Speed up Uri.getQueryParameter by allocating less. Sample hierarchial URL, from my ContactsProvider test case: content://com.android.contacts/data?account_name=braddroid%40gmail.com&account_type=com.google.GAIA&caller_is_syncadapter=true Without this patch: (fetching the "account_name" parameter) 10000 iters: 0.5293 ms average 10000 iters: 0.5119 ms average 10000 iters: 0.5158 ms average With this patch, rewriting it to not allocate memory (no implicit StringBuilder), but still no caching: 1) when it needs to decode something (i.e account_name above; allocates memory) 50000 iters: 0.28724 ms average 50000 iters: 0.31774 ms average 50000 iters: 0.28764 ms average 2) when it doesn't need to decode (and thus allocate memory, i.e. account_type above) 50000 iters: 0.0954 ms average 50000 iters: 0.09124 ms average 50000 iters: 0.09088 ms average
/frameworks/base/core/java/android/net/Uri.java
|
fc01794f33057862a361a0d0113630c58befc21b |
|
12-Jul-2009 |
Kenny Root <kenny@the-b.org> |
Make Uri.parseUserPart, parseHost, and parsePort symmetric Currently parseUserPart uses the encoded authority to split the URI into user and non-user parts, but the parseHost and parsePort uses the decoded URI to split the URI into non-host, host, and port parts. This gives unexpected results when %40 ('@') and %3a (':') is used in a URI: Uri test = Uri.parse("http://bob%40lee%3ajr@example.com:42/"); test.getUserInfo() => "bob@lee:jr" test.getHost() => "lee:jr@example.com" (should be "example.com") test.getPort() => -1 (should be 42)
/frameworks/base/core/java/android/net/Uri.java
|
61e4248f8f6ae8a8f40550cc0800e5190cd1dc09 |
|
29-Jul-2009 |
Jean-Baptiste Queru <jbq@google.com> |
merge from donut
|
a8675f67e33bc7337d148358783b0fd138b501ff |
|
29-Jul-2009 |
Jean-Baptiste Queru <jbq@google.com> |
donut snapshot
/frameworks/base/core/java/android/net/Uri.java
|
8aa393b03f6d1f25313c658334e9b86a86a6f61f |
|
10-Jun-2009 |
Simon Schoar <schoar@googlemail.com> |
Fixed typo, RFC3296 is for LDAP, RFC2396 is for URI
/frameworks/base/core/java/android/net/Uri.java
|
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/net/Uri.java
|
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/net/Uri.java
|
d24b8183b93e781080b2c16c487e60d51c12da31 |
|
11-Feb-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/net/Uri.java
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/core/java/android/net/Uri.java
|