323103 Commits

Author SHA1 Message Date
Hansong Zhang
d30e47ecfc Merge "Bluetooth HID Device: Fix a typo" 2017-09-30 04:35:54 +00:00
Hansong Zhang
ecd09fb952 Bluetooth HID Device: Fix a typo
Fixed a typo in BluetoothInputHost. "DIGITIZER_TABLED" should be
"DIGITIZER_TABLET".

Test: Not needed.
Change-Id: I06ffc536f5912d53319b4d325f77991d65ab04f2
2017-09-29 20:56:00 +00:00
Treehugger Robot
c3b1442d52 Merge "AmrInputStream is not a public API" 2017-09-29 19:50:37 +00:00
Marco Nelissen
323d2a56ec AmrInputStream is not a public API
and nobody should be using it. Add some warnings to that effect.

Change-Id: I8029ccd665fd147b4708a68f61c6aa055004a5c1
2017-09-29 10:15:34 -07:00
Treehugger Robot
48c7d27f64 Merge "Change BlockingSocketReader to use MessageQueue fd handling" 2017-09-29 02:12:32 +00:00
Mathieu Chartier
34cf8b2c04 Merge "Add frameworks base config and move text blobs there" 2017-09-28 23:43:46 +00:00
Treehugger Robot
3e3e26305a Merge "VintfRuntimeInfo: do not fetch files that are not needed" 2017-09-28 22:11:43 +00:00
Mathieu Chartier
486b198eda Add frameworks base config and move text blobs there
Bug: 64259751
Test: clean oat files && make and flash

(cherry picked from commit a023b86c3b4554b90ed6edfd63cedddb4f0100f9)

Merged-In: I7c898d69e66257fe0a7827ebbab1fcff4aa6473e
Change-Id: Ifb40ec51e7184984853c0d2382f040d2dea63168
2017-09-28 15:11:10 -07:00
Dan Willemsen
3e47510e0e Merge "Rename libz-host -> libz" 2017-09-28 20:57:43 +00:00
Treehugger Robot
7dd3a7d5c0 Merge "Frameworks: Move Log holder to be preloaded" 2017-09-28 20:57:35 +00:00
Makoto Onuki
36d606c86d Merge "Don't cancel by UID when an app is disabled or uninstalled" 2017-09-28 16:19:05 +00:00
Andreas Gampe
604bae849d Frameworks: Move Log holder to be preloaded
To avoid issues with late initialization, let the holder be
initialized in the zygote.

(cherry picked from commit 61a3e8c23a7c62c389433113802a0d74f4ab53cf)

Bug: 65927416
Test: m
Merged-In: I6f454df46d4c64d295e1f2510793d5087b74fb74
Change-Id: I6f454df46d4c64d295e1f2510793d5087b74fb74
2017-09-28 08:54:10 -07:00
Hugo Benichi
60d5390f7a Merge "Fix NPE in NsdServiceTest" 2017-09-28 12:13:18 +00:00
Erik Kline
f840e07f82 Change BlockingSocketReader to use MessageQueue fd handling
Convert the simplistic blocking read in a separate thread model to
the MessageQueue OnFileDescriptorEventListener model, albeit still
on a separate thread.

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - basic IpManager functions still work,
      including ConnectivityPacketTracker
Bug: 62476366
Bug: 67013397
Change-Id: I1f4a6707eba402338947fe3f5392a26660f05714
2017-09-28 18:22:40 +09:00
Jean Chalard
6201cc6f27 Merge "Do not throw on call to isTetheringSupported w/o permission" 2017-09-28 07:39:14 +00:00
Chalard Jean
092d50d1bd Do not throw on call to isTetheringSupported w/o permission
...just return false instead.

Test: Made an app to test this. Made sure it doesn't have
Test: the required permission. Checked it crashes with
Test: SecurityException without this change. Checked that it
Test: doesn't with it.

