Commit Graph

56687 Commits

Author SHA1 Message Date
Simon Dubray
f1187008c1 Merge "Chronometer: Update the value only if displayed on screen"
am: 34cd48bcd8

* commit '34cd48bcd8d284d864a0876db1373099c51b98e2':
  Chronometer: Update the value only if displayed on screen

Change-Id: I01a820daaa6308c1cc00cd19940db12ec827f424
2016-05-27 14:26:23 +00:00
Alan Viverette
34cd48bcd8 Merge "Chronometer: Update the value only if displayed on screen" 2016-05-27 14:18:20 +00:00
Pavlin Radoslavov
3ef690cd7f Merge "Add missing "try ... finally" safeguards"
am: 47ae606d2c

* commit '47ae606d2c7b642e559527f1f6ff175ae9b29de1':
  Add missing "try ... finally" safeguards

Change-Id: I4d15b25f3e72d26c6a8efae21b8952ab72203a1d
2016-05-25 01:14:20 +00:00
Pavlin Radoslavov
9a69daa706 Add missing "try ... finally" safeguards
Safeguards for code protected by ReentrantReadWriteLock.

Bug: 28734075
Bug: 28799467
Change-Id: Ib7f598a92e8df6bd855ca48cdd094c1c73a935f2
(cherry picked from commit e957a8a0b4)
2016-05-24 17:14:51 -07:00
Pavlin Radoslavov
e1a60983da Merge "Reduced the impact of "synchronized" statements"
am: 1c3b50a00e

* commit '1c3b50a00ea3ab23569a697ba1f1e756098a01a2':
  Reduced the impact of "synchronized" statements

Change-Id: I7ddeb85696efe31c52db3a97ec2a142cb03bee65
2016-05-24 23:25:03 +00:00
Pavlin Radoslavov
2b016a1711 Reduced the impact of "synchronized" statements
* Removed "synchronized" statements that are not needed
* Replaced "synchronized" statements with Read/Write lock as
 appropriate. The lock protects the access to and the setting of
 BluetoothAdapter.mService and BluetoothManagerService.mBluetooth and
 associated state.

Bug: 28734075
Bug: 28799467
Change-Id: I8f8281c505f0a1ae0add1e14a3caba1f5b2a98e4
(cherry picked from commit eb50a39e98)
2016-05-24 21:17:42 +00:00
Sergio Giro
163f8a2e91 Merge "ZygoteInit: install AndroidKeyStoreProvider in the Zygote"
am: 393b67d65f

* commit '393b67d65fdbf4565cbec2f40fcabaaf87143dfd':
  ZygoteInit: install AndroidKeyStoreProvider in the Zygote

Change-Id: Idc8e1ca4ae2160285fe56995290c241c3a7288f2
2016-05-24 12:06:25 +00:00
Sergio Giro
80755a5a25 ZygoteInit: install AndroidKeyStoreProvider in the Zygote
Instead of in activity thread. That way, we can warm up (ie,
precompute cached values) this provider and AndroidBCWorkaroundProvider
(which are installed together) so that the computation doesn't
happen in the app. As a result, the time spent in the first call to
SSLSocketFactory.getDefault() decreases by ~5ms in angler userdebug.
Measured with an app calling SSLSocketFactory.getDefault in onCreate
and timed it with System.currentTimeMillis() .

(cherry picked from commit 69de32071c)

Bug: 28545496
Change-Id: Ic4e11d058fb404eaa92db925a3e765fc3bef7ae2
2016-05-23 11:24:34 +01:00
Sungki Kim
5dfe673be1 Merge "Fix GATT autoConnect race condition"
am: 53ccfe848f

* commit '53ccfe848f1b97cca12c7e5b496032e97594a8e2':
  Fix GATT autoConnect race condition

Change-Id: Ia761a72b003751146b83314facfdaf936b1f9e9b
2016-05-19 22:05:49 +00:00
Sungki Kim
636ab03dfe Fix GATT autoConnect race condition
As pointed out here:
https://code.google.com/p/android/issues/detail?id=69834

registerApp() causes onClientRegistered() to happen before autoConnect
is set. This patch fixes that.

Bug: 28861330
Change-Id: Ie1174c0f224f5084178439420b383164d22d542c
2016-05-19 18:23:44 +00:00
Alex Light
8f578530a9 Merge "Make fake libart for misbehaving apps be loaded."
am: 4bc3d32b15

* commit '4bc3d32b15cdcae7685722e7a20007c7aa9ae949':
  Make fake libart for misbehaving apps be loaded.

