When requesting historical values with time ranges, always include
full values for buckets that span current time. (It doesn't make
sense to interpolate partial data.) Move getTotalData() to return
full Entry objects to prepare for packet counts.
Bug: 4691901
Change-Id: I717bd721be9f1d4a47c4121e46e07a56cb15bbf1
Instead of exposing internal storage details, offer getValues()
accessor which populates values into a recycled structure.
Change-Id: I5228d7099a8f61b2018a435a813435a67dae49b4
Previously, calling cancel() on an Animator would cause onAnimationCancel
events to be sent to all listeners. This was confusing for listeners
that were keying off this event for performing other actions, when the original
animator wasn't truly canceled (because it wasn't even running, or had already
been canceled earlier). This change hinges listener notification on
the animator actually running; no events are sent otherwise.
Also added the first set of Animator tests to verify that this behavior
is correct.
Change-Id: I81ab56559b5c0343c8dc7880e1c8235f3020975b
When an iface goes inactive, xt_qtaguid maintains historical counters
instead of discarding. Now reading and returning those values in
NetworkManagementService summary calls. Tests to verify stats are
returned.
Modify NetworkStats to include rxPackets and txPackets values, and
move to Entry to eventually hide internal storage details.
Bug: 4984539
Change-Id: I1ba0bb5580c62e946d9dff2cc2a6f64aff403efc
- threshold set to 60% (using a constant)
- fix also one issue during layout direction resolution (parent could be null so delay resolution
up to when parent is no more null)
Change-Id: I65f24a297aac6bc0d5d482ee31b55db0b201e5bf
- use ViewGroup inheritance if defined
- use different heuristics (inherit, firstStrong, anyRtl, ltr, rtl)
- add more unit tests
Change-Id: Ic1325aa7d9e4689b181e0a2d08b7dd7fb3f0dbeb
1. AccessibilityInjectorTest changes the key bindings and when done
restores the defatult ones. The restoreation was not working.
bug:4905620
Change-Id: I812bad0b748637ded0ce69ace12517511f62f726
This adds a Java-language implementation of EventRecurrence.parse(),
to make it easier to relocate it for the benefit of unbundled
Calendar.
Differences from the native version:
- enforces that FREQ appears first
- allows (but ignores) X-* parts
- improved validation on various values
- error messages are more specific
- enforces that only one of UNTIL and COUNT may be present [disabled]
- allows lower-case property and enumeration values [disabled]
As part of the transition process, both versions of the parser are
called on every request, and the results are compared. If the results
are different a warning message is logged.
An unnecessary constructor was removed.
This also this moves some EventRecurrence tests out of CalendarProvider,
into coretests, and adds a simple parse test with the examples from
the RFC.
Bug 4575374
Change-Id: If737ed1272fda65c93363d87b2da12b85e644f5b
Teach NMS to read qtaguid stats from kernel, but fall back to older
stats when kernel doesn't support. Add "tags" to NetworkStats entries
to support qtaguid. To work around double-reporting bug, subtract
tagged stats from TAG_NONE entry.
Flesh out stronger NetworkTemplate. All NetworkStatsService requests
now require a template, and moved matching logic into template.
Record UID stats keyed on complete NetworkIdentitySet definition,
similar to how interface stats are stored. Since previous UID stats
didn't have iface breakdown, discard during file format upgrade.
Change-Id: I0447b5e7d205d73d28e71c889c568e536e91b8e4
Those files are moved to ContactsProvider package.
Must be after If786dd286dab47ca1b2ccab38c5fa43ae390c0f7
Bug: 4645142
Change-Id: I774426347e8331fc1c203d5d8e6887e83baffc9f
- now relying on ICU.getScript() and ICU.addLikelySubtags() for getting the locale script
- clean unit tests imports
Change-Id: Icdc45fa78490d1e2dde0e83bca0feea8aa205cdf
The layoutlib is used in the SDK which might not have a default Locale,
so the language string will be some kind of junk. This causes a crash in
the new LocaleUtils
Change-Id: I24e5115c56e39d394dcf89ec6cff609525b3c73e
Move connect / disconnect / set and get priority
functions down the interface as they are not generic enough
for all profiles.
Change-Id: I2656e1bdbc8046c53bb0dfbd9172f5f10b57aa7d
- update Callback2 interface
- update Gravity.getAbsoluteGravity() and Gravity.apply() to be more generic
by changing "boolean isRtl" parameter to "int layoutDirection"
- fix BiDiTests for RTL FrameLayout
Change-Id: I97bb456c22d5fd3ecb34f08564ce4dbed37e7459
NetworkStats now grows in place with arraycopy() instead of callers
needing to know record count a priori. Better growth calculation for
both NetworkStats and NetworkStatsHistory; 50% each time. Better
estimates of buckets needed in calling services.
Change-Id: I3adbffa0b7407612cc6349d9135a8b4eb63cd440
1. Added a new event type for notifying client accessibilitiy
services for changes in the layout. The event is fired at
most once for a given time frame and is delivered to clients
only if it originates from the window that can be interrogated.
2. Exposed the findByText functionality in AccessibilityNodeInfo.
This is very useful for an accessibility service since it allows
searching for something the user knows is on the screen thus
avoiding touch exploring the content. Touch exploring is
excellent for learning the apps but knowing them search is
much faster.
3. Fixed a bug causing an accessibiliby service not to receive
the event source in case of more than one service is registered
and one of them does not have paermission to interrogate the window.
The same event was dispatched to multiple services but if one
of them does not have interrogation permission the event is
modified to remove the source causing subsequent serivices not
to get the later.
4. Moved the getSource setSource methods to AccessibilityRecord
instead in AccessibilityEvent.
5. Hiden some protected members in AccessibilityRecod which should
not be made public since getters exist.
6. Added the View absolute coordinates in the screen to AccessibilityNodeInfo.
This is needed for fast computation of relative positions of
views from accessibility - common use case for the later.
7. Fixed a couple of marshalling bugs.
8. Added a test for the object contract of AccessibilityNodeInfo.
Change-Id: Id9dc50c33aff441e4c93d25ea316c9bbc4bd7a35
- rename layoutDirection to textLayoutDirection
- rename constants for being clear that they cannot be used (work in progress)
- fix a few issues concerning default switch case and relation to Locale
Change-Id: Icfe9a9b5c0d1c0e28e5a893549b437fc4fa5df82
1. The Interaction connection checks if the ViewAncestor
is valid and posts a message to be processed on the UI
thread. The code in the UI thread did not check if
the mView was valid. Added this check.
2. Added a faster sync mechanism in the test for
getting the source of the last access event.
Change-Id: I9982b6592f5f44a68a67df40f37c063a3ba62993
Implements read/write of network stats using AtomicFile, along with
magic number and versioning. Stores in "/data/system/netstats.bin"
for now. Tests to verify that stats are persisted across a simulated
reboot, and to verify that TEMPLATE_WIFI is working.
Fixed bug where kernel counters rolling backwards would cause negative
stats to be recorded; now we clamp deltas at 0.
Change-Id: I53bce26fc8fd3f4ab1e34ce135d302edfa34db34
When given a start/end range, interpolate between buckets to return
the total network usage. Used to summarize detailed UID stats. Method
to combine NetworkStatsHistory regardless of bucket size. Used to
combine all histories matching a template.
Added tests for both methods.
Change-Id: Ia463910c0ecf7cf08dcf97c658ad99742bd6b882
Instead of deriving network identity based on raw subsystem broadcasts,
listen for updates from ConnectivityService. Added atomic view of all
active NetworkState, and build map from "iface" to NetworkIdentity set
for stats tracking.
To avoid exposing internal complexity, INetworkStatsService calls use
general templates. Added TelephonyManager mapping to classify network
types using broad labels like "3G" or "4G", used to drive templates.
Cleaned up Objects and Preconditions.
Change-Id: I1d4c1403f0503bc3635a59bb378841ba42239a91
1. Views are represented as AccessibilityNodeInfos to AccessibilityServices.
2. An accessibility service receives AccessibilityEvents and can ask
for its source and gets an AccessibilityNodeInfo which can be used
to get its parent and children infos and so on.
3. AccessibilityNodeInfo contains some attributes and actions that
can be performed on the source.
4. AccessibilityService can request the system to preform an action
on the source of an AccessibilityNodeInfo.
5. ViewAncestor provides an interaction connection to the
AccessibiltyManagerService and an accessibility service uses
its connection to the latter to interact with screen content.
6. AccessibilityService can interact ONLY with the focused window
and all calls are routed through the AccessibilityManagerService
which imposes security.
7. Hidden APIs on AccessibilityService can find AccessibilityNodeInfos
based on some criteria. These API go through the AccessibilityManagerServcie
for security check.
8. Some actions are hidden and are exposes only to eng builds for UI testing.
Change-Id: Ie34fa4219f350eb3f4f6f9f45b24f709bd98783c
Periodically records delta network traffic into historical buckets to
support other services, such NetworkPolicyManager and Settings UI.
Introduces NetworkStatsHistory structure which contains sparse, uniform
buckets of data usage defined by timestamps. Service periodically
polls NetworkStats and records changes into buckets. It only persists
to disk when substantial changes have occured. Current parameters
create 4 buckets each day, and persist for 90 days, resulting in about
8kB of data per network.
Only records stats for "well known" network interfaces that have been
claimed by Telephony or Wi-Fi subsystems. Historical stats are also
keyed off identity (such as IMSI) to support SIM swapping.
Change-Id: Ia27d1289556a2bf9545fbc4f3b789425a01be53a