Merged-In: Ib5b17a7f68c1327f47fe1f54c0454c51f4226907
Change-Id: Id20d3c240ec5d70d085e0366b92ab3a514f3e7c8
(cherry picked from commit 8f76fc38ec1682667de2caf3940fbfb71744d368)
2017-09-28 16:34:39 +09:00
Hugo Benichi
d9e551957b Fix NPE in NsdServiceTest
Continuous test dashboards report that quit() can crash sometimes
due to mThread being null.

This patch adds a null guard in tearDown().

Bug: 32561414
Test: runtest frameworks-net
Change-Id: If66fb47e31e77d25b4741a786f12eb78f0b9102e
2017-09-28 15:22:13 +09:00
Dan Willemsen
a2902e38a4 Rename libz-host -> libz
Test: m host
Change-Id: I2806dde519602bc31b622ae3b3f55ab8b1287744
2017-09-27 16:20:31 -07:00
Yifan Hong
4bb83df190 VintfRuntimeInfo: do not fetch files that are not needed
... to avoid unnecessary denials.

Test: CtsDeviceInfo
Bug: 66960848
Change-Id: I28821c44285a7de424a79b8a374feac6718605b1
2017-09-27 22:32:14 +00:00
Treehugger Robot
f4ec2ab706 Merge "Modify Bluetooth Class of Device from Android stack" 2017-09-27 19:43:17 +00:00
Lorenzo Colitti
d1ae268081 Merge "Delete the legacy framework code for manipulating ND offload." 2017-09-27 10:46:36 +00:00
Jean Chalard
b4a5933a62 Merge "Adds necessary permissions to system apis" 2017-09-27 09:50:42 +00:00
Treehugger Robot
0d3d35b30b Merge "Declare support for Ethernet if the service is running." 2017-09-27 08:23:34 +00:00
Lorenzo Colitti
59da962b9f Delete the legacy framework code for manipulating ND offload.
This only worked on broadcom devices, and was superseded in
M by a wifi HAL call made by IpManager.

Test: bullhead builds, boots
Change-Id: I711cae7dafe171c2c8b4e84a229adbcad27f3d14
2017-09-27 16:47:36 +09:00
Lorenzo Colitti
7bbe3eee52 Declare support for Ethernet if the service is running.
On some devices, support for TYPE_ETHERNET is not specified in
the networkAttributes config resource, even though the device is
capable of supporting Ethernet (e.g., via USB host adapters).
This leads to Ethernet working but various connectivity APIs
behaving as if it was not - for example, no CONNECTIVITY_ACTION
broadcasts will be issues when it connects or disconnects.

Ensure that ConnectivityService always treats Ethernet as
available if the service is running. Currently the service is
started if the device supports FEATURE_ETHERNET or
FEATURE_USB_HOST.

Bug: 37359230
Test: bullhead builds, boots
Test: ConnectivityServiceTest passes
Test: Ethernet is available even if removed from networkAttributes resource
Test: ConnectivityManagerTest CTS test passes
Change-Id: I58801bf4f0bbdc3ff6345ec6bfdc911ce045c8ab
2017-09-27 13:03:10 +09:00
Udam Saini
c3b640cf48 Adds necessary permissions to system apis
adds privileged permission for getCaptivePortalServerUrl
adds tether privileged permission for
startTethering,isTetheringSupported

bug:62348162

Test: make and manual testing
Change-Id: I8eb8e3c9dcd7201abe9ea303ee57fe99073d67eb
2017-09-27 12:14:37 +09:00
Fyodor Kupolov
bff14ae56f Merge "[DO NOT MERGE] Fix another AddAccountSettings memory leak" 2017-09-27 00:25:16 +00:00
tiansiming
7183f0a6f3 [DO NOT MERGE] Fix another AddAccountSettings memory leak
The memory leak will always occur in AddAccoutSettings
when Bundle with an invalid intent returned in the addAccount we implement.

Bug:https://issuetracker.google.com/issues/66088681
Test:Install the app through the github offered in above link,
then press the "Test" item in ChooseAccountActivity (adb shell am start -n
'com.android.settings/.accounts.ChooseAccountActivity') serveal times.
Check the activity number by "adb shell dumpsys meminfo com.android.settings".

