277672 Commits

Author SHA1 Message Date
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
Hiroaki Kuriyama
36bebe8420 PrintSpooler: Remove recommendation if Play Store is not installed
Sympton:
If Play Store (com.android.vending) is not installed, printer
recommendation function which guides a user to Play Store is useless.

Root-cause:
Even if Play Store is not installed,
PrintSpooler tries to start an activity for market:// with package
names in Play Store.

Solution:
Hide printer recommendation UI and show "No print services enabled"
if there is no printer service.

Change-Id: I0b2eabbd57bc47c6382f53e610e33252ea359390
2017-02-14 21:21:16 +09:00
Yohei, Oshima
977aad5a65 Fix dead lock in Tethering state machine
This fix is for tethering from N MR1. It reserves the same idea
originally in e4bdfd8ad86a013c5a2ee8964119393cea1ec4a3.

Tethering is animated by two state machines. If an error occurs,
one of the state machine notifies the other and definitely stays
in the error state while the other retries the tether operation
after having treated the error.

An example is when dnsmasq is started by calling tether(), but while it
hasn't finished starting yet untether() is called asynchronously
by a different tethering. Then "Setting DNS forwarders failed!" error
occurs and device can't be tethered anymore without reboot.

This patch allows to clear the error of the blocked state machine
from the other one and thus recover a normal cycle.

Test: fastly switching USB/Wi-Fi tethering On/Off repeatedly
Test: manually kill dnsmasq during BT tethering then turn on
      Wi-Fi tethering

Change-Id: Ide062dd4c15a0e7c72eced9a5fe807f845d4ea9c
2017-02-14 11:34:52 +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
Tyler Gunn
3b8f62b602 Format Japanese numbers using national format when in Japan.
Similar to the like change for Korean phone numbers, ensure that when the
user is in Japan, Japanese phone numbers are formatted using the national
format rather than the international format.

Test: Unit
Bug: 27090466
Change-Id: I3487eea9fddbe7ee15c03da3f03d53f9dcea0834
2017-02-12 21:26:13 -08:00
Tyler Gunn
24e1833617 Support for showing self-managed calls in IncallService.
Also added new isInManagedCall TelecomManager API, used to determine if
there are ongoing managed calls only.

Test: Manual, cts
Bug: 34159263
Change-Id: Ib8020617607ccb433c2eee9b9d5a2c929665214b
2017-02-12 19:33: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
Neil Fuller
2b653dcc63 TimeZoneBundleInstaller -> TimeZoneDistroInstaller
Rename TimeZoneBundleInstaller to TimeZoneDistroInstaller
to avoid the term "Bundle".

Bug: 31008728
Test: make droid
Change-Id: Ib2408495e0a3e011ac544aa87c622878421453e9
2017-02-10 18:03:08 +00:00
Sooraj Sasindran
8fbf6a29d0 Merge "Expose api to retrieve wakelock information per client" 2017-02-10 05:38:41 +00:00
Treehugger Robot
851afe56b8 Merge "Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit" 2017-02-10 00:45:56 +00:00
Brad Ebinger
ade9937437 Add UI prompt for MMI code failure on 3gpp
Some carriers do not support call forwarding MMI codes while roaming
on 3gpp networks. A new message has been added that clarifies this
to the user.

Test: Manual
Bug: 30106345
Merged-In: Id8d3434b02346eaad4f52d514a3269b5750ca1c3
Change-Id: Id8d3434b02346eaad4f52d514a3269b5750ca1c3
2017-02-09 15:00:49 -08:00
Sooraj Sasindran
335c89c22e Expose api to retrieve wakelock information per client
Expose api to retrieve wakelock information per client
Provide calling package name in cell info apis

BUG=31041780
Merged-In: Ie39fe59055eb7931bd179dd9e2537a7552c38af8
Change-Id: Ie39fe59055eb7931bd179dd9e2537a7552c38af8
2017-02-09 21:51:04 +00:00
Andreas Gampe
4e66db8d0c Framework: Clean up RuntimeInit/ZygoteInit/WrapperInit
Move methods where they belong.

Test: m
Test: Device boots
Merged-In: I805c6493078e960ff5b70d84dd93d2da6c7aa797
Change-Id: I805c6493078e960ff5b70d84dd93d2da6c7aa797
2017-02-09 13:16:17 -08:00
Paul Duffin
621ebe692f Merge "Partial Revert "Replace com.android.internal.util.Predicate with java.util.function.Predicate"" 2017-02-09 19:18:35 +00:00
Paul Duffin
57e490cf8c Partial Revert "Replace com.android.internal.util.Predicate with java.util.function.Predicate"
This partially reverts commit 3e5fbca0c57742f28f5c7e6bda6c3500b9471b47.

Bug: 35187548
Bug: 30188076
Bug: 35089332
Test: make checkbuild
Change-Id: I7ab4279aab604e3d56003b0a59867948aebabd28
2017-02-09 14:52:43 +00:00
Yuxin Chang
6b750865ed Show connection error reason for Passpoint AP
Currently "Available via <provider friendly name>" is always shown
in the summary with Passpoint AP, even connection error happens,
so user might not notice the error happens.

Better to show error reason when connection error happens,
so that user can notice the error and take actions to solve it.

Bug: 35190091

Change-Id: If0d06e800df8de3119590372feda946457aab5e6
2017-02-09 22:28:30 +09:00
Martijn Coenen
60f11f3d16 Merge "Don't generate and send reply object in oneway calls." 2017-02-09 08:37:31 +00:00
Martijn Coenen
60bf84a129 Don't generate and send reply object in oneway calls.
Bug: 35044790
Test: hidl_test, hidl_test_java
Change-Id: Iae8f5b071f89d2af5ca15360c6a1a0fbf8040e77
2017-02-09 08:34:05 +00:00
Treehugger Robot
c164b159f8 Merge "Change prototype for "setCamera" in IMS VideoProvider." 2017-02-08 21:46:44 +00:00