Adds a new kind of alarm that represents an alarm clock and
a way to query the next scheduled alarm clock.
Deprecates Settings.System.NEXT_ALARM_FORMATTED.
Bug: 14589952
Change-Id: I297eeeff36d07adcda010afac183d0f5ee37dc99
Bug: 14993295
Hooks up a ConnectivityManager.NetworkActiveListener.
Previously was using 3 locks where 1 would suffice,
negligible to no performance issues b/c most of the previous locks
were nested.
Added OnNetworkActiveListener so that the ConnectivityController can kick of
tasks when it knows that the network is active.
Fixed some bugs that stopped timecontroller from executing tasks.
Requesting a retry will not add a deadline to that task. However backed-off
tasks are run as soon as they are ready, subject to their constraints.
Added receiver to listen for package removal and user removal, which will
delete any outstanding jobs for that uid.
Change-Id: I4c4523af558b927f19b8a215878fcc7198abb93f
Tasks are persisted only if the client has the RECEIVE_BOOT_COMPLETED
permission. This applies to both periodic and one-off tasks.
Write out task as xml, using PersistableBundle for the extras data.
Todo: Add persistable bundle to xml when ag/468207 is merged.
Also added BatteryController logic.
Change-Id: I23eeeb8b3bc6ba155e7fa4ec25857a68ee8b1567
bug: 12033540
Expedited was previously tracked by a redundant internal variable, ostensibly
as an optimisation. This variable could differ from the value in the bundle
depending on how the operation is initialised, which led to confusion. Now an
expedited sync will only be treated as such on its first execution.
Change-Id: Ibfc4e9e49b86c82f2364a6ef55f887705a053eb6
bug: 12033540
Expedited was previously tracked by a redundant internal variable, ostensibly
as an optimisation. This variable could differ from the value in the bundle
depending on how the operation is initialised, which led to confusion. Now an
expedited sync will only be treated as such on its first execution.
Change-Id: I9979102317aecbe8bc53a36381d4b2782ac131be
Conflicts:
services/core/java/com/android/server/content/SyncOperation.java
services/core/java/com/android/server/content/SyncQueue.java
ProfileOwners, like DeviceOwners, are Device Admins that have
additional priviledges. ProfileOwners however are scoped per
user.
Change-Id: I1e22c85878e0672121e6ebbe97fca38591f992b2
This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.
1. Add flags and scope to the class and update the unit test.
Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
Since most callers don't know about flags and scope, provide
constructors that default the flags to zero and determine the
scope from the address. Addresses notified by the kernel will
have these properly set. Make multicast addresses invalid.
Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
address and prefix information between two LinkAddress
objects. This is necessary because an interface can't have
two addresses with the same address/prefix but different
flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
to identify existing addresses to add/remove using
isSameAddressAs instead of implicit equals(). Specifically:
- If addLinkAddress is called with an address that is already
present, the existing address's flags and scope are updated.
This allows, for example, an address on an interface to go
from preferred to deprecated when it expires, without it
having to be removed and re-added.
- If removeLinkAddress is called with an address that is
present but with different flags, it deletes that address
instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
notification methods to take just a LinkAddress instead of
LinkAddress, flags, and scope. While I'm at it, change the
order of the arguments for consistency with the other
functions in the interface.
Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e
Currently address{Updated,Removed} pass in the address as a
string such as "fe80::1/64". Use LinkAddresses instead, since
that's what it is.
This makes the code more robust in the unlikely case that netd
passes in an invalid string. In the future we can move flags and
scope into the LinkAddress itself and simplify the code further.
Bug: 9180552
Change-Id: I66599f9529cf421caa7676fdd0141bb110b8589e
These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.
[Cherry-pick of 416740ad4d9132005a71dc0883334e852235a18a]
Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.
Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
Bug:11064918
If the ContentResolver sync API is used with the empty ("")
string as a provider, the ContentService will throw an RTE.
This cl addresses all the entry points of the API that could
allow this, as well as adds an ifEmpty check at the point of
failure.
Also removed RTE throws from public functions(no point in
crashing the phone).
Change-Id: I57427d12a6cafb3e6d7a32ca0c10b05315b20580
On devices with Hardware RNG (HW RNG), this makes EntropyMixer
periodically (every three hours) read 512 bytes from HW RNG and mix
them into the Linux RNG.
This is done without increasing Linux RNG's entropy estimates to
avoid having to trust the quality of the HW RNG. This approach cannot
reduce the quality of the Linux RNG output, but may increase it.
Change-Id: Ifde851004301ffd41b2189151a64a0c5989c630f
netd now tracks statistics for tethered interfaces across tethering
sessions, so switch to asking for all tethering stats. (Currently
we're double-counting all tethering data, ever since it started
tracking across sessions.)
Also catch OOME to handle corrupt stats files, which we then dump to
DropBox and then start over.
Bug: 5868832, 9796109
Change-Id: I2eb2a1bf01b993dd198597d770fe0e022466c6b9
For now, this only tests network observers. It works by starting
NetworkManagementService with a fake netd socket, feeding it
inputs, and seeing if the appropriate observer methods are
called.
Bug: 10232006
Change-Id: I827681575642a4ee13ae48b81272521544b676bd
Support pending ops by producing badly formed xml.
fixed bug that stopped alarm manager from updating if the
next alarm time is in the past.
Use new AlarmManager API for old AM behaviour - to set
exact alarms.
Change-Id: I57090f9c7155996298be7ec968a88f17ac1938a7