277528 Commits

Author SHA1 Message Date
Treehugger Robot
2f21f71da4 Merge "Added the new RIL request to set SIM power state" 2017-02-17 01:13:26 +00:00
Hugo Benichi
37e3f22c2e Merge "IP connectivity metrics: delete obsolete logger service" 2017-02-16 23:52:13 +00:00
Leonard Mosescu
05dfd10254 Merge "Adding "attach-agent" to ActivityManagerShellCommand" 2017-02-16 23:12:26 +00:00
Eino-Ville Talvala
b59cd66e93 Merge "camera case fail for testSceneModes" 2017-02-16 21:35:36 +00:00
Leonard Mosescu
02758a9a80 Adding "attach-agent" to ActivityManagerShellCommand
This new command is used to attach runtime agents to a running application:

attach-agent <PROCESS> <FILE>
   Attach an agent to the specified <PROCESS>,
   which may be either a process name or a PID.

Test: m test-art-host, manual testing:
    . invalid syntax, missing arguments
    . invalid syntax, extra arguments
    . invalid numeric PID
    . invalid process name
    . valid process, not debuggable
    . valid process, missing agent
    . valid process, valid agent

Bug: 31682382

Change-Id: I61cc8bf20addb1702acc8e7aae65b2f9ed7c5ca0
Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
2017-02-16 13:19:41 -08:00
Narayan Kamath
97ebc29e9c Merge "Track libcore change d7d594236d66c4d595f7622a264fd51." 2017-02-16 17:12:48 +00:00
Neil Fuller
eb82e3de87 Merge "TimeZoneBundleInstaller -> TimeZoneDistroInstaller" 2017-02-16 15:51:27 +00:00
Narayan Kamath
03d82b2ea3 Track libcore change d7d594236d66c4d595f7622a264fd51.
Test: make update-api docs
Change-Id: Icfe470034b53afff60469d5bcfd58d959cea2488
2017-02-16 14:37:39 +00:00
Etan Cohen
6fb97e8fd8 Merge changes from topic 'cm_request_to'
* changes:
  [CM] Remove maximum timeout value for request network
  [CM] Remove non-functional timeout from request network
2017-02-16 14:15:44 +00:00
Etan Cohen
ba07c8c4ec [CM] Remove maximum timeout value for request network
The request network with timeout was originally created with a
check of max timeout against a constant of 100 minutes. However,
the API was not public and did not implement a timeout. Any users
were internal and never got any onUnavailable() callback (since
timeout never triggered).

There is no reason to have a max timeout so the constant is
remove.

Bug: 31399536
Test: unit tests and CTS of ConnectivityManager
Change-Id: Icbedfb4299d75b6a7e3e43720111531f1faafd06
2017-02-16 14:15:16 +00:00
Treehugger Robot
3ac3170a4b Merge "OBEX: Set Min maxPacketLength negotiated in CONNECT Operation." 2017-02-16 12:59:16 +00:00
Treehugger Robot
e0ba81110a Merge "Fix the "Alarm volume" icon is displayed incorrectly" 2017-02-16 12:47:43 +00:00
Hugo Benichi
c217f7a9f3 Merge "Captive portal: better detect empty responses" 2017-02-16 06:54:48 +00:00
Jack Yu
866e9e3947 Added the new RIL request to set SIM power state
The new RIL request for powering up/down the SIM card.

Test: Telephony sanity tests
bug: 32224755
Merged-In: Ia20f824eb9a0bf6d5f63f782a8d42a22a0355938
Change-Id: Ia20f824eb9a0bf6d5f63f782a8d42a22a0355938
2017-02-16 05:11:41 +00:00
Hugo Benichi
e3aae40d07 Captive portal: better detect empty responses
The captive portal detection logic treats empty http responses with a
Content-Length of 0 as not coming from a portal.

However when the Content-Length is missing from the response header, the
empty response is not detected as such and is classified as a captive
portal answer.

When this happens for the http probe, the portal detection logic will
short circuit the detection and wrongly report a portal. The system
validates the network in such conditions only if the https probe
returns a successful connection faster than the http probe.

This patch attempts to better detect empty responses by trying to read
the first byte from the response body when the Content-Length is missing
for 200 responses.

Test: build, flashed + manual tests.
Bug: 33498325

(cherry picked from commit cb4aa4d412c7940386df9b8dd681e0d2efebfd1d)

Change-Id: Ibb9914cba72a4dab3ae76746d8889bbf083be812
2017-02-16 12:31:30 +09:00
Hall Liu
decc6c9d56 Merge "Add extra key for app-specified outgoing call timeout" 2017-02-15 21:41:23 +00:00
Badhri Jagan Sridharan
37b939a180 Merge changes from topic 'dual_role_chargers'
* changes:
  Introduce debounce to filter rapidly toggling type-c ports
  Fix handling usb dialog for wall chargers.
