34739 Commits

Author SHA1 Message Date
Raph Levien
0325fc366a am 12618bf7: am 7c1b1087: Merge "Fix for "Can\'t place cursor after combining accent"" into klp-dev
* commit '12618bf7f58ec7a23c6e25db1eec41332727edf8':
  Fix for "Can't place cursor after combining accent"
2013-09-20 16:34:00 -07:00
Raph Levien
12618bf7f5 am 7c1b1087: Merge "Fix for "Can\'t place cursor after combining accent"" into klp-dev
* commit '7c1b10872f3d57b3afdb0f070fcf602e4d72df37':
  Fix for "Can't place cursor after combining accent"
2013-09-20 16:31:22 -07:00
Raph Levien
7c1b10872f Merge "Fix for "Can't place cursor after combining accent"" into klp-dev 2013-09-20 23:27:57 +00:00
Igor Murashkin
c94a8322cb am 5b65ad41: am ab98a0b1: Merge "camera2: Add more camera device states, make #openCamera async." into klp-dev
* commit '5b65ad41b2a748fe5c3c24107ffe767ce8a8d8dc':
  camera2: Add more camera device states, make #openCamera async.
2013-09-20 16:26:36 -07:00
destradaa
fb339b8a0f am 93d3bdb6: am 47d620ac: Merge "Ensure access to the map of geofence callbacks is synchronized in all cases Fix Java reference leak in the JNI layer" into klp-dev
* commit '93d3bdb61a7c868d41a259b56af0914d2f6b2303':
  Ensure access to the map of geofence callbacks is synchronized in all cases Fix Java reference leak in the JNI layer
2013-09-20 16:26:33 -07:00
Igor Murashkin
5b65ad41b2 am ab98a0b1: Merge "camera2: Add more camera device states, make #openCamera async." into klp-dev
* commit 'ab98a0b116884aae3c5a90ddf87fe677e2a351a1':
  camera2: Add more camera device states, make #openCamera async.
2013-09-20 16:24:01 -07:00
destradaa
93d3bdb61a am 47d620ac: Merge "Ensure access to the map of geofence callbacks is synchronized in all cases Fix Java reference leak in the JNI layer" into klp-dev
* commit '47d620ac282870f1f7142bd86ab32d14ad9ee91f':
  Ensure access to the map of geofence callbacks is synchronized in all cases Fix Java reference leak in the JNI layer
2013-09-20 16:23:58 -07:00
Igor Murashkin
ab98a0b116 Merge "camera2: Add more camera device states, make #openCamera async." into klp-dev 2013-09-20 23:21:51 +00:00
destradaa
47d620ac28 Merge "Ensure access to the map of geofence callbacks is synchronized in all cases Fix Java reference leak in the JNI layer" into klp-dev 2013-09-20 23:18:15 +00:00
Adam Lesinski
5fc67f98b9 am a35ff661: am d473ebb7: Merge "Surfaces ParcelFileDescriptor#parseMode() as API" into klp-dev
* commit 'a35ff66127d07117e93268482d7e9719abfd58c3':
  Surfaces ParcelFileDescriptor#parseMode() as API
2013-09-20 16:05:21 -07:00
Jeff Sharkey
f439bcd953 am 578f67c2: am dfed2448: Merge "Delegate mkdirs() to vold when lacking perms." into klp-dev
* commit '578f67c25c6bb160cf30bf39b7e41bc039000a5c':
  Delegate mkdirs() to vold when lacking perms.
2013-09-20 16:05:16 -07:00
Adam Lesinski
a35ff66127 am d473ebb7: Merge "Surfaces ParcelFileDescriptor#parseMode() as API" into klp-dev
* commit 'd473ebb7c4f212cb9f74fe748bb8b95d7d126417':
  Surfaces ParcelFileDescriptor#parseMode() as API
2013-09-20 16:01:34 -07:00
Jeff Sharkey
578f67c25c am dfed2448: Merge "Delegate mkdirs() to vold when lacking perms." into klp-dev
* commit 'dfed244876d6c0ddd8d8bd2b8f3b970cd0a1ab95':
  Delegate mkdirs() to vold when lacking perms.
2013-09-20 16:01:28 -07:00
Adam Lesinski
d473ebb7c4 Merge "Surfaces ParcelFileDescriptor#parseMode() as API" into klp-dev 2013-09-20 22:59:12 +00:00
Jeff Sharkey
dfed244876 Merge "Delegate mkdirs() to vold when lacking perms." into klp-dev 2013-09-20 22:56:07 +00:00
Raph Levien
373b7a8d4e Fix for "Can't place cursor after combining accent"
This patch fixes behavior where attempting to place the cursor at
the end of a string where the last character is a combining accent
actually placed it before that accent. This was especially annoying
for editing Thai text, because it made it difficult to delete a
trailing tone mark.