Change-Id: Ia256fdb964f69c029c3b1e8e10ff396f79048cb4
2016-05-18 21:13:23 +00:00
Alex Light
4bc3d32b15 Merge "Make fake libart for misbehaving apps be loaded." 2016-05-18 21:05:42 +00:00
Alex Light
0a72ba7d3f Make fake libart for misbehaving apps be loaded.
Bug: 27775991
Change-Id: Ie4eba211e876ec0643ce6ecf6a110f3cb5e0f57e
(cherry picked from commit 20ed24fc0c)
2016-05-18 08:14:34 -07:00
Neil Fuller
8491b4c05d Merge "Add support for ICU data pinning in the Zygote"
am: 9b1d64410d

* commit '9b1d64410dfddc38ade15d1581de2c89ad79948a':
  Add support for ICU data pinning in the Zygote

Change-Id: I53a2d5f885df5cf633a4a63cb2e3c2bc5c75959e
2016-05-18 11:51:05 +00:00
Neil Fuller
41c9dc3b69 Add support for ICU data pinning in the Zygote
Upstream ICU caches use SoftReferences. On Android this means
that useful cached data initialized in the Zygote are "lost" when
the Zygote GCs and cannot be shared with apps. This change makes use
of an Android patch to ICU to ensure References created during
Zygote initialization are "strong". i.e. they are never collected.
This prevents them being GCd and ensures they can be shared between
applications.

After switching ICU to use strong references, this change
also creates DecimalFormatSymbols objects for common ULocales
(ROOT, US and the user's default, if different). DecimalFormatSymbols
makes use of an ICU Reference cache and this alone has been shown to
improve the construction time of java.text.DecimalFormat by 1-1.5
milliseconds on a Seed device. This saving applies the first time one
is created in each app for each locale, and again if SoftReferences
have been cleared.

The cost to the heap size of the Zygote has been measured at ~107k.
This value will change as more caches are switched to use the new
CacheValue class.

Formatting is typically performed on the UI thread and the intention
of this change is to reduce app start up time and jank in apps like
the Dialer which do a lot of formatting when scrolling lists. The
change may also enable more virtual memory page-sharing between
apps, though this is not the specific goal.

Bug: 28326526
Change-Id: Ia2c73f6525f05b1aa81e57a31eed1616decf6bb5
2016-05-18 11:15:11 +01:00
Sergio Giro
ef42102cf8 Merge "ZygoteInit: warm up JCA providers during preload"
am: aa733e0b41

* commit 'aa733e0b41e4e15908a4c89e935f824cc5908b4d':
  ZygoteInit: warm up JCA providers during preload

Change-Id: If96e2e482e3fc01c2d3be5eee6d405f9bb5a6571
2016-05-17 15:56:32 +00:00
Sergio Giro
aa733e0b41 Merge "ZygoteInit: warm up JCA providers during preload" 2016-05-17 15:50:50 +00:00
Sergio Giro
b07595d194 ZygoteInit: warm up JCA providers during preload
This makes the time spent in the first call of an app to
SSLSocketFactory.getDefault() drop from ~240 ms to ~50 ms. In M
it was around ~6ms. This is due to the fact that, while instantiating
the default factory, all providers are initialized.

In order to obtain the timings above, I created an app calling
SSLSocketFactory.getDefault in onCreate and timed it
with System.currentTimeMillis() .

(cherry picked from commit 6cb7b1c476)

Bug: 28545496

Change-Id: Ic5aab3ece609d9fef06fee4ccb83d8371af075b2
2016-05-17 14:39:44 +01:00
Jakub Pawlowski
e82ac1b564 Merge "Fix GATT Characteristic write type serialization"
am: 233f48e3fa

* commit '233f48e3fa4321a9a2e2523a67a8e5120def5c33':
  Fix GATT Characteristic write type serialization

Change-Id: Ica00ad9ce313a27e82c5740061347f034c69db0e
2016-05-14 00:16:52 +00:00
Andre Eisenbach
233f48e3fa Merge "Fix GATT Characteristic write type serialization" 2016-05-14 00:11:42 +00:00
Steve Pomeroy
b654fae4db Merge "Fix documentation bug in SQLiteDatabase"
am: 21d061ec2e

* commit '21d061ec2e1a097b8759c55e2368ffa6024b6f92':
  Fix documentation bug in SQLiteDatabase

Change-Id: I986c5024e1c4843ec891ffb76f467e42aacb89f6
2016-05-12 22:29:22 +00:00
Treehugger Robot
21d061ec2e Merge "Fix documentation bug in SQLiteDatabase" 2016-05-12 22:25:20 +00:00
Steve Pomeroy
78e5a04902 Merge "ContentValues: improve documentation"
am: b44d4207c1

* commit 'b44d4207c1dc2131e022ddcad74be6d121a51b5e':
  ContentValues: improve documentation

Change-Id: I6c50514fa7b3531da96364d5624e3b093b984007
2016-05-12 22:24:41 +00:00
Steve Pomeroy
1276b5f29e ContentValues: improve documentation
Correct and clarify the documentation for ContentValues.

Change-Id: Iddf54da093e97c32da2568eab8802b1b2715303b
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
2016-05-12 21:18:15 +00:00
Steve Pomeroy
8fc3144fa5 Fix documentation bug in SQLiteDatabase
The documentation incorrectly states that, "[insertWithOnConflict
returns] the primary key of the existing row if the input param
'conflictAlgorithm' = CONFLICT_IGNORE". Unfortunately, SQLite does
not provide such functionality.

