History log of /frameworks/base/core/java/android/net/Uri.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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