2017-02-15 20:00:25 +00:00
Badhri Jagan Sridharan
c584d77b93 Introduce debounce to filter rapidly toggling type-c ports
Type-c ports can quickly toggle between connected/disconnected
states. Introduce debounce to prevent sending spurious notifications.

Bug: 34972898
Test: notification should not be queued for a pixel-c charger not connected
to the power outlet.
Change-Id: I4aa19f9f864fe5b77e65f6a07a3184d8aba1f5fc
2017-02-15 10:21:19 -08:00
Badhri Jagan Sridharan
1b8e847a87 Fix handling usb dialog for wall chargers.
UsbPort.POWER_ROLE_SINK is orthogonal to the type of the charger
attached. POWER_ROLE_SINK would be the case for AC charging and
USB charging. Therefore query BatteryManager for the charger
type.

Bug: 34972898
Test: Charging notification should not show for pixel-c chargers.
Change-Id: I8dddcd7727b6af973bd173d2c6e325aa4be2ca3a
2017-02-15 10:21:02 -08:00
Hugo Benichi
d22edc28f5 IP connectivity metrics: delete obsolete logger service
Test: - runtest frameworks-net
      - manually verified $ adb shell dumpsys connmetrics
Bug: 32648597

Change-Id: I69f7dee5871508398d7f7209658a00c768e2d18e
2017-02-15 17:12:58 +09:00
Hall Liu
8f613fb4d6 Add extra key for app-specified outgoing call timeout
Bug: 34474757
Test: manual
Change-Id: Ia93d68d6a01308b0b93b88977daf983a0ed3a22c
2017-02-14 18:11:11 -08:00
Hugo Benichi
b688dd18ab Merge "ConnectivityManager: fix potential NPE" 2017-02-15 00:53:44 +00:00
Erik Kline
7a42d3ad83 Merge "Split chooseUpstreamType() into two separate functions" 2017-02-15 00:38:50 +00:00
Erik Kline
63445824d6 Merge "Slightly simplify mTryCell and requestUpstreamMobileConnection() usage" 2017-02-15 00:38:32 +00:00
Treehugger Robot
4516240b47 Merge "Pass targetSdkVersion specifier for SELinux labeling" 2017-02-14 23:42:59 +00:00
Etan Cohen
e9aea9d397 [CM] Remove non-functional timeout from request network
Until now the request network with timeout was non-functional
(see b/31402633). Any caller which was using the timeout getting
the request network without a timeout.

While the timeout version has now been implemented, a max
timeout value is being removed since the large number used
(100 minutes) had no rationale for existing.

Updating the code to reflect the functionality which was
actually used - without a timeout.

Bug: 31399536
Bug: 35354391
Test: unit tests and CTS of ConnectivityManager
Change-Id: I0ebf0917a4478036a5ae532dd1e0784479057eb8
2017-02-14 21:11:20 +00:00
Colin Cross
6b32770d6d Merge "Use asm-5.2 prebuilt" 2017-02-14 19:03:46 +00:00
Michael Peck
7c4787b4df Pass targetSdkVersion specifier for SELinux labeling
Motivation:
Provide the ability to phase in new security policies by
applying them to apps with a minimum targetSdkVersion

Test: Marlin builds and boots. Apps targeting targetSdkVersion<=25
run in untrusted_app_25 domain. Apps targeting the current development
build >=26 run in the untrusted_app domain with fewer permissions. No
new denials observed during testing.
Bug: 34115651
Change-Id: Ib9f6ded9bd2f426861a6d843861b4074084253b0
2017-02-14 09:07:04 -08:00
Orion Hodson
3023906b1b Merge "Import CallSite classes and BootstrapMethodError class from ojdk8u60" 2017-02-14 16:02:33 +00:00
Treehugger Robot
d530d1bf18 Merge "[NotificationManagerService]: Fixes the thread-safe issue." 2017-02-14 14:23:19 +00:00
Erik Kline
14f7faf78e Split chooseUpstreamType() into two separate functions
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Change-Id: If892864ff59a6f38340791597c2d9e5b4022bbfa
2017-02-14 19:03:16 +09:00
Erik Kline
fb41343c8c Slightly simplify mTryCell and requestUpstreamMobileConnection() usage
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131

Change-Id: I46fbd176a71e61552d7d92660c1debe6487a1edf
2017-02-14 18:50:21 +09:00
Treehugger Robot
3d57eb0bdc Merge "Verify duplicate upstream notifications are ignored" 2017-02-14 09:32:56 +00:00
Hugo Benichi
6f260f3691 ConnectivityManager: fix potential NPE
ConnectivityManager static sCallbackHandler is referenced and directly
used in a way that is not ensuring its proper initialization.

This patch fixes this potential NPE by using getHandler() instead.