Close: https://code.google.com/p/android/issues/detail?id=13045

Change-Id: Ife919c4dcf7bf703b692d338d1fb5844a532dd39
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
2016-05-12 21:16:55 +00:00
Chad Brubaker
1e66b26c41 Merge "Support TrustedCertificateStore.findAllIssuers"
am: d58e7b2d15

* commit 'd58e7b2d15f4ca60d96bd0fa5e294c40eea76c14':
  Support TrustedCertificateStore.findAllIssuers

Change-Id: If29fab8118a025b5339b0076eaba43d99bbca04a
2016-05-12 19:26:47 +00:00
Chad Brubaker
d58e7b2d15 Merge "Support TrustedCertificateStore.findAllIssuers" 2016-05-12 19:18:47 +00:00
Chad Brubaker
d4b6c696e1 Support TrustedCertificateStore.findAllIssuers
(cherry-picked from commit aa6c3c3e25)
Change-Id: I176ec42c9907e50ee218e4fb352b530ca797be46
2016-05-12 11:15:47 -07:00
Jakub Pawlowski
2168fc29a2 Fix GATT Characteristic write type serialization
Default writeType for GATT characteristic was not being
serialized into Parcel. This cause errors when trying to
write into Characteristic.

Bug: 27910548
Change-Id: Ib2f88cf991123eaea244f16fa36deb0d773c5a33
2016-05-11 06:53:10 +00:00
Pavlin Radoslavov
e36629c433 Merge "Fix divergent equals and hashCode behavior"
am: e8579b12a3

* commit 'e8579b12a3c5be5fef25fc5a1c8c2c9d43e49347':
  Fix divergent equals and hashCode behavior

Change-Id: I201238b2cb033e2b5f219896667c9438b5b7de05
2016-05-06 23:28:58 +00:00
Pavlin Radoslavov
f74b830e68 Fix divergent equals and hashCode behavior
Calling Objects.hash with a byte[] will call the identity hashCode on
the byte[] and this doesn't agree with the use of Objects.deepEquals
in equals.
Bug caught by error prone.

Also, replaced usage of Objects.deepEquals(mServiceDataUuid, ...) with
Objects.equals(mServiceDataUuid, ...), because mServiceDataUuid
is an Object of type ParcelUuid.

Bug: 28585195
Change-Id: Id92734874339985fedafe1a28286a6a4dcd88d3b
2016-05-06 12:05:47 -07:00
Hans Boehm
cc9c83dbd4 Merge "Improve grammar in startService() documentation."
am: e3a25ad692

* commit 'e3a25ad692cf88455222522542fe374a41024ccf':
  Improve grammar in startService() documentation.

Change-Id: Iaa95eb5d01d45b8352f1eeb0a7f1519b1958ddd4
2016-05-06 17:36:11 +00:00
Hans Boehm
fb9f6acd6f Improve grammar in startService() documentation.
Change-Id: If72f710caa2e85512636d6f7ddacff2426cfb835
2016-05-05 13:09:28 -07:00
Sebastian Kaspari
eae68e4d94 Merge "FloatingToolbar: Fix javadoc for closeOverflow()."
am: daf6bdba0e

* commit 'daf6bdba0eac4abc03afdfe60b7736f3f8bd461e':
  FloatingToolbar: Fix javadoc for closeOverflow().

Change-Id: Ie260992f75f9f41b46a1e90e4a87d7e76cac34dc
2016-04-29 09:41:34 +00:00
Sebastian Kaspari
eb101a700c FloatingToolbar: Fix javadoc for closeOverflow().
Change-Id: I450fc603ae5fe49f08f580594352cc1120cc104d
2016-04-28 16:34:33 +00:00
Dimitry Ivanov
fa8b96c6c1 Merge changes from topic \'target-sdk-0-fix\'
am: 493576b

* commit '493576bc5db94068b5a767021a4a5c8b6963c836':
  Create linker namespace for the system server classloader
  Extract pathclassloader initialization to a separate class

