Commit Graph

51814 Commits

Author SHA1 Message Date
Neil Fuller
d0c0c8dcab Merge "Add a finalize() method to StrictJarFile" 2016-08-09 10:43:18 +00:00
Jakub Pawlowski
d167db19a9 Fix bad index usage
Bug: 27999121
Change-Id: Ie2ba6f71bbf6f789a3c1016ba2f0051b809ac87e
2016-08-04 20:19:52 +00:00
Mudumba Ananth
709b11ef7a HFP 1.7 profile update (3/4)
-> Android Framework changes to add support for
   an API to send indicator change in AG.
-> Added a system intent for broadcasting assigned number(ID)
   of the supported HF indicators and their values (if received)

Bug: 19983867
Change-Id: If26a7ae5da5686da72ebca9ec3decfe086e2ffb6
(cherry picked from commit 0d98ebf997)
2016-08-03 17:55:04 -07:00
Jakub Pawlowski
8e970d6ab4 Remove write type from GATT descriptor writes (1/4)
According to the Bluetooth Core specification v4.2, Vol 3, Part G,
section 4.12.3: "The Attribute Protocol WRITE REQUEST is used
for this sub-procedure".

Change-Id: I141dd24ed5911d5d485b52a1b661835b9960921a
2016-08-03 10:42:47 -07:00
Tobias Thierer
258a554f62 Merge "Stop profiling on uncaught exception." 2016-08-03 10:42:37 +00:00
Jakub Pawlowski
d75f512aa2 GATT Server refactoring (2/4)
Bug: 27999121
Change-Id: Ia5f91298a4b01b62adebc8adc30f27f757259588
2016-08-02 20:45:06 +00:00
Tobias Thierer
8ad86a3d1a Stop profiling on uncaught exception.
When "handling" an uncaught exception, make an attempt to stop
profiling. In case profiling was active, this will avoid losing
the profiling buffer.

This change is required as a base in order for
https://android-review.googlesource.com/#/c/249721/
to merge cleanly.

(Cherry picked from commit 4c79fea9ef)
Bug: 26291225
Change-Id: I35f352e5f28eafe4702da9eae587c3b65c360b3a
2016-08-02 17:32:39 +01:00
Hidehiko Tsuchiya
5acd41d155 Fix the API compatibility of "UriMatcher#addURI"
The previous patch (ef23bf19 Allow leading slash in path...) made
a single slash path unmatchable.
To solve it, this patch stops removing a slash character if the path
only has a slash character.
Now, a single slash is a matchable path for a URI without path string.

Bug: 29524484
Change-Id: I90b357aa48be1a3e0cf36e75ed2a9d6532908972
2016-07-30 01:47:50 +00:00
Neil Fuller
b69f61472a Add a finalize() method to StrictJarFile
Bug: 25896372
Test: Booted device, installed CTS apps
Test: run cts --class android.util.cts.StrictJarFileTest
Change-Id: I35e238dadd48d2c4ca53ac37a4c5aacdd471a93a
2016-07-29 14:26:35 +01:00
Tobias Thierer
851d806dbd Changes for upgrade to OkHttp 2.7.5
- Use com.android.okhttp.Dns in place of com.android.okhttp.internal.Network
 - Specify TimeUnit.MILLISECONDS for timeouts which 2.7.5 allows and
   brings us closer to 3+

Change-Id: I95b5d72a94ebe1389f7c2e8d95903aa1aadd944b
2016-06-29 17:41:32 +01:00
Marie Janssen
382871b03f Fix links to Bluetooth Guide
Change-Id: I5798c3d71c7cc9c509e0f7b04fa140168b0fdc11
2016-06-20 10:26:31 -07:00
Alan Viverette
34cd48bcd8 Merge "Chronometer: Update the value only if displayed on screen" 2016-05-27 14:18: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
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
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
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
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
Andre Eisenbach
233f48e3fa Merge "Fix GATT Characteristic write type serialization" 2016-05-14 00:11:42 +00:00
Treehugger Robot
21d061ec2e Merge "Fix documentation bug in SQLiteDatabase" 2016-05-12 22:25:20 +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
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
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
fb9f6acd6f Improve grammar in startService() documentation.
Change-Id: If72f710caa2e85512636d6f7ddacff2426cfb835
2016-05-05 13:09:28 -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
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
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
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
1dfa47ee3e Merge "Allow factory reset when bluetooth is off (1/2)" 2016-04-01 23:46:33 +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
Andre Eisenbach
060956bf67 Fix log spam in getCharacteristicById()
Bug: 27744135
Change-Id: I43f6358484729dedd85eb52432ad9805a66ff81e
2016-03-31 18:00:14 +00:00
Andre Eisenbach
942aebc959 Always use Write Request for GATT descriptor writes
According to the Bluetooth Core specification v4.2, Vol 3, Part G,
section 4.12.3: "The Attribute Protocol WRITE REQUEST is used used
for this sub-procedure".

