am skip reason: Change-Id Ia938502d2443f5a6de6a3cabdb7ce1d41d3ff6d1 with SHA-1 cfa2284cd8 is in history
Change-Id: I6213f57e1417533b12b63be352d4937d561fad1f
am skip reason: Change-Id If3b9906c75033f51bd35fcf054154125719ea958 with SHA-1 8e5ca5cd7e is in history
Change-Id: If5a183ec39456825c497b18cb910f6b57e243f11
Sets up a new test suite in frameworks/base/apex/statsd. Creates a JNI
wrapper around libstatspull so that configs can be added and removed
from java, but the pulls happen in native code.
Bug: 145310729
Test: atest LibStatsPullTests
Change-Id: Ib3df74cac12f4276892be3f4a060a4a9dd120464
Seperated out the state part from contentDescription. Also changed the
tile on/off states from mocking switch to unavailable/on/off state
description based on State.state. During testing, I removed event
merging (including source node merging) for state and content change
events. Use event text for state description changed part will be in a
seperate CL.
Test: tested on the quick settings tiles for focusing and state change
evnets. With the event merging removed, the state change is announced
when the focus keeps on the tile. Before my change, content change is
not announced when the focus keeps on the tile due to source node change
in event merging.
Fix: 148473520
Change-Id: I5b6aee6f0982cf4e0a3962fbe15239314f3a2de4
Use the correct AudioAttributes method to query which volume stream
is associated with audio attributes.
Prevent AudioProductStrategy from returning invalid volume stream
types / stream types unknown for volume control
Bug: 148263626
Test: see bug
Change-Id: I64d01286815474d5e23fbe7e57c58bfdf57ebd3e
Update to our system for high-volume logging with the goal of having any
logging call result in *zero* allocations, not even strings.
The core pieces are LogBuffer and LogMessage. LogBuffer is a simple
ring buffer that holds instances of LogMessage. LogMessages store
data related the thing they're logging, but in a generic way that
allows them to be reused across ALL log types.
In order to log a message, the caller must supply two things:
- The _initializer_, a function that stores data on a LogMessage
- The _printer_, a function that converts a LogMessage containing the
stored data into a human-readable string.
When a message is logged, the initializer is called on a newly-obtained
instance of LogMessage. The printer is also stored on the message and
the message itself is inserted into the buffer. Later, when the message
needs to be dumped, the printer is called on the message instance to
create a human-readable string.
Using features of Kotlin, we can inline calls to the initializer so the
function is effectively erased. The printers cannot be erased (we need
to maintain a reference to them) and so each printer requires a (small)
classdef. However, because the printers are stateless, we only ever need
one instance copy per printer.
Advantages of this system:
- Lightweight: no-allocation logging (still some overhead, but it's
very slight).
- Ease of use: easy to add new logs. Log-generating code is easy to
read.
- Closer match to logcat: system uses TAG and logcat levels (VERBOSE,
etc)
- Finer-grained control over debugging: Can control which tags and/or
buffers log to logcat and at what logging level (VERBOSE, etc).
Disadvantages:
- Each log type requires the creation of an anonymous class def (the
printer function). With a ton of such class defs, our code might get
bloated (it's unlikely for us to reach this point, however).
- Easy to accidentally write a log message that triggers an allocation
(if your printer function captures any outside scope, such as one of the
original log parameters, then the system will need to instantiate a new
instance of the printer function for each call instead of reusing a
singleton static instance).
Test: manual
Change-Id: I2c7c272cda4ce61d56427ab1d6eb270d9365b325
It's not always safe to flip the channel setting because the notif might
be allowed to bubble, but is not currently displayed as bubble. In that
case the button would say "show as bubble" but the code would flip the
setting to false, doing the opposite of the user action.
This CL specifies actions for bubble / unbubble and only commits the
channel change if the setting actually changed.
Test: atest NotificationConversationInfo
Fixes: 148425750
Bug: 148424396
Change-Id: I6f561cf388d2595df53ac41b9a183f6c50976d21
- Store pending control request when request needs to go over IME
- Abort pending control request when losing control
- Use timeout in case we haven't heard back from IME
Test: InsetsControllerTest
Bug: 111084606
Change-Id: Icb6a9d8ad9134f8cb836e15c09c2b2295219fc15