Change-Id: Id15fc73521d0ddc6ca891b6029ad04cd4427dbfe
Signed-off-by: tiansiming <tiansiming@xiaomi.com>
2017-09-26 22:20:57 +00:00
nharold
680525c742 Merge changes from topic "re-enable-ipsec"
* changes:
  Re-Expose IpSecService API Surface
  Re-Enable Starting of the IpSecService
2017-09-26 21:46:39 +00:00
Makoto Onuki
bee2fa4b90 Don't cancel by UID when an app is disabled or uninstalled
Instead, cancel by UID/package.

Bug: 64536115
Test: DO NOT MERGE
Change-Id: Ib1c973e19dbbea1a537de91a96e6a21c787faeaf
Merged-in: I8f50c459cf321ac43fd2a6696cb8d4c593accd67
2017-09-26 20:02:56 +00:00
Hugo Benichi
b9e2ddfc10 Merge changes Ia47e566b,Ib94d79a9
* changes:
  Separate connectivity event buffer for bug reports
  Extract RingBuffer class from NetdEventListenerService
2017-09-26 09:48:10 +00:00
Hugo Benichi
1198ba1533 Separate connectivity event buffer for bug reports
This patch uses the RingBuffer class previously extracted out of
NetdEventListenerService for buffering connectivity events in two
independent buffers:
 - the current existing buffer used for metrics reporting
 - a new rolling buffer, used for bug report dumpsys.

This improves the suefulness of connectivity metrics for bug reports
by solving these three issues tied to the usage of the existing metrics
reporting buffer:
 - the buffer is always cleared when metrics reporting happens. If a bug
 report is taken shortly after, there is no past connectivity event
 added to that bug report.
 - the buffer has a max capacity and starts dropping new events when it
 saturates, until metrics reporting happens. When this happens, a bug
 report will not contain recent connectivity events.
 - some types of event are rate limited to avoid flooding the metrics
 buffer. events dropped due to rate limits never appears in the bug
 report, but the new bug report buffer ignores rate limiting.

Bug: 65164242
Bug: 65700460
Test: runtest frameworks-net,
      manually inspecting ouput of $ adb shell dumpsys connmetrics -a

Change-Id: Ia47e566b0c9a6629a26afb7067d5a8efadc25aef
2017-09-26 14:14:25 +09:00
Hugo Benichi
67c5e03b54 Extract RingBuffer class from NetdEventListenerService
This patch takes out the ring buffer array added for NFLOG wakeup packet
events logging and extract it into its own class for reuse. This new
RingBuffer class has the two minimal useful functions append() and
toArray().

Bug: 65164242
Bug: 65700460
Test: runtest frameworks-net, with new unit test
Change-Id: Ib94d79a93f4e99661b7d0fac67117b91d57af980
2017-09-26 14:14:16 +09:00
Treehugger Robot
b0510407da Merge "Fixed that telephony registry service reference incorrectly assigned" 2017-09-25 19:14:04 +00:00
Jack Yu
e4e5dabe8c Fixed that telephony registry service reference incorrectly assigned
The reference to telephony registry service was assigned
prior telephony registry service was ready. Fixed by
casting the binder every time when we use it.

Test: Manual
Bug: 65593241
Merged-In: Ib234cdfd93130f7af44ef79271b106fffb8ebad5
Change-Id: Ib234cdfd93130f7af44ef79271b106fffb8ebad5
(cherry picked from commit 66420e258a97e864985530ae7a1e208c978dbc7a)
2017-09-25 10:29:56 -07:00
Nicolas Geoffray
a7bf2a21d9 Merge "Move code around for deleting oat artifacts." 2017-09-25 08:32:51 +00:00
Nicolas Geoffray
107899c599 Merge "Special handling of priv-apps in PMS." 2017-09-25 08:22:34 +00:00
Hans Boehm
3c03d5bd2b Merge "Naming fix and add comments" 2017-09-25 04:09:30 +00:00
Treehugger Robot
1ba697e29b Merge changes from topic "equalizer_1"
* changes:
  Fixing code formatting to comform to checkstyle
  Add sensor HAL process into dump list