Fixes bug 8947569 "Can't place cursor after combining accent" and bug
10398332 "[Thailand] Thai Language(IME) -- Can't delete Thai tone mark
while writing message"

Change-Id: Ida1933c8f0ab6cdb0200db39891e9389e4bdba86
2013-09-20 15:21:47 -07:00
destradaa
7f02eb2c84 Ensure access to the map of geofence callbacks is synchronized in all cases
Fix Java reference leak in the JNI layer

Bug: 10624887
Change-Id: I656973653d82c73a7ba2b51f22989ffed144c5df
2013-09-20 15:19:00 -07:00
Adam Lesinski
eb8c3f93ed Surfaces ParcelFileDescriptor#parseMode() as API
Moves ContentResolver#modeToMode() to ParcelFileDescriptor#parseMode()

bug:10711271
Change-Id: I28a5de4ca70adfbec4caf739863b77f0fd7fd9a4
2013-09-20 14:59:34 -07:00
Jeff Sharkey
2d8b4e8013 Delegate mkdirs() to vold when lacking perms.
Apps without sdcard_r or sdcard_rw are still able to write to
their package-specific directory, but someone needs to first make
that directory on their behalf.  This change will delegate the
mkdirs() call through to vold when an app fails to create directly.

MountService validates that the path belongs to the calling user, and
that it's actually on external storage, before passing to vold.

Update Environment to make app-vs-vold paths clearer.

Bug: 10577808
Change-Id: I43b4a77fd6d2b9af2a0d899790da8d9d89386776
2013-09-20 14:34:02 -07:00
David Christie
2875fb8586 am 0e500803: am f31a7897: Merge "Clear names from externally supplied WorkSources to WifiManager (b/10733757)" into klp-dev
* commit '0e50080395d2ed9e3c703f769ea3fb84706f989a':
  Clear names from externally supplied WorkSources to WifiManager (b/10733757)
2013-09-20 13:13:54 -07:00
David Christie
0e50080395 am f31a7897: Merge "Clear names from externally supplied WorkSources to WifiManager (b/10733757)" into klp-dev
* commit 'f31a78977401b155c0781dfe7d7cb6b7b38543c0':
  Clear names from externally supplied WorkSources to WifiManager (b/10733757)
2013-09-20 13:06:49 -07:00
David Christie
f31a789774 Merge "Clear names from externally supplied WorkSources to WifiManager (b/10733757)" into klp-dev 2013-09-20 20:04:04 +00:00
David Christie
a31510e47a Clear names from externally supplied WorkSources to WifiManager (b/10733757)
Change-Id: I36102f13962df2093c1e35fb40081ead647eff32
2013-09-20 11:41:41 -07:00
Dianne Hackborn
af7968497e am 2d696ff9: am 76e6bcb8: Merge "Fix issue #10310128: CTS: android.security.cts.ServicePermissionsTest" into klp-dev
* commit '2d696ff910479457b0f01421c93f2f8516f64b13':
  Fix issue #10310128: CTS: android.security.cts.ServicePermissionsTest
2013-09-20 11:29:19 -07:00
Chet Haase
d0bcf4b76b am 6736d380: am bdb61865: Merge "Add equals() and hashcode() to SpannableString" into klp-dev
* commit '6736d380b7d318f3af84294ae38a881e2dc54528':
  Add equals() and hashcode() to SpannableString
2013-09-20 11:29:16 -07:00
Adam Lesinski
e6ed04a7ec am 2dc3c739: am ff5cbab5: Merge "Ensures that CompatibilityInfo is always set in Resources" into klp-dev
* commit '2dc3c7398b2d8965f8017bc25f2e9a29c6b83c3d':
  Ensures that CompatibilityInfo is always set in Resources
2013-09-20 11:29:12 -07:00
Dianne Hackborn
2d696ff910 am 76e6bcb8: Merge "Fix issue #10310128: CTS: android.security.cts.ServicePermissionsTest" into klp-dev
* commit '76e6bcb8c6f8804c6e32d359ee464e7f288291a4':
  Fix issue #10310128: CTS: android.security.cts.ServicePermissionsTest
2013-09-20 11:24:52 -07:00
Chet Haase
6736d380b7 am bdb61865: Merge "Add equals() and hashcode() to SpannableString" into klp-dev
* commit 'bdb6186580875982dd1a537b6c935922d0e62fe3':
  Add equals() and hashcode() to SpannableString
2013-09-20 11:24:49 -07:00
Adam Lesinski
2dc3c7398b am ff5cbab5: Merge "Ensures that CompatibilityInfo is always set in Resources" into klp-dev
* commit 'ff5cbab50076baa06333b6ee05cc04c882a7ba13':
  Ensures that CompatibilityInfo is always set in Resources