Also this patch changes sendRequestForNetwork's signature to only accept
the subtype CallbackHandler instead of Handler: without using
CallbackHandler the NetworkCallbacks are not triggered properly and
bookkeeping of sCallbacks does not happen. sendRequestForNetwork's
signature now makes this explicit.

This step prepares the addition of overloaded versions of
registerNetworkCallback and cie that takes custom Handlers.

Test: build, flashed, manually checked connectivity
Change-Id: I52e8a2cb5075e7aef7b35e30c9845cacba927d13
2017-02-14 16:01:40 +09:00
Erik Kline
624bf3d7f6 Verify duplicate upstream notifications are ignored
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest .../tethering/TetherInterfaceStateMachineTest.java passes
Bug: 32163131

Change-Id: I3c097d766fe4c416a8e3f02640809fe1199c6ef2
2017-02-14 15:55:57 +09:00
Erik Kline
ed6d75d5f3 Merge "Cleanup in the face of upstream error" 2017-02-14 06:09:22 +00:00
Erik Kline
8ea45483fc Cleanup in the face of upstream error
If either enableNat() or startInterfaceForwarding() fail, be sure
to cleanup any commands that might have succeeded.

Most of this change is a refactoring of cleanupUpstreamIface() into
two methods, one of which (cleanupUpstreamInterface()) is reused
in error handling scenarios.

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest -x .../tethering/TetherInterfaceStateMachineTest.java passes
Bug: 32031803
Bug: 32163131

Change-Id: Ia4d56e03beeab1908d8b8c2202e94992f1aa58a4
2017-02-14 12:20:39 +09:00
Ningyuan Wang
fb19d8d7c1 Merge "Create createFromByteArray() for WifiSsid" 2017-02-14 02:13:34 +00:00
Chen Xu
132842efc9 Merge "Add simActivationState to PhoneStateListener" 2017-02-14 01:26:19 +00:00
Ningyuan Wang
a6ea570a4a Create createFromByteArray() for WifiSsid
Bug: 35318006
Test: compile, unit tests
Change-Id: I0138bd67c0dec37419897318401b18ee4445a111
2017-02-13 15:40:19 -08:00
Colin Cross
80e86bae0e Use asm-5.2 prebuilt
Test: m -j checkbuild tests cts
Change-Id: I37d40cc2e0406679394012aacd49f7ca9e51e3f6
2017-02-13 12:54:10 -08:00
Treehugger Robot
d3146f3c3c Merge "hotspot2: fix typo in the getter functions" 2017-02-13 19:49:51 +00:00
Treehugger Robot
89e6bf0532 Merge "Add test coverage for cleanup bug to be fixed." 2017-02-13 11:51:21 +00:00
Erik Kline
a954be9563 Add test coverage for cleanup bug to be fixed.
The test calls that need to pass but do not currently are commented out.

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest -x .../tethering/TetherInterfaceStateMachineTest.java passes
Bug: 32031803
Bug: 32163131

Change-Id: I68ed476920bef882f353d8e8a54c72120bc27002
2017-02-13 17:38:34 +09:00
fionaxu
64eebba6bc Add simActivationState to PhoneStateListener
- new public SimActivationState
- hook with PhoneStateListener, notifying registrants when voice&data
  activation state changed

Bug: 31061369
Test: existing TC runtest --path frameworks/opt/telephony/tests/telephonytests
Test: new TC runtest --path
frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/SimActivationTrackerTest.java

Merged-in: CHANGE-ID Ieefe2698fe6055a980d225f5ce74f52aef0daab4
Change-Id: Iac6418f66c9dad44dc7272ab19aa87f3eef232f8
2017-02-13 00:26:35 -08:00
Treehugger Robot
e690e0178c Merge "Allow EAP-SIM authentication methods under PEAP" 2017-02-11 02:34:51 +00:00
Paul Stewart
e613fccb56 Allow EAP-SIM authentication methods under PEAP
Extend the PEAP outer method to contain EAP-SIM innner methods
so these transactions can be encrypted.

Cherry-pick of 68c63024c2ace87921c1e84a99d18dae6001c74c

Bug: 34835771
Test: Unit tests

Change-Id: I4931ed43e396c93bad0bfce1750291982f8cd146
2017-02-10 16:15:52 -08:00
Treehugger Robot
c6c11723cb Merge "Expand seccomp whitelist" 2017-02-10 21:08:07 +00:00
Paul Lawrence
39139358e5 Expand seccomp whitelist
Bug: 34763393
Test: cts test android.os.cts.SeccompTest now passes
Change-Id: I8907074485395015a03119700543ff33fdd8e214
2017-02-10 10:42:07 -08:00
Yifan Hong
01f374c635 Merge "android.os.HwBinder.getService() in Java respects VINTF." 2017-02-10 18:33:42 +00:00