Change-Id: Ifbebd0a98c3d80620b53bf7ebef76222e57ca923
2016-04-27 18:33:55 +00:00
Dimitry Ivanov
eb5866d4b0 Create linker namespace for the system server classloader
Bug: http://b/27702070
Change-Id: I12c9448e877202937cf558de75042bcb46f6a933
2016-04-27 10:22:09 -07:00
Dimitry Ivanov
5d7d777fa6 Extract pathclassloader initialization to a separate class
To be able to reuse this code when creating a classloader for
the system_server.

Bug: http://b/27245894
Bug: http://b/27702070
Change-Id: I928175a39a1beb0446d863a5b8f5edf94686e768
2016-04-26 13:16:54 -07:00
Tobias Thierer
71502c44fa Merge "Avoid instantiations of Boolean that are immediately unboxed."
am: 823e05b

* commit '823e05b2db229549c33892a0aa303fd7fb10a214':
  Avoid instantiations of Boolean that are immediately unboxed.

Change-Id: I170bf470d63faec93c228ae897796a2e6067da7e
2016-04-25 09:14:15 +00:00
Tobias Thierer
ca01820735 Avoid instantiations of Boolean that are immediately unboxed.
Replaced Boolean.valueOf() -> parseBoolean() across frameworks/base
(not including Am.java, which I'm leaving for a separate change).

Also fixed a couple of other valueOf()s in SyncStorageEngine.

Bug: 28289401
Change-Id: I2c6fb39a465885e7e625ed8894b1b9f8a30da5bc
2016-04-22 14:21:12 +01:00
Tobias Thierer
8e9bd59555 Merge "frameworks/base: Avoid Long object allocations in Long.valueOf()"
am: 09ae4931a9

* commit '09ae4931a98cb0cb7edac257db30169098ab56c7':
  frameworks/base: Avoid Long object allocations in Long.valueOf()

Change-Id: I23e77831c7f167da8329143710cd9c4fb389df0e
2016-04-22 10:42:36 +00:00
Tobias Thierer
4bd017d6a5 frameworks/base: Avoid Long object allocations in Long.valueOf()
Replace usages where the Long is immediately unboxed or thrown
away with Long.parseLong().
In TaskRecord.java, I also fixed up similar uses of
{Boolean,Integer}.valueOf()

Tested: built frameworks/base successfully.

Bug: 28289401
Change-Id: I1fad536853a68c7b0707cbf02989aca155064843
2016-04-21 16:23:56 +01:00
Henrik Baard
790699db64 Merge "Doze settings example not matching real keys"
am: 570a13f

* commit '570a13f0cb233b4a216243025a9fed3df3c72849':
  Doze settings example not matching real keys

Change-Id: I62dade8bece244e9033a230c1f116f8caad35a6f
2016-04-20 22:51:47 +00:00
Henrik Baard
eac10ab5f4 Doze settings example not matching real keys
The keys used in the example for the Doze timeouts does
not match any real key. To avoid confusion the example
should match the existing keys.

Change-Id: I0306c542dac9e38aea7d172a3e0f7472d327c73c
2016-04-19 07:50:24 +02:00
Ajay Panicker
418a7601b2 Merge "Allow factory reset when bluetooth is off (1/2)"
am: 1dfa47e

* commit '1dfa47ee3e55592249a76cb72f9e16be664f2b40':
  Allow factory reset when bluetooth is off (1/2)

Change-Id: I0e9300c86a6ec1f07d5b1a5c83f1b87a2c5ffaa5
2016-04-01 23:56:42 +00:00
Ajay Panicker
1dfa47ee3e Merge "Allow factory reset when bluetooth is off (1/2)" 2016-04-01 23:46:33 +00:00
Andre Eisenbach
984df4ed93 Merge "Always use Write Request for GATT descriptor writes"
am: 2358043

* commit '235804398300e46baf5ebf14bb5c36badf8dd286':
  Always use Write Request for GATT descriptor writes

Change-Id: Ifb3a81c527cf21fc90a6cd77901eae85f29ab0cc
2016-04-01 00:28:20 +00:00
Andre Eisenbach
ddae22044d Merge "Fix log spam in getCharacteristicById()"
am: 7bf9e19

* commit '7bf9e19892434a256a9cbef63ab7ff958df32436':
  Fix log spam in getCharacteristicById()

Change-Id: I980c8e7f169b565f068c949bc6740650518ecc19
2016-04-01 00:28:19 +00:00
Andre Eisenbach
2358043983 Merge "Always use Write Request for GATT descriptor writes" 2016-04-01 00:18:48 +00:00
Ajay Panicker
db005bdce9 Allow factory reset when bluetooth is off (1/2)
Bug: 27348444
Change-Id: I6c2709371b86581709649d7faf09391230449b9b
2016-03-31 23:39:15 +00:00