OSDN Git Service

android-x86/frameworks-base.git
7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3f...
Suprabh Shukla [Thu, 2 Feb 2017 02:57:58 +0000 (02:57 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3febd3 am: 2e6bdbeaab am: 588411fc7c  -s ours am: 773f85ec60 am: 029364c505 am: 2f1b2d82ca
am: ac8f44e387

Change-Id: I7e4376740ddf167035a3274c19ca5ae3f113a9b0

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3f...
Suprabh Shukla [Thu, 2 Feb 2017 02:53:21 +0000 (02:53 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3febd3 am: 2e6bdbeaab am: 588411fc7c  -s ours am: 773f85ec60 am: 029364c505
am: 2f1b2d82ca

Change-Id: I8094afc5c919b65d7f180ef9d3ad875f3ea4dacf

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3f...
Suprabh Shukla [Thu, 2 Feb 2017 02:48:23 +0000 (02:48 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3febd3 am: 2e6bdbeaab am: 588411fc7c  -s ours am: 773f85ec60
am: 029364c505

Change-Id: Ibef494c57a80a7b0d871dd8a80f877816e6897d0

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3f...
Suprabh Shukla [Thu, 2 Feb 2017 02:43:24 +0000 (02:43 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3febd3 am: 2e6bdbeaab am: 588411fc7c  -s ours
am: 773f85ec60

Change-Id: Ie83cb2dfd89fd808e906a802e16fd1943a898012

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3f...
Suprabh Shukla [Thu, 2 Feb 2017 02:38:24 +0000 (02:38 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3febd3 am: 2e6bdbeaab
am: 588411fc7c  -s ours

Change-Id: I1511e5dff681d06161cd18b78e7edaf7eddb897a

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3febd3
Suprabh Shukla [Thu, 2 Feb 2017 02:32:48 +0000 (02:32 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8 am: ab8d3febd3
am: 2e6bdbeaab

Change-Id: I7e286445a887e467a7de42ce9b27a9dc009e47fd

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8
Suprabh Shukla [Thu, 2 Feb 2017 02:28:13 +0000 (02:28 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 4ffe72dcc8
am: ab8d3febd3

Change-Id: If42411391fe2010162c51adf48e720e308a650ec

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held
Suprabh Shukla [Thu, 2 Feb 2017 02:21:16 +0000 (02:21 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held
am: 4ffe72dcc8

Change-Id: Ic7b9ef6484df0b57c8f1ee7a483ef3bda05c7cc7

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 2317451acc am: 01f971...
Makoto Onuki [Thu, 2 Feb 2017 01:19:52 +0000 (01:19 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 2317451acc am: 01f971dcdc am: 963cba5b5b
am: f1e276384d

Change-Id: I856ad657b894531f03bc145e033b0cebf4e722cd

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 2317451acc am: 01f971dcdc
Makoto Onuki [Thu, 2 Feb 2017 01:15:44 +0000 (01:15 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 2317451acc am: 01f971dcdc
am: 963cba5b5b

Change-Id: I3a1421f656d1a90970eac6156e0840625662fb17

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 2317451acc
Makoto Onuki [Thu, 2 Feb 2017 01:10:43 +0000 (01:10 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held am: 2317451acc
am: 01f971dcdc

Change-Id: If5f5e5d47b97e2b8480adc5ca2cb08702056ca87

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held
Makoto Onuki [Thu, 2 Feb 2017 01:03:21 +0000 (01:03 +0000)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held
am: 2317451acc

Change-Id: Id3441141d4feea4c7291350c9670bd59ec017240

7 years agoMerge "Cleanup hwbinder getService code." am: 9be24a3040
Steven Moreland [Wed, 1 Feb 2017 20:57:59 +0000 (20:57 +0000)]
Merge "Cleanup hwbinder getService code." am: 9be24a3040
am: 4ede371d80

Change-Id: Ia0f3f88d8881f89cec6939dbb44d7dbbb8da9a7f

7 years agoMerge "Cleanup hwbinder getService code."
Steven Moreland [Wed, 1 Feb 2017 20:53:24 +0000 (20:53 +0000)]
Merge "Cleanup hwbinder getService code."
am: 9be24a3040

Change-Id: Idb75f2c41e6e0fd9c2eb03ef4960e40cb6556308

7 years agoMerge "Cleanup hwbinder getService code."
Treehugger Robot [Wed, 1 Feb 2017 20:46:45 +0000 (20:46 +0000)]
Merge "Cleanup hwbinder getService code."

7 years agoMerge "Turn off Dynamic IMS switching for now" am: 2bb0d95e91
Brad Ebinger [Wed, 1 Feb 2017 19:49:24 +0000 (19:49 +0000)]
Merge "Turn off Dynamic IMS switching for now" am: 2bb0d95e91
am: 9f1ccbf5f9

Change-Id: If9be849f743e9722ca49543a92d33d09978dc6ce

7 years agoMerge "Turn off Dynamic IMS switching for now"
Brad Ebinger [Wed, 1 Feb 2017 19:44:55 +0000 (19:44 +0000)]
Merge "Turn off Dynamic IMS switching for now"
am: 2bb0d95e91

Change-Id: Ie74b53ca5f0b6463b371368608c793d402878d50

7 years agoMerge "Turn off Dynamic IMS switching for now"
Brad Ebinger [Wed, 1 Feb 2017 19:36:47 +0000 (19:36 +0000)]
Merge "Turn off Dynamic IMS switching for now"

7 years agoMerge "Adds @hide permission granting API for ImsServices" am: 390ec27f9d
Brad Ebinger [Wed, 1 Feb 2017 19:35:56 +0000 (19:35 +0000)]
Merge "Adds @hide permission granting API for ImsServices" am: 390ec27f9d
am: 6734275c2f

Change-Id: I6d502db3362aafcfed426b6598be0bd39dd38890

7 years agoMerge "Adds @hide permission granting API for ImsServices"
Brad Ebinger [Wed, 1 Feb 2017 19:30:41 +0000 (19:30 +0000)]
Merge "Adds @hide permission granting API for ImsServices"
am: 390ec27f9d

Change-Id: I0f3d38811925884681d11cf18e12f1b0574d64c6

7 years agoMerge "Adds @hide permission granting API for ImsServices"
Treehugger Robot [Wed, 1 Feb 2017 19:24:10 +0000 (19:24 +0000)]
Merge "Adds @hide permission granting API for ImsServices"

7 years agoCleanup hwbinder getService code.
Steven Moreland [Wed, 1 Feb 2017 17:58:00 +0000 (09:58 -0800)]
Cleanup hwbinder getService code.

- Remove memory leaks.
- Make sure proper errors are getting thrown.
- Avoid SIGABRT

Test: hidl_test_java
Change-Id: Ia5680fd0ebf83d0f174bf0d8109bf60327be5f9d

7 years agoAdd Wear keycodes to emulator key layout file.
Nimrod Gileadi [Wed, 1 Feb 2017 17:57:16 +0000 (17:57 +0000)]
Add Wear keycodes to emulator key layout file.
am: 119a06ce55

Change-Id: I33d2b0f9b8281c22422677f03d6046a1be0bd94f

7 years agoAdd Wear keycodes to emulator key layout file.
Nimrod Gileadi [Wed, 1 Feb 2017 12:12:00 +0000 (12:12 +0000)]
Add Wear keycodes to emulator key layout file.

The SLEEP keycode is used by Android Wear to indicate a
"palming" gesture (covering the screen with one's hand).

The STEM_* buttons are used for side buttons on Wear.

The keycode values were added to the emulator in
http://r.android.com/330771

Bug: 19996432
Change-Id: Ib90c3b27209b0059ebc1c2cce46cc732a677d557

7 years agoMerge "Fix a use-of-uninitialized-value warning" am: 53873df5fe
George Burgess IV [Wed, 1 Feb 2017 07:21:51 +0000 (07:21 +0000)]
Merge "Fix a use-of-uninitialized-value warning" am: 53873df5fe
am: aea873ade0

Change-Id: I747d94158c8a1c77f8ae1076c93a3d22f6c22ef5

7 years agoMerge "Fix a use-of-uninitialized-value warning"
George Burgess IV [Wed, 1 Feb 2017 07:15:00 +0000 (07:15 +0000)]
Merge "Fix a use-of-uninitialized-value warning"
am: 53873df5fe

Change-Id: I102fb345244f922cb41a5ce31b2de0af8e68bf97

7 years agoMerge "Fix a use-of-uninitialized-value warning"
Treehugger Robot [Wed, 1 Feb 2017 07:09:50 +0000 (07:09 +0000)]
Merge "Fix a use-of-uninitialized-value warning"

7 years agoMerge "hotspot2: implement hashCode() for classes with equals() function" am: 2ac992fcad
Peter Qiu [Wed, 1 Feb 2017 03:30:51 +0000 (03:30 +0000)]
Merge "hotspot2: implement hashCode() for classes with equals() function" am: 2ac992fcad
am: 9e7725040b

Change-Id: I5b36bb042933a0a889b7f84281b174a7527ccaff

7 years agoMerge "Print the package name and creator UID in dump()." am: cf7f9dd6a1
Jeremy Joslin [Wed, 1 Feb 2017 03:25:47 +0000 (03:25 +0000)]
Merge "Print the package name and creator UID in dump()." am: cf7f9dd6a1
am: ba4bc08dae

Change-Id: I3f7e2a6ecdbe04fad0358fadecdeb8341baa99eb

7 years agoMerge "hotspot2: update PasspointConfiguration APIs" am: 59da9b24ca
Peter Qiu [Wed, 1 Feb 2017 03:24:04 +0000 (03:24 +0000)]
Merge "hotspot2: update PasspointConfiguration APIs" am: 59da9b24ca
am: 4ed5fe8191

Change-Id: I678ec9518c7c88acefd1bb99bcb3add27ca52b87

7 years agoMerge "hotspot2: implement hashCode() for classes with equals() function"
Peter Qiu [Wed, 1 Feb 2017 03:19:27 +0000 (03:19 +0000)]
Merge "hotspot2: implement hashCode() for classes with equals() function"
am: 2ac992fcad

Change-Id: I15cec4598a8a97b25c6b8ce62864ccb6b240bfde

7 years agoMerge "hotspot2: implement hashCode() for classes with equals() function"
Treehugger Robot [Wed, 1 Feb 2017 03:12:12 +0000 (03:12 +0000)]
Merge "hotspot2: implement hashCode() for classes with equals() function"

7 years agoMerge "Print the package name and creator UID in dump()."
Jeremy Joslin [Wed, 1 Feb 2017 02:50:25 +0000 (02:50 +0000)]
Merge "Print the package name and creator UID in dump()."
am: cf7f9dd6a1

Change-Id: Ifd7812ff0acba03544a05a3fcea7721da8fe7d0f

7 years agoMerge changes If420bd66,Icbb161ca,Ida190e5a,Iae75781f am: 2ec8b8bcb6
Lorenzo Colitti [Wed, 1 Feb 2017 02:50:19 +0000 (02:50 +0000)]
Merge changes If420bd66,Icbb161ca,Ida190e5a,Iae75781f am: 2ec8b8bcb6
am: 8fcc6a34f0

Change-Id: If547b83ddc48d5a0c30ad172bbb2406885d1d5ee

7 years agoConnectivityServiceTest: remove remaining poll loops. am: d2706127d0
Lorenzo Colitti [Wed, 1 Feb 2017 02:49:23 +0000 (02:49 +0000)]
ConnectivityServiceTest: remove remaining poll loops. am: d2706127d0
am: 54e9050710

Change-Id: I06815166fe9ab4b7d6ab580a9eda5304067f9f91

7 years agoRemove assertEventuallyTrue as it's unnecessary. am: 30145d755c
Lorenzo Colitti [Wed, 1 Feb 2017 02:48:10 +0000 (02:48 +0000)]
Remove assertEventuallyTrue as it's unnecessary. am: 30145d755c
am: 90a70cac26

Change-Id: I7f6d543a3d05b0b165adc7a7c3938c7081c3f778

7 years agoRename AvoidBadWifiTracker to MultinetworkPolicyTracker am: 58ebe1c6f1
Lorenzo Colitti [Wed, 1 Feb 2017 02:47:16 +0000 (02:47 +0000)]
Rename AvoidBadWifiTracker to MultinetworkPolicyTracker am: 58ebe1c6f1
am: 0bc8070fce

Change-Id: I0ff0169ebc5e53cc9f57f224225fb0c93dc241ed

7 years agoMerge "hotspot2: update PasspointConfiguration APIs"
Peter Qiu [Wed, 1 Feb 2017 02:46:39 +0000 (02:46 +0000)]
Merge "hotspot2: update PasspointConfiguration APIs"
am: 59da9b24ca

Change-Id: Ide7fa5aee33295bf813dd647fffcb69ce5edf9d8

7 years agoAttempt to make waitForIdleHandler reliable. am: ae3ce81cc3
Lorenzo Colitti [Wed, 1 Feb 2017 02:45:55 +0000 (02:45 +0000)]
Attempt to make waitForIdleHandler reliable. am: ae3ce81cc3
am: 8780a8afeb

Change-Id: I72c03d3686858631aefdf96e13e8033f27788f8c

7 years agoMerge "Print the package name and creator UID in dump()."
Treehugger Robot [Wed, 1 Feb 2017 02:40:59 +0000 (02:40 +0000)]
Merge "Print the package name and creator UID in dump()."

7 years agoMerge changes If420bd66,Icbb161ca,Ida190e5a,Iae75781f
Lorenzo Colitti [Wed, 1 Feb 2017 02:39:35 +0000 (02:39 +0000)]
Merge changes If420bd66,Icbb161ca,Ida190e5a,Iae75781f
am: 2ec8b8bcb6

Change-Id: I2dd27a886aabfe0b4733ee9559886f917ccd921e

7 years agoConnectivityServiceTest: remove remaining poll loops.
Lorenzo Colitti [Wed, 1 Feb 2017 02:39:30 +0000 (02:39 +0000)]
ConnectivityServiceTest: remove remaining poll loops.
am: d2706127d0

Change-Id: I675096683c8ed4bc0e540491c0ff6aa828114313

7 years agoRemove assertEventuallyTrue as it's unnecessary.
Lorenzo Colitti [Wed, 1 Feb 2017 02:38:30 +0000 (02:38 +0000)]
Remove assertEventuallyTrue as it's unnecessary.
am: 30145d755c

Change-Id: Id574b27b40e35fbccac49910867e9735c03118d4

7 years agoRename AvoidBadWifiTracker to MultinetworkPolicyTracker
Lorenzo Colitti [Wed, 1 Feb 2017 02:37:31 +0000 (02:37 +0000)]
Rename AvoidBadWifiTracker to MultinetworkPolicyTracker
am: 58ebe1c6f1

Change-Id: I7615c9128deed7011eb9ab6f2efdcfe2e237a1a5

7 years agoAttempt to make waitForIdleHandler reliable.
Lorenzo Colitti [Wed, 1 Feb 2017 02:36:22 +0000 (02:36 +0000)]
Attempt to make waitForIdleHandler reliable.
am: ae3ce81cc3

Change-Id: Id7e23c3a2c885ff239efa577a8d366d3df6ca9a2

7 years agoMerge "hotspot2: update PasspointConfiguration APIs"
Treehugger Robot [Wed, 1 Feb 2017 02:35:19 +0000 (02:35 +0000)]
Merge "hotspot2: update PasspointConfiguration APIs"

7 years agoMerge changes If420bd66,Icbb161ca,Ida190e5a,Iae75781f
Lorenzo Colitti [Wed, 1 Feb 2017 02:25:42 +0000 (02:25 +0000)]
Merge changes If420bd66,Icbb161ca,Ida190e5a,Iae75781f

* changes:
  ConnectivityServiceTest: remove remaining poll loops.
  Remove assertEventuallyTrue as it's unnecessary.
  Rename AvoidBadWifiTracker to MultinetworkPolicyTracker
  Attempt to make waitForIdleHandler reliable.

7 years agoMerge "Post runnables instead of sending messages." am: 71317f4a6c
Jeremy Joslin [Wed, 1 Feb 2017 01:40:58 +0000 (01:40 +0000)]
Merge "Post runnables instead of sending messages." am: 71317f4a6c
am: 71a4792147

Change-Id: Idff8f071f316942e8b520c913e96d3eb8b44227d

7 years agoMerge "Post runnables instead of sending messages."
Jeremy Joslin [Wed, 1 Feb 2017 01:34:16 +0000 (01:34 +0000)]
Merge "Post runnables instead of sending messages."
am: 71317f4a6c

Change-Id: I13cb1fd38262f869b99245678c89f45b834210c8

7 years agoMerge "Post runnables instead of sending messages."
Treehugger Robot [Wed, 1 Feb 2017 01:26:04 +0000 (01:26 +0000)]
Merge "Post runnables instead of sending messages."

7 years agoFix a use-of-uninitialized-value warning
George Burgess IV [Tue, 24 Jan 2017 23:59:19 +0000 (15:59 -0800)]
Fix a use-of-uninitialized-value warning

This is the result of running ./gen after applying
I90bea0c94cf8d7f92a0d9a4db4e64e7e563bfb09.

Bug: None
Test: Still builds; warning is now gone.
Change-Id: Ibcd5e8dcec96406b529c5790ba0a2822dace25c2

7 years agoTurn off Dynamic IMS switching for now
Brad Ebinger [Tue, 31 Jan 2017 23:36:53 +0000 (15:36 -0800)]
Turn off Dynamic IMS switching for now

The new ImsService implementations must be in place before
ImsResolver/ImsManager can use the new Dynamic ImsService switching
system.

Test: Manual
Change-Id: Ie6454aec08a3f1ebd92271f1c0554c16dc57a868

7 years agoPrint the package name and creator UID in dump().
Jeremy Joslin [Tue, 31 Jan 2017 21:48:21 +0000 (13:48 -0800)]
Print the package name and creator UID in dump().

Add a little more info to help differentiate the registered score
caches during a dump.

Test: adb shell dumpsys network_score
Change-Id: I59cb877b3237aaa85cb564795fb8a41c3d95e315

7 years agohotspot2: implement hashCode() for classes with equals() function
Peter Qiu [Wed, 25 Jan 2017 20:27:08 +0000 (12:27 -0800)]
hotspot2: implement hashCode() for classes with equals() function

According to API guideline, classes that override equals()
function should override hashCode() as well.  Make it so.

Bug: 34198926
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I4c3afed78a2fc06cdc26dd04d076f579b3472139

7 years agohotspot2: update PasspointConfiguration APIs
Peter Qiu [Wed, 25 Jan 2017 00:01:43 +0000 (16:01 -0800)]
hotspot2: update PasspointConfiguration APIs

Based on the API guideline, use of public variables are discouraged.
So update PasspointConfiguration and its associated classes to use
private variables with public accessor methods.

While there, cleanup unit tests to reduce code duplications.

Bug: 34627062
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I6ea45bbcf03aec01c187425a66094fad6098d75d

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held
Makoto Onuki [Wed, 4 Jan 2017 22:36:59 +0000 (14:36 -0800)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held

Note DPM.wipeData() on a secondary user is now blocking, just like
it's been always blocking on the primary user.

Test: Manually tested wipeData() with ApiDemos, both on 1) the primary user,
2) a secondary user and 3) work profile.

Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest -w com.android.frameworks.servicestests

Bug 30681079

Change-Id: Ia832bed0f22396998d6307ab46e262dae9463838
Merged-in: Ia832bed0f22396998d6307ab46e262dae9463838
(cherry picked from commit efdec8f5688ce6b0a287eddb6d5dad93ffa0e1ee)

7 years agoDO NOT MERGE Do not call RecoverySystem with DPMS lock held
Suprabh Shukla [Tue, 31 Jan 2017 21:01:28 +0000 (13:01 -0800)]
DO NOT MERGE Do not call RecoverySystem with DPMS lock held

Note DPM.wipeData() on a secondary user is now blocking, just like
it's been always blocking on the primary user.

Bug 30681079

Change-Id: Ia832bed0f22396998d6307ab46e262dae9463838

7 years agoCorrect the formula of battery capacity estimation.
Ying Wai (Daniel) Fan [Tue, 31 Jan 2017 20:53:27 +0000 (20:53 +0000)]
Correct the formula of battery capacity estimation.
am: c800ddc824

Change-Id: Idf0396fdac7e0cedbac39da98b2fe97e26dce64e

7 years agoPost runnables instead of sending messages.
Jeremy Joslin [Tue, 31 Jan 2017 19:51:25 +0000 (11:51 -0800)]
Post runnables instead of sending messages.

Gaining access to a Handler's Looper can be problematic in custom
Handler implementations. Instead of creating a new internal Handler
to dispatch the method calls on we simply post Runnables to the
given Handler.

Test: adb shell am instrument -e class android.net.NetworkRecommendationProviderTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 34845471
Change-Id: I6fe380a92aebd630781abe5853f94737bcfeaa5f

7 years agoMerge "Two digit call support for Claro" am: c74d60a69e
Yong Shi [Tue, 31 Jan 2017 19:47:01 +0000 (19:47 +0000)]
Merge "Two digit call support for Claro" am: c74d60a69e
am: 7f8a08a772

Change-Id: I294b83c86708708f95352bb019a032fabc1c4ed5

7 years agoMerge "Two digit call support for Claro"
Yong Shi [Tue, 31 Jan 2017 19:42:26 +0000 (19:42 +0000)]
Merge "Two digit call support for Claro"
am: c74d60a69e

Change-Id: I18548618853aa37f43114ed7ffdca73c1fc0effc

7 years agoMerge "Two digit call support for Claro"
Treehugger Robot [Tue, 31 Jan 2017 19:30:23 +0000 (19:30 +0000)]
Merge "Two digit call support for Claro"

7 years agoMerge "Update the A2DP Codec Config API" am: ccd60f7cbe
Pavlin Radoslavov [Tue, 31 Jan 2017 19:13:05 +0000 (19:13 +0000)]
Merge "Update the A2DP Codec Config API" am: ccd60f7cbe
am: f0096fb868

Change-Id: Ibc7d4b500adc4451978f366557b93dc6b6d3da63

7 years agoMerge "Update the A2DP Codec Config API"
Pavlin Radoslavov [Tue, 31 Jan 2017 19:07:58 +0000 (19:07 +0000)]
Merge "Update the A2DP Codec Config API"
am: ccd60f7cbe

Change-Id: Idc54b85eb096ec0116395332c7bc0b543a59a7d5

7 years agoMerge "Update the A2DP Codec Config API"
Pavlin Radoslavov [Tue, 31 Jan 2017 19:02:35 +0000 (19:02 +0000)]
Merge "Update the A2DP Codec Config API"

7 years agoUpdate the A2DP Codec Config API
Pavlin Radoslavov [Thu, 26 Jan 2017 00:54:07 +0000 (16:54 -0800)]
Update the A2DP Codec Config API

Previously, the JNI upcall would contain only the current codec config.
In the new API, the upcall contains:
 1. The current codec config
 2. The list of codecs containing the local codecs capabilities
 3. The list of codecs containing the selectable codecs capabilities.
    This list is the intersection of the local codecs capabilities
    and the capabilities of the paired device.

Also, refactored the Java internals to accomodate the extra information:
 * Added new class BluetoothCodecStatus that contains the extra info:
   current codec config, local codecs capabilities and selectable
   codecs capabilities
 * Renamed method getCodecConfig() to getCodecStatus() and return the
   corresponding BluetoothCodecStatus object.
 * Updates to class BluetoothCodecConfig:
   new methods isValid(), getCodecName(), and updated toString()
   so it is more user friendly
 * Removed BluetoothCodecConfig.EXTRA_CODEC_CONFIG and
   EXTRA_PREVIOUS_CODEC_CONFIG.
   The former is superseded by BluetoothCodecStatus.EXTRA_CODEC_STATUS;
   the latter is not really used.

Test: A2DP streaming with headsets and switching the codecs
Change-Id: Ia1af2c22e521e863e28a360610aca49f7e62d31b

7 years agoMerge "hotspot2: enclose conditional statement in parenthesis" am: 161ac8b006
Peter Qiu [Tue, 31 Jan 2017 18:25:48 +0000 (18:25 +0000)]
Merge "hotspot2: enclose conditional statement in parenthesis" am: 161ac8b006
am: ea14632665

Change-Id: I5511f4d323761edf5eab149894a7a1b2acee4e07

7 years agoMerge "hotspot2: enclose conditional statement in parenthesis"
Peter Qiu [Tue, 31 Jan 2017 18:21:27 +0000 (18:21 +0000)]
Merge "hotspot2: enclose conditional statement in parenthesis"
am: 161ac8b006

Change-Id: I2da11aee68e52f9e868ca23cbd913703ef0585e3

7 years agoMerge "hotspot2: enclose conditional statement in parenthesis"
Treehugger Robot [Tue, 31 Jan 2017 18:12:56 +0000 (18:12 +0000)]
Merge "hotspot2: enclose conditional statement in parenthesis"

7 years agoConnectivityServiceTest: remove remaining poll loops.
Lorenzo Colitti [Mon, 30 Jan 2017 08:45:49 +0000 (17:45 +0900)]
ConnectivityServiceTest: remove remaining poll loops.

All the tests are now asynchronous. The only remaining uses of
Thread.sleep() are in the tests that check for NetworkRequest
timeouts.

Test: ConnectivityServiceTest passes 100 times in a row
Bug: 32561414
Change-Id: If420bd66c692a90d5031ee06a888a8cc3b4398a8

7 years agoRemove assertEventuallyTrue as it's unnecessary.
Lorenzo Colitti [Fri, 27 Jan 2017 09:46:03 +0000 (18:46 +0900)]
Remove assertEventuallyTrue as it's unnecessary.

The calls in testAvoidBadWifi are no longer necessary now that
waitForIdle is reliable, and the calls in testPacketKeepalives
are replaced with a wait for the NetworkAgent to disconnect.

Test: ConnectivityServiceTest passes 100 times in a row.
Bug: 32561414
Change-Id: Icbb161ca6e343bd14764a1c9ccfdd14b6cd6803f

7 years agoRename AvoidBadWifiTracker to MultinetworkPolicyTracker
Lorenzo Colitti [Tue, 24 Jan 2017 00:41:36 +0000 (09:41 +0900)]
Rename AvoidBadWifiTracker to MultinetworkPolicyTracker

Rename the class and ensure that all code related to bad wifi
avoidance has names that reflect its purpose.  This will allow us
to reuse most of the the code for other purposes in future CLs.

Test: runtest frameworks-net passes
Bug: 34630278
Change-Id: Ida190e5a79e7a12f4eec07e1a3e4d9d138e83bcd

7 years agoAttempt to make waitForIdleHandler reliable.
Lorenzo Colitti [Wed, 25 Jan 2017 14:09:07 +0000 (23:09 +0900)]
Attempt to make waitForIdleHandler reliable.

The current implementation of IdleableHandlerThread is based on
the assumption that MessageQueue#isIdle will return true iff the
message loop has finished processing its messages.

Unfortunately, this is incorrect: isIdle returns true iff are no
more messages waiting in the queue; thus, it will also return
true while it is processing the last message before going idle.

Instead of using idle handlers, take the simpler approach of
posting a runnable to the message loop and waiting for it to
be processed.

Test: see other CLs in this patch series
Bug: 31479480
Change-Id: Iae75781f067b762c8653a488a5e4d5ee0c789e01

7 years agoMerge "ApfTest: fix flaky testApfFilterRa." am: c2e8588396
Hugo Benichi [Tue, 31 Jan 2017 06:07:08 +0000 (06:07 +0000)]
Merge "ApfTest: fix flaky testApfFilterRa." am: c2e8588396
am: 60e1375f79

Change-Id: Ied249e20ffc80728d20ac1e5442d45f5cb767776

7 years agoMerge "ApfTest: fix flaky testApfFilterRa."
Hugo Benichi [Tue, 31 Jan 2017 06:01:58 +0000 (06:01 +0000)]
Merge "ApfTest: fix flaky testApfFilterRa."
am: c2e8588396

Change-Id: I79c3ec0ba35973cc0dd32709447b2cc30e790d08

7 years agoMerge "ApfTest: fix flaky testApfFilterRa."
Hugo Benichi [Tue, 31 Jan 2017 05:53:51 +0000 (05:53 +0000)]
Merge "ApfTest: fix flaky testApfFilterRa."

7 years agoApfTest: fix flaky testApfFilterRa.
Hugo Benichi [Mon, 19 Dec 2016 05:50:52 +0000 (14:50 +0900)]
ApfTest: fix flaky testApfFilterRa.

testApfFilterRa is failing with probabiliy 1/10 ~ 1/15 on the following
assert: assertDrop(program, packet, lifetime/6), for lifetime values
that are multiple of 6, where 6 is the hardcoded fraction of RA lifetime
to filter in ApfFilter.java.

When the lifetime is not a multiple of 6, the remainder of 1 to 5
seconds gives enough margin so that when the APF program is simulated
the faked lifetime of the program is less than lifetime/6 away and the
packet is dropped.

However for lifetimes which are exact multiples of 6, this margin is
always 0s and that result in nondeterminism in the result. This is
consistent with the obervation that the only failed assert was for a
lifetime of 300s, the only multiple of 6.

This can be observed by detecting the age limit at which the filter
stops dropping packet oscillating between lifetime/6 and lifetime/6 + 1
for lifetimes which are multiple of 6.

This patch fixes the flakyness by freezing the flow of time in tests so
that the expected filter age threshold is consistent and stable.

Test: no failure observed in 1000 runs.
Bug: 32561414
Change-Id: I5251d047039f34b82ce8a5d20ae46563e1e0cce8

7 years agohotspot2: enclose conditional statement in parenthesis
Peter Qiu [Tue, 31 Jan 2017 01:47:53 +0000 (17:47 -0800)]
hotspot2: enclose conditional statement in parenthesis

Couple unit tests are failing due to conditional statements
not enclosed in the parenthesis, which causes unexpected
returned value for the equals function.  So fix it.

Bug: 34764955
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Iaf0151803cb62eb8af308e5de40558617f84cd2f

7 years agoMerge "[AWARE] Minor hardening of manager." am: d0f1c9d1d3
Etan Cohen [Tue, 31 Jan 2017 01:36:18 +0000 (01:36 +0000)]
Merge "[AWARE] Minor hardening of manager." am: d0f1c9d1d3
am: 155d9ba6fc

Change-Id: I222a30730ec6199a53c91fb6c3fd4b96846ac7d3

7 years agoMerge "[AWARE] Minor hardening of manager."
Etan Cohen [Tue, 31 Jan 2017 01:30:24 +0000 (01:30 +0000)]
Merge "[AWARE] Minor hardening of manager."
am: d0f1c9d1d3

Change-Id: I182e8c10eea318cf1fd3d3fe4da3275df01f851d

7 years agoMerge "[AWARE] Minor hardening of manager."
Etan Cohen [Tue, 31 Jan 2017 01:19:48 +0000 (01:19 +0000)]
Merge "[AWARE] Minor hardening of manager."

7 years agoMerge changes I8eca5f24,I9d79c67c am: 54604d9143
Jerry Zhang [Tue, 31 Jan 2017 01:00:16 +0000 (01:00 +0000)]
Merge changes I8eca5f24,I9d79c67c am: 54604d9143
am: 276672d192

Change-Id: I74e78d829a718d145fcf1ae06ac9491329544f51

7 years agoCheck and send usb state broadcast when devices boots am: af6d473ab0
Badhri Jagan Sridharan [Tue, 31 Jan 2017 00:59:21 +0000 (00:59 +0000)]
Check and send usb state broadcast when devices boots am: af6d473ab0
am: 061bceafee

Change-Id: Iabb4c7d6c120bb3b45703de084dc52ed958e1dba

7 years agoOnly send usb disconnect intents after boot. am: c1bc0a844d
Jerry Zhang [Tue, 31 Jan 2017 00:58:14 +0000 (00:58 +0000)]
Only send usb disconnect intents after boot. am: c1bc0a844d
am: dc9c094deb

Change-Id: Icfadbbe67ef80977500916bcb84f0c7989941b7c

7 years agoMerge changes I8eca5f24,I9d79c67c
Jerry Zhang [Tue, 31 Jan 2017 00:52:48 +0000 (00:52 +0000)]
Merge changes I8eca5f24,I9d79c67c
am: 54604d9143

Change-Id: I1e364d21949c9d4c16b14e60c630577399cdce05

7 years agoCheck and send usb state broadcast when devices boots
Badhri Jagan Sridharan [Tue, 31 Jan 2017 00:52:43 +0000 (00:52 +0000)]
Check and send usb state broadcast when devices boots
am: af6d473ab0

Change-Id: I13b0ea530c0701fd32d50d9c145f1b0e574fc9b0

7 years agoOnly send usb disconnect intents after boot.
Jerry Zhang [Tue, 31 Jan 2017 00:51:41 +0000 (00:51 +0000)]
Only send usb disconnect intents after boot.
am: c1bc0a844d

Change-Id: Iaa8ff69de80b3efa558f82438cc6071f749a2dc8

7 years agoMerge changes I8eca5f24,I9d79c67c
Jerry Zhang [Tue, 31 Jan 2017 00:41:55 +0000 (00:41 +0000)]
Merge changes I8eca5f24,I9d79c67c

* changes:
  Check and send usb state broadcast when devices boots
  Only send usb disconnect intents after boot.

7 years agoCheck and send usb state broadcast when devices boots
Badhri Jagan Sridharan [Tue, 24 Jan 2017 00:28:38 +0000 (16:28 -0800)]
Check and send usb state broadcast when devices boots

Broadcasts are not sent until BOOT_COMPLETED is received.
When the device boots with usb plugged, the UPDATE_STATE
for connted and configured would be received way before
BOOT_COMPLETED is received. Since, devices can continue
to stay in same usb configuration(set through persistent
property trigger), check and send a usb state broadcast
if needed.

BUG: 34451258
Test: Manually checked to verify the broadcasts sent.
Change-Id: I8eca5f241ad758f5c4f1afa6c9807868dfd6195a

7 years agoOnly send usb disconnect intents after boot.
Jerry Zhang [Mon, 23 Jan 2017 22:14:09 +0000 (14:14 -0800)]
Only send usb disconnect intents after boot.

This prevents cases where the device starts up and attempts
to change the config, but intents cannot yet be sent.

A patch to resend this skipped intent is necessary to
finish fixing the bug.

Bug: 34451258
Test: Check that usb state is properly handled on boot
Change-Id: I9d79c67ce8982fd5b43fa40781b66bb9ae820694

7 years agoAdds @hide permission granting API for ImsServices
Brad Ebinger [Tue, 24 Jan 2017 00:44:23 +0000 (16:44 -0800)]
Adds @hide permission granting API for ImsServices

Adds the @hide API to grant ImsServices default permissions
using the PackageManager and DefaultPermissionGrantPolicy APIs.

Test: Manual
Bug: 32460405
Change-Id: Ia143ede42623b4c2203261fc6e83624d73c478f1

7 years ago[AWARE] Minor hardening of manager.
Etan Cohen [Mon, 30 Jan 2017 21:01:50 +0000 (13:01 -0800)]
[AWARE] Minor hardening of manager.

Callbacks are possible even if no listener was defined.
Perform a check and print error (as opposed to crashing).

Bug: 32315992
Test: unit-tests + integration tests passing
Change-Id: Ia5eb81448ace6b88abcd448e4f378da6530ac630

7 years agoMerge "SFR sims should treat Spain as roaming" am: 06aed6950d
Torbjorn Eklund [Mon, 30 Jan 2017 20:14:52 +0000 (20:14 +0000)]
Merge "SFR sims should treat Spain as roaming" am: 06aed6950d
am: e5f8e6088e

Change-Id: Ifd7e98a0a1545f056128149e41fdfb35d479e54c

7 years agoMerge "SFR sims should treat Spain as roaming"
Torbjorn Eklund [Mon, 30 Jan 2017 20:10:23 +0000 (20:10 +0000)]
Merge "SFR sims should treat Spain as roaming"
am: 06aed6950d

Change-Id: I9500a419373ad590fddc31b638e37af05ac12830

7 years agoMerge "SFR sims should treat Spain as roaming"
Treehugger Robot [Mon, 30 Jan 2017 20:03:11 +0000 (20:03 +0000)]
Merge "SFR sims should treat Spain as roaming"

7 years agoCorrect the formula of battery capacity estimation.
Ying Wai (Daniel) Fan [Wed, 18 Jan 2017 23:50:19 +0000 (15:50 -0800)]
Correct the formula of battery capacity estimation.

Instead of
  (current charge) * (current battery level percentage)
the formula should be
  (current charge) / (current battery level percentage)
to estimate the charge at 100% battery level.

Bug: 34255953
Fixes: 34255953
Test: formula change CL. No existing unit tests found.
Change-Id: I56ef7af3fb097a3082e0ef24329f522d2a0229cc
(cherry picked from commit 9238b6124c72a216ccbbaa82f5f75828571d5841)

7 years agoMerge "Bluetooth: add getDiscoveryEndMillis() call" am: 1785fc4eea
Marie Janssen [Mon, 30 Jan 2017 17:57:02 +0000 (17:57 +0000)]
Merge "Bluetooth: add getDiscoveryEndMillis() call" am: 1785fc4eea
am: 7f8d8638eb

Change-Id: I6f02c4ddc0fe56cda5af2dcf2f5193ba13522792

7 years agoMerge "Bluetooth: add getDiscoveryEndMillis() call"
Marie Janssen [Mon, 30 Jan 2017 17:51:37 +0000 (17:51 +0000)]
Merge "Bluetooth: add getDiscoveryEndMillis() call"
am: 1785fc4eea

Change-Id: Iecb0aaeae57b473c8679c492717fd7c6daad82ac

7 years agoMerge "Bluetooth: add getDiscoveryEndMillis() call"
Marie Janssen [Mon, 30 Jan 2017 17:46:17 +0000 (17:46 +0000)]
Merge "Bluetooth: add getDiscoveryEndMillis() call"

7 years agoMerge "Introduce DEBUG_JAVA_DEBUGGABLE." am: 4df43ad959
Nicolas Geoffray [Mon, 30 Jan 2017 15:21:17 +0000 (15:21 +0000)]
Merge "Introduce DEBUG_JAVA_DEBUGGABLE." am: 4df43ad959
am: 27ffe754a4

Change-Id: I24d3eed3d6172fdff79a74945ecadea7b0d76590