1. If reportInetCondition says the network is not working, and
the network is already marked not validated, don't revalidate
it. This was superfluous and should save battery.
2. If reportInetCondition says the network is working, and the
network is not marked as validated, revalidated. This will
allow us to get out of a validated state quickly based on app
input (e.g., allowing GCM's exponential backoff timer to drive
revalidation instead of our 10-minute timer).
Bug: 19258761
Bug: 19209043
Change-Id: Iaa4bac82d117ed1f4088dab106e6f6ce46b34bc3
If a user is subject to a VPN, getActiveNetworkInfo() will return
the VPN's underlying network (e.g., TYPE_WIFI), so that apps that
call getActiveNetworkInfo to answer questions like "is the device
connected to wifi?" will continue to work. Make getNetworkInfo
do this as well: if the query is for a network type that is
underlying the current user's VPN, then return that network.
Bug: 19196545
Change-Id: Ic5a651735b927c758594a26d26a03fbd704b52e6
As a backstop against missed alarm delivery / wakeups or clock slew,
make sure to always schedule a kernel alarm for the next alarm events
of interest when we've reexamined the set of deliverable alarms.
Bug 19201933
Change-Id: I3cd37a63dfb0c8258941497d4ba516ed00e2edad
On networks with a per-network PAC, Network.openConnection(URL) will
fetch using NO_PROXY. This will fail on networks where Internet
access is only permitted via the proxy. Always failing network
validation has the potential to disable WiFi auto-join. Instead
of performing the normal connectivity check, instead attempt to
fetch the PAC, as this is meant to succeed with NO_PROXY.
bug:19143573
Change-Id: Ia482f5c046d338c27daf42571f20851dfa36671c
Make sure AVR device removal due to hotplug detection failure occur
in a less strict manner - doing it only if the failure is detected
3 times in a row.
Bug: 19171321
Change-Id: I1479663b05cdc957cc52123799c756f6b74f6708
The HdmiControlService.getActiveSource() has a regression (exception)
when calling getDeviceInfoByPath since method should be called on
a service thread. Introduced a method that can be invoked safely
from the main thread.
Bug: 19170884
Change-Id: I393161e08c916270faf46147a97076bc573b808f
Help devices be processed sooner when new device detection operation
takes longer than usual.
Bug: 19181472
Change-Id: I96c29081a9c7c9f73ebcd027ed9d18056dc89bf9
<Active Source> from the device which is already in active
source state is being ignored now, but it should work with an effect
of putting input view foreground in case it is hidden behind
home launcher overlay.
For better user experience, this change lets the command from
the active source takes effect to hide the overlay if present.
Bug: 19171319
Change-Id: I43d2646f2ad470b3636e82ff71ac83cf0031ef6c
In the case when some possible resolutions of a given intent are at
different priorities (typically when they're intended as fallbacks when
no "normal" handler for the intent exists) the check for "is this the
same set of possible handlers that we saw last time?" was broken. We
now ignore resolver priority entirely in that check: match set comparison
should be orthogonal to prioritization within the set, and indeed the
priority is dealt with separately in any event.
Bug 19011225
Change-Id: I3c1658442cc88b1f4a5c5f2fe9f64472799e156c
Taps outside of the stack boundary were causing the current app to
lose focus. This led to timeouts waiting for the app to respond.
Disabling the tap recognition keeps the focus from changing. It will
be reenabled for multiwindows.
Fixes bug 17721767.
Change-Id: Iad854b19979390e73b97239e489ad7ef82e03d47
Additional debug and useful information.
Also removed am_resume_activity verbosity and refactored method to
eliminate unused parameter.
For bug 17721767.
Change-Id: Ie1c0652a38a0c6ae6db27a52a9e5da29e252e300
1. Retry validation 3 times instead of 10.
Reducing the number of retries speeds up dead network detection
and saves battery on networks that are don't have Internet access
(or block our connectivity checks).
Retrying 10 times is overkill. Each attempt sends 5-10 DNS
requests, waits 10 seconds to transfer only 3 or 4 packets, and
can last up to tens of seconds. Also, in MR1 we now retry every
10 minutes.
2. Make periodic revalidation only try once.
When validating periodically to see if a non-working connection
is working again, only make one attempt every 10 minutes, not
three.
3. Rename "retries" to "attempts" to make things a bit clearer.
Bug: 18922569
Bug: 18869302
Change-Id: I5f70b420c4f1bac0c33bb9ab6afb322902cdac4b
Previously the time gap between the first and the second key event
for repeated keys(press-and-hold) can be bigger than the threshold,
which violates CEC spec. This CL rectifies it by managing its own
state rather than relying on Android key handler.
Bug: 19117830
Change-Id: Iedfa48f9ab826252e8616d1c3b7491e8b8333c81
This CL introduces a logic that, upon receiving <Inactive Source>
from the active source or a corresponding MHL subcommand, lets
the service return to one of internal inputs.
Introduced to handle it is a new type for HdmiDevice (INACTIVE)
that will be passed to input change listeners. The callback
is expected to transform to other mechanism such as intent,
to let TV app to decide which input to switch to, which will
be one of non-HDMI input that was viewed previously.
Bug: 19008579
Change-Id: I1922f4cd20e9220411061bb9d9fbe5fbc5676d48
Saves users from having to switch TV input manually to a playback device
after it boots up.
Bug: 19046176
Change-Id: I0a4fae1036138ce2e19cbac9fdd9dda41bdcf89f
Symptom:
In some scenario, there might have two home tasks
in the home stack. If the top home task was finishing
and expected to return to home stack, no activity
will resume.
Root Cause:
Unable to perform resumeHomeStackTask() because the
resumeTopActivityLocked() has been prevented to invoke
recursively.
Solution:
Just resume the next activity if already in home stack
Change-Id: I24ecbcac6cee4ddbd90cdd27c4f4915cffb9b354
Reason: Executing service com.google.android.syncadapters.contacts
/.SyncHighResPhotoIntentService
Make the code more robust when destroying services, so that if
the nesting count gets out of sync we don't just hang.
Change-Id: If117d5ef242e7c148fd9576bd89a1a092583d6ad
Makes sure the previous HDMI input gets switched to upon receiving
<Inactive Source> from the current active source device.
Bug: 18986597
Change-Id: I7120e81d75b5fd4cafd4b483e9b232b96e50f597