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
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
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
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
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
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
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
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
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
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
Also added new isInManagedCall TelecomManager API, used to determine if
there are ongoing managed calls only.
Test: Manual, cts
Bug: 34159263
Change-Id: Ib8020617607ccb433c2eee9b9d5a2c929665214b
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
Rename TimeZoneBundleInstaller to TimeZoneDistroInstaller
to avoid the term "Bundle".
Bug: 31008728
Test: make droid
Change-Id: Ib2408495e0a3e011ac544aa87c622878421453e9
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
Expose api to retrieve wakelock information per client
Provide calling package name in cell info apis
BUG=31041780
Merged-In: Ie39fe59055eb7931bd179dd9e2537a7552c38af8
Change-Id: Ie39fe59055eb7931bd179dd9e2537a7552c38af8
Move methods where they belong.
Test: m
Test: Device boots
Merged-In: I805c6493078e960ff5b70d84dd93d2da6c7aa797
Change-Id: I805c6493078e960ff5b70d84dd93d2da6c7aa797
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