2017-09-23 02:39:42 +00:00
Peng Xu
aad139a2d3 Merge changes from topic "equalizer"
* changes:
  Update Java doc of SensorManager.createDirectChannel
  sensors: pass sensor handle along with injected event
2017-09-23 00:17:10 +00:00
Peng Xu
62f2c87ee3 Fixing code formatting to comform to checkstyle
Fix following types of issue
  * over 100 char/line
  * missing space
  * trailing spaces
  * array bracket position
  * variable naming convention (some cases)
  * indentation
  * long expression wrapping operator position
  * missing curly brace for one line scope
  * function modifier order

Things not changed in this CL:
  * Redundant public modifiers.
  * A few local variable names.
  * Suggested @deprecate but function is actually @removed.

Test: m and m docs
Change-Id: I5c22648888487edaa5954026a166cfd810a8a912
2017-09-22 16:58:14 -07:00
Hans Boehm
eb6d62cd33 Naming fix and add comments
Also fix up imports to make repohooks happy and some whitespace issues.

A very small step towards making this code more understandable.

Bug: 65760710

Test: Builds.
Change-Id: I0396c06bb303e0b06ad0cbbbff4fdc1ac527ac6c
2017-09-22 15:49:48 -07:00
Myles Watson
b4e17814f0 Merge changes from topic "avrcp_cherry_picks"
* changes:
  Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (1/2)
  Add equal overloads to some MediaDescription and MediaQueue objects (2/3)
2017-09-22 16:37:33 +00:00
Ajay Panicker
90ef7dfde0 Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (1/2)
This is requied for the 2012 Mazda 3 carkit as the carkit refuses to send
AVRCP commands other than passthrough commands when the version is anything
else. AVRCP 1.3 is compatible with most carkits on the market and can be
used to get most carkits working at the cost of losing many features.

Bug: 37943083
Test: Set AVRCP 1.3 in developer options and see that SDP and the AVRCP
      capabilites have updated to reflect this.
      TestTracker: 105915/3975

Change-Id: I637b695e5cd8baa5f054ca0dda81372080a96269
2017-09-22 16:31:49 +00:00
Ajay Panicker
905d8ab843 Add equal overloads to some MediaDescription and MediaQueue objects (2/3)
Bug: 64686424
Test: Connect to carkit and see that NowPlayingChanged only gets sent when
      the queue changes, run cts test
Change-Id: I58c9dd0bf976485a2efefd042cd667ee433e07e1
(cherry picked from commit 6edb68bea68d5f324384f3e9e411118eb8dfc781)
2017-09-22 16:31:43 +00:00
Nicolas Geoffray
20a894ed54 Special handling of priv-apps in PMS.
If pm.dexopt.priv-apps is set to false, don't do any dexopt on it, and
check the APKs have uncompressed and aligned code.

bug: 30972906
bug: 63920015

Test: works as expected when pm.dexopt.priv-apps is true or false
Change-Id: I72a322defb459549617028e030f1aec997223af5
2017-09-22 15:54:10 +01:00
Treehugger Robot
c3d3cf5666 Merge "fixed handling of data URI schemes in Intent.toUri" 2017-09-22 09:04:16 +00:00
Nicolas Geoffray
575697a574 Move code around for deleting oat artifacts.
Test: make and boot
(partially cherry-picked from commit 246dccf9327631597767afe418ce43ae6d07d102)

Change-Id: Id3ce5fdee116df264241dfdee95734ac4bbad7ce
2017-09-22 09:11:08 +01:00
Treehugger Robot
941d4b2135 Merge "Add checking values not to save illegal value to appwidgets.xml" 2017-09-22 02:17:47 +00:00
Christopher Schuster
42c3a6e6af fixed handling of data URI schemes in Intent.toUri
Data URIs in intents can use schemes with digits and some special
characters (see RFC 2396 and 3986). This patch fixes how these
data URIs are handled by Intent.toUri to support these schemes.

Bug: 63930680
Test: run cts android.content.cts.IntentTest#testUris
Change-Id: I0dbb72325f59f372abba83be9e14c59d5665a053
Signed-off-by: Christopher Schuster <levjj@google.com>
2017-09-21 15:20:16 +00:00