2013-09-20 11:24:46 -07:00
Dianne Hackborn
76e6bcb8c6 Merge "Fix issue #10310128: CTS: android.security.cts.ServicePermissionsTest" into klp-dev 2013-09-20 18:23:08 +00:00
Chet Haase
bdb6186580 Merge "Add equals() and hashcode() to SpannableString" into klp-dev 2013-09-20 18:22:54 +00:00
Adam Lesinski
ff5cbab500 Merge "Ensures that CompatibilityInfo is always set in Resources" into klp-dev 2013-09-20 18:22:17 +00:00
Jim Miller
3f943b1143 am f3d1ef00: am af638c4f: Merge "Add camera affordance to navigation bar on phones" into klp-dev
* commit 'f3d1ef00c571657bd0464d157905c6b4fae2136f':
  Add camera affordance to navigation bar on phones
2013-09-20 11:21:11 -07:00
Svetoslav
6e1e8b17c5 am c0e1ae01: am facc08c7: Merge "Move PdfDocument to android.graphics.pdf" into klp-dev
* commit 'c0e1ae0176b2ce23ea1b19883507cd920712289a':
  Move PdfDocument to android.graphics.pdf
2013-09-20 11:21:05 -07:00
Adam Lesinski
79a8ffe54f Ensures that CompatibilityInfo is always set in Resources
- Adds null checks when setting mCompatibilityInfo and uses default no-op
  CompatibilityInfo object instead of null
- Removes null checks when calling methods on mCompatibilityInfo since it is never
  null

bug:10204942

Change-Id: I36e88f5cdceb46b8b19fb902270ef74023a81546
2013-09-20 11:04:40 -07:00
Dianne Hackborn
a2067473e8 Fix issue #10310128: CTS: android.security.cts.ServicePermissionsTest
Change-Id: Id6432fc1b62db41c6c291ec08450c2fc37ced899
2013-09-20 10:54:16 -07:00
Dianne Hackborn
9bef5b67dc resolved conflicts for merge of 20021b30 to master
Change-Id: Ie758de25a277ed0a25bf08e4cd2c57c9519bd52d
2013-09-20 10:40:34 -07:00
Craig Mautner
2c34bd6a9a am cd569b31: am e8a94224: Merge "Return tasks in correct order." into klp-dev
* commit 'cd569b31d398fe846eeee567d2816a3bb93dd493':
  Return tasks in correct order.
2013-09-20 09:58:22 -07:00
Christopher Tate
0719715586 am 654aad21: am 9c5cc571: Merge "Support for "not the home app you\'re looking for" metadata" into klp-dev
* commit '654aad21609642f7d0891962d72c0dfd4077fb94':
  Support for "not the home app you're looking for" metadata
2013-09-20 09:58:18 -07:00
Igor Murashkin
5c9eaf6796 camera2: Add more camera device states, make #openCamera async.
* Move CAMERA_IN_USE, MAX_CAMERAS_IN_USE to StateListener#onError
* Copy CAMERA_DISABLED to StateListener#onError

Bug: 10360518
Change-Id: Idd8cf42e1511d12682018588b2b413116cf65116
2013-09-19 19:01:32 -07:00
Jim Miller
f3d1ef00c5 am af638c4f: Merge "Add camera affordance to navigation bar on phones" into klp-dev
* commit 'af638c4f9daa74b4c8e0905f07e11290f6845abe':
  Add camera affordance to navigation bar on phones
2013-09-19 18:36:57 -07:00
Jim Miller
af638c4f9d Merge "Add camera affordance to navigation bar on phones" into klp-dev 2013-09-20 01:33:28 +00:00
Svetoslav
c0e1ae0176 am facc08c7: Merge "Move PdfDocument to android.graphics.pdf" into klp-dev
* commit 'facc08c7757cef56da6d10e78ce99ef7949700e3':
  Move PdfDocument to android.graphics.pdf
2013-09-19 18:17:05 -07:00
Svetoslav
facc08c775 Merge "Move PdfDocument to android.graphics.pdf" into klp-dev 2013-09-20 01:14:02 +00:00
Svetoslav
44634bbefc resolved conflicts for merge of db7659e0 to master
Change-Id: I6b56fabd07b18dfcb25be83834e4f248f8aa4a40
2013-09-19 17:44:13 -07:00
Chet Haase
9b985721da Add equals() and hashcode() to SpannableString
ActionBar uses a transition to animate text changes. This transition
depends on testing the equality of start/end text values in CharSequence
objects. Without equals(), SpannableString will return false for objects
whose references are different, but whose text is exactly the same.

This CL adds the equals() method, and the accompanying hashcode method,
to ensure that two Spanned implementations will always be equal
if their text and span data are equal.

Issue #10760075 Wrong unread count in actionbar