Change-Id: I86e4e1d3a8bfd7d78dfed8419f8abd2d7e89b2bc
2016-03-31 17:59:44 +00:00
Adam Lesinski
7160459611 Merge "Fix javadoc for View.getMeasuredHeight() and View.getMeasuredHeightAndState()" 2016-03-29 18:24:39 +00:00
John Reck
f3edaf6a43 Merge "Enable shader cache for applications that shared UID with multiple packages too" 2016-03-22 14:25:35 +00:00
Jakub Pawlowski
a9e27ec0ab Use handles to identify GATT attributes (4/4)
Bug: 27778668
Change-Id: I01e095939df2f8dc433f14b473957c815ecade74
2016-03-22 00:39:28 +00:00
Shuo Gao
1c7083cf85 Enable shader cache for applications that shared UID with multiple packages too
Frameworks supported a mature mechanism for shader cache per each package already,
but as a special case such as Settings APP, if there are several packages in this
application which means that multiple packages shared the same SharedUserID with it,
it won't initialize the graphics disk caches, thereby APP like Settings have to
rebuild and relink shader every time during launch, which cause a bad launching
performance, so here to enable the GFX and RS cache initialization for multiple
shared packages case too.

Change-Id: If0f927e3399b775804abf1d9a868887951f471c5
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
2016-03-21 11:32:06 +08:00
Ajay Panicker
d455c8cd43 Make BluetoothManagerCallback oneway to prevent waiting on response
Bug: 27384453
Change-Id: I2cd0f1bc03c7a1e887c89faa18d5baa6ca5be24a
2016-03-18 22:47:26 +00:00
Jakub Pawlowski
8d312a84d6 Change how services are passed up to the stack
Right now we pass all services, characteristics and descriptors one by one.
This patch changes that - now we pass whole GATT database at once.

Bug: 27455533
Change-Id: Ie42cd80072538e411904b9c9b011a978f26158b9
2016-03-18 12:57:33 -07:00
Tamas Berghammer
21bdaf14a2 [DO NOT MERGE] Add flag to "am start" to enable native debugging
[Backported form internal CL854980]

Specifying the new flag will enable several features in the runtime
required by the native debugger to debug Java and C++ code at the same
time.

The enabled features:
* Force JIT (never use the interpreter)
* Debug info generation
* Disable some optimizations

Change-Id: Iaf5ab649715a0c274bd1b0fc64e483705da53cd0
2016-03-14 11:48:40 +00:00
Daniel Micay
084ee67b35 fix SeekBarPreference support for summaries
Overriding getSummary breaks support for summaries even though it's
supported in the layout for SeekBarPreference. If there's no summary the
return value is already null in the inherited implementation.

Change-Id: I2e72ea3c4a624acbf200e9617173eb072572fa57
2016-03-09 21:50:30 -05:00
Calin Juravle
451ff5a8f3 Merge "Fix VMRuntime.registerAppInfo usage" 2016-03-09 11:57:24 +00:00
Calin Juravle
9036a97847 Fix VMRuntime.registerAppInfo usage
Partial cherry pick from git commit
d479b52d12

Change-Id: I1de6e7eda23e6029c87896d8c01e063b98e39f74
2016-03-08 15:49:13 +00:00
Dimitry Ivanov
0e29efd164 Merge "Create linker-namespace for the classloader"
am: c6b66d3fb7

* commit 'c6b66d3fb763f7ebb9c3946377a3008bad315bc3':
  Create linker-namespace for the classloader
2016-03-03 17:08:20 +00:00
Markus Michler
d8dfbef6b2 Fix javadoc for View.getMeasuredHeight() and View.getMeasuredHeightAndState()
Change-Id: I772bb9fc2f09bec31276e859d21735dc4282c1f3
2016-03-02 12:31:17 +01:00
Dimitry Ivanov
ea90281082 Create linker-namespace for the classloader
With this change ApplicationLoaders.getClassLoader()
creates linker-namespace for the classloader at the
construction time. Before this change the namespace
was created on first load of a jni library.

With this change we ensure that every classloader
has initialized namespace associated with it.

As an additional advantage we now can avoid storing
namespace-specific fields in the classloaders.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: I3b160bd478a55171008682c40b2ebc13bdbd9882
(cherry picked from commit a55c7f15a3)
2016-02-26 10:16:11 -08:00
Dimitry Ivanov
7f849c2cd2 Merge "Construct classloader for apps with no java code"
am: 33e7677665

* commit '33e7677665c38507e58245c92101acef01ff302d':
  Construct classloader for apps with no java code
2016-02-25 19:41:00 +00:00
Dimitry Ivanov
33e7677665 Merge "Construct classloader for apps with no java code" 2016-02-25 19:35:55 +00:00