Change-Id: I5e77d40dd302eca035e8c56d40f3cd0aef8e6424
2013-09-19 17:18:55 -07:00
Jim Miller
caf24fc2c4 Add camera affordance to navigation bar on phones
This adds a camera button on phones that can be used to show
and launch the camera.

- Minor refactoring of touch event dispatch in PagedView.
- Disables usability hints when keyguard loads.
- Only add a touch handler for camera icon once during layout.
- Update after review.
- Updated with latest UX camera and camera background assets

Change-Id: I09cd5cb0e501fd0f4659bea96d00c92b07f805c4
2013-09-19 17:14:59 -07:00
Svetoslav
6811f4e92c Move PdfDocument to android.graphics.pdf
1. Move PdfDocument to android.graphics.pdf.

2. Changed the PdfDocument as per API concil request.

3. Updated the documentation.

bug:10461180
bug:10552565
bug:10681585
bug:10552336

Change-Id: I08e15b34cf37bb064248c887e6f59808019cafe8
2013-09-19 17:12:47 -07:00
Dianne Hackborn
20021b300f am 70817c47: Merge "Implement issue #10691475: Kill cached processes if about to..." into klp-dev
* commit '70817c479aa05778733d9afc809c311e8030b000':
  Implement issue #10691475: Kill cached processes if about to...
2013-09-19 14:49:35 -07:00
Dianne Hackborn
3bc8f78d7a Implement issue #10691475: Kill cached processes if about to...
...be uncached and too large

When the device is in a low RAM state, when we go to pull a cached
process out to use for some background operation, we can now kill
the current process if we consider its size to be too large.

Note that the current implementation for killing processes is to
just use the same killUnneededProcessLocked() method that we already
have for other things like too many cached processes.  This is a
little wrong here, though, because in this case we are at the
point where the caller is actually looking for a process to use.
This current code is not actually removing or cleaning up the
process, so we still need to return the now killed ProcessRecord
and let things fall out from there, which typically means the caller
trying to make an IPC on it and failing and falling into its "oh
no the process died unexpectedly" path.  All code using this
*should* be able to handle this correctly, anyway, since processes
really can be killed at any time.

At some point we may to make this implementation cleaner, where it
actually tears down the process right in the call and returns a
null ProcessRecord.  That is very dangerous however (we'd need to
go through all paths into this to make sure they are going to be
okay with process state changing on them like that), and I'm not
sure it is really worthwhile.  This intention is that killing
processes like this is unusual, due to processes being too large,
and anyway as I wrote all of our incoming code paths must already
be able to handle the process being killed at this point and one
could argue this is just another way to excercise those code paths.
Really, the main negative to this is that we will often have spam
in the log with exceptions about processes dying unexpectedly.
If that is the only issue, we could just add some conditions to
quiet that up at in this case.

We don't want to compute the size of the process each time we try
to evaluate it here (it takes 10s or ms to do so), so there is now
a new field associated with the process to give us the last pss
size we computed for it while it was in the cached state.

To be able to have better cached pss data when we now need it, the
timing for computing process pss has been tuned to use a much
shorter delay for the situations when the process has first switch
into a new state.  This may result in us having a fair amount more
pss data overall, which is good, as long as it doesn't cause us to
be computing pss excessively and burning cpu.

Procstats now also has new state to keep track of the number of
times each process has been killed by this new system, along with
the min, avg, max pss of all the times it has happened.  This has
slightly changed the checkin format to include this additional data
at the end of pkgkills/prockills lines.

Other changes here:

- Fixed a problem where GPU RAM was not being seen when dumping
  the full RAM details of a process.  This was because in that
  case the system would ask the process to compute its own MemInfo,
  which it returned, but the process doesn't have permission to
  access the files containing the GPU RAM data.  So now the system
  always computes the MemInfo and hands it to the app.

- Improved broadcast delays to not apply the delay if the next receiver
  of the broadcast is going to run in the same process as the last
  one.  A situation I was seeing was an application that had two
  receivers, one of which started a service; we are better off letting
  the second receiver run while the service is running.

- Changed the alarm manager's TIME_TICK broadcast to be a foreground
  broadcast.  This really should have been anyway (it is supposed to
  go out even minute, on the minute, very accurately, for UI elements
  to update), and is even more important now that we are doing more
  things to delay background broadcasts.

- Reworked how we maintain the LRU process list.  It is now divided
  into the two parts, the top always containing the processes holding
  activities.  This better matches the semantics we want (always try
  to keep those around modulated by the LRU order we interleave with
  other cached processes), and we now know whether a process is being
  moved on the LRU list because of an activity operation so we can
  only change the order of these activity processes when user operations
  happen.  Further, this just makes that common code path a lot simpler
  and gets rid of all the old complexity that doesn't make sense any
  more.

Change-Id: I04933ec3931b96db70b2b6ac109c071698e124eb
2013-09-19 14:35:53 -07:00