Add the page fragmentation data to the current protobuf.
Also fix bugs in how it was being collected... the data in the kernel
didn't match what it was collecting (it was combining node and zone
together in a zone int... but node is an int, zone is a separate
string).
Example new output:
vailable pages by page size:
Node 0 Zone DMA Unmovable 0 1 1 1 0 1 1 0 0 0 0
Node 0 Zone DMA Reclaimable 1 1 0 1 1 1 1 1 1 0 0
Node 0 Zone DMA Movable 1 1 0 0 1 0 1 0 1 1 291
Node 0 Zone DMA CMA 1 1 0 0 0 1 1 1 1 1 35
Node 0 Zone DMA Reserve 0 0 0 0 0 0 0 0 0 0 1
Node 0 Zone DMA Isolate 0 0 0 0 0 0 0 0 0 0 0
Node 0 Zone Normal Unmovable 1 9 3 2 1 0 1 0 1 0 0
Node 0 Zone Normal Reclaimable 0 15 3 3 1 0 1 0 1 0 0
Node 0 Zone Normal Movable 0 1 1 1 0 0 1 1 0 1 338
Node 0 Zone Normal CMA 0 0 0 0 0 0 0 0 0 0 0
Node 0 Zone Normal Reserve 0 0 0 0 0 0 0 0 0 0 2
Node 0 Zone Normal Isolate 0 0 0 0 0 0 0 0 0 0 0
Change-Id: I029d59b8d088b20fafaea04dde766012c3d448cd
Fixes: 122854187
Test: manual
* changes:
Add launchDeviceDiscovery when devices just plugged into the current device or the current device just conneted to a TV.
Fix pathToPort logic in HdmiControlService
Update the power status of an existing hdmi device with TIF once receive Report Power Status or Active Source from the existing device.
Add HDMI device info into TIF once receive report Physical Address or Set Osd Name from a new device.
Change the pathToPort(int path) method in HdmiControlService to apply to not only TV device.
Modify on hotPlug logic for Audio devices
Add array and add/remove methods to track connected device info
Modify doManualPortSwitching logic in Audio System
Add HdmiSwitchClient and move isSwitch property to system ro property
Wake up device when device is in dozing but CEC power status is on.
Otherwise the handleUnbind will try to unbind from a dead service
which causes an IAE.
Bug: 117779333
Test: Killed service-app while service was bound. Save death, but not
IAE anymore
Change-Id: Iff91feaf0656a349ba38391ea9294bda49e3e61a
No need for services to think about unbinding anymore. Now the
AbstractRemoteService counts how many requests are not yet finished and
once the number of unfinished requests drops to zero, schedules an
unbind.
Bug: 117779333
Test: - Started settings which makes many calls to
PermissionControllerManager. Saw the automatic unbind to eventually
happen.
- atest CtsContentCaptureServiceTestCases (with content capture
enabled and with content capture disabled)
- atest CtsAutoFillServiceTestCases (4 tests out of WebViewActivityTest fail without and with this change)
Change-Id: Ief2f3512df5a1c55694c0c6b449079a49089bcde
* Introduces BadgedImageView / BadgeRenderer for icon & badging
-> These are both semi-temporary until I move things over to using
icon library
* Introduces "shouldShowInShade" bit on NotificationData, this is used
to indicate whether a bubble's notification should display in the
shade or not
* BubbleController uses NotificationEntryListener to annotate notifs
bubble state & add / update / remove bubbles
* Cleans up expansion / dismissing / visibility in BubbleController
General notif / dot / bubble behaviour:
* When a bubble is posted, the notification is also in the shade and
the bubble displays a 'dot' a la notification dots on the launcher
* When the bubble is opened the dot goes away and the notif goes away
* When the notif is dismissed the dot will also go away
* If the bubble is dismissed with unseen notif, we keep the notif in shade
go/bubbles-notifs-manual has more detailed behavior / my manual tests
Bug: 111236845
Test: manual (go/bubbles-notifs-manual) and atest BubbleControllerTests
Change-Id: Ie30f1666f2fc1d094772b0dc352b798279ea72de
This change is the main check in for the historical app op feature.
The idea is to store a historical data about past app op rejections,
accesses, and durations per op for any UID state indefinitely.
Keeping all operations on record is not practical as app ops are
very frequently performed. To address this we are storing aggregated
data as snapshots where we store for every UID and its packages
how many times each op was accessed, rejected, lasted as an aggregate.
To allow history scaling indefinitely we are taking a logarithmic
approach with only the most recent state stored in memory and all
preceding state stored on disk. State on disk is stored in separate
files where each preceding file, i.e. for an older period, would
cover X times longer period with X number of snapshots covering
X times longer period. Initially X is ten but can be tweaked. For
example, the first file could contain data for ten days with daily
snapshots, while the file for older period would have data
for a hundred days with snapshots every ten days, etc.
The implementation is optimized for fast history update and no impact
on system runtime performance and minimizing memory footprint. We
are lazily persisting state to disk on a dedicated thread as this is
slow. We are also reading the relevant historical files on a query
as this is very rare as opposed to state updates.
The base snapshot interval, i.e. snapshot time span, in the initial
iteration and the logarithmic step are configurable. These can be
changed dynamically and the history would be rewriten to take this
into account.
Test: atest CtsAppOpsTestCases
bug:111061782
Change-Id: I55c32c79911ba12b2ace58d2a782b8df1e6bff60
In small mode, tapping the gray are is ignored. Combined
StatusBar#showBiometricTryAgain into onBiometricAuthenticated(bool)
We now create a new BiometricDialogView object for each BiometricPrompt
authenticate call. This makes the view's lifecycle much easier to manage.
Bug: 111461540
Test: Small -> Big when error or rejected
Test: Small -> Authenticated looks good
Test: Try again button is shown when rejected
Test: Icon spacing looks good after animation
Test: Big/small state persists across configuration change
Change-Id: Id0157a7506cea9b0e7de079c43f8bd5ba3cbd8c5
This includes laying down some groundwork to make the remaining migrations
more straightforward
Bug: 110557011
Test: atest RoleManagerTest && atest SmsManagerTest
Change-Id: Ie96abd73751d10f521756c9dcdab2a5710ca2045
Some devices shouldn't render rounded corners because of graphics
limitations.
Bug: 122347746
Test: swipe up on multiple types of devices: walleye, sailfish, blueline
Change-Id: I93fcb4283ed1aa3df5569454483a8867a3bfd06b
1. This change ignores immersive mode request if the window is not in
fullscreen mode in terms of caption visibility;
2. Update caption visibility when app changes system UI visibility.
This change also consolidates the visibility logic into DecorView.
Bug: 119388201
Test: Manual test. Also test that split screen and PIP don't have
caption.
Change-Id: Ia5051d2f53455be2c21e1933b002d07b25c0b74b
For now, assume a class named <package_name>.ZygotePreload
exists, with a method named doPreload() to do the preload.
This should probably be replaced by having an entry in
the manifest.
Bug: 111434506
Test: preload called
Change-Id: Id632e46087eb5c719e6b310ffe007f76d3cbaf7d
Introduce a new range of app-zygote isolated UIDs, [90000..98999].
For each app that uses an application Zygote, allocate a range of
100 isolated UIDs. The application Zygote for an app will get a
UID out of that range, and all other children that are forked
from that zygote will get a UID from the same range.
Bug: 111434506
Test: app Zygote and its children run in the new range of
isolated UIDs (with SELinux disabled). New set of
tests for UID allocators pass.
Change-Id: I7a6883a5ddb95683932c93ea77f4e52d8f37fa4f
When an application has requested isolated services to be spawned
from an app zygote, we need to spawn the app zygote itself, and then
ask it to fork an isolated service.
The application zygote currently only creates the class loader, and
doesn't do much else. We keep track of the isolated services that
use the app zygote, and when the last isolated service goes away,
we stop the app zygote itself (after a timeout).
The app zygote itself runs with the app's UID and under the app
seccomp filter. That last one is too restricted, so this currently
only works with SELinux disabled.
Future CLs will add an application callback for preloading.
Test: start multiple isolated services with useAppZygote="true",
verify app_zygote starts, services start as a child of
app_zygote. Stopping all services stops app_zygote as well.
Bug: 111434506
Change-Id: I10ee1d4bd148c9298974d434fbc5e5eccbec16cb
With the new loader support added. The bpf map format is defined by bpf
kernel program as well. Change the netd bpf program to the new format.
Test: CtsUsageStatsTestCases
Bug: 112334572
Change-Id: I34e38e0a8cf0cca54dc52ec897771452f9d90525
This fix is a continuation for fixing 116610086
ResolverComparator identifies that it's dealing with a http/https scheme
The original behaviour was to prefer native apps that can handle that
specific URL over browser apps. This behaviour is preserved with the
exception of the Default Browser, as it will be preferred over all other
apps and will be displayed on top, then will be followed by native apps.
In addition, removed unused imports in ResolverComparator (import
ERRORs that prevented the pre-upload repo hook scripts from passing)
Bug: 116610086
Test: manually tested on device (Pixel 2XL) with multiple users
Test: atest ResolverListControllerTest
Change-Id: Ifd5da932c6f9d9cb4bf0a97985d0f9fb7bc2cb69
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.
Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.
For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.
Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.
For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
With my previous CL [1], InputMethodManagerService#setInputMethod() is
now guaranteed to be called only from IInputMethodManager and
IInputMethodPrivilegedOperations as 'adb shell ime set' no longer
directly calls this method (with null IME token).
With this CL, IInputMethodManager#setInputMethod(), which has been
kept just for null IME token rule, is finally gone. This is achieved
by letting InputMethodManager#setInputMethod() directly update
DEFAULT_INPUT_METHOD (and SELECTED_INPUT_METHOD_SUBTYPE) secure
settings if a priviledged component still relies on this undocumented
null IME token rule.
[1]: I6fd47b5cc1e7da7222774df20247a2c69a70f45b
db25df71be
Fix: 114488811
Test: atest CtsInputMethodServiceHostTestCases
Change-Id: I42dd0325b01c527009bf85566ca8ba0766b2294e
Hopefully no one has relied on this undocumented behavior that when
the caller has WRITE_SECURE_SETTINGS then null IME token is allowed in
IMM#setInputMethodAndSubtype().
Note that if the caller had WRITE_SECURE_SETTINGS they can achieve the
same goal by directly updating the following secure settings:
* Settings.Secure.DEFAULT_INPUT_METHOD
* Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE
Bug: 114488811
Test: CtsInputMethodServiceHostTestCases
Change-Id: Ic5c59299ace16778fc57a4ec2639508564f416a7
It seems that InputMethodManager#getShortcutInputMethodsAndSubtypes()
was designed to be a bit more generalized concept, but in reality it
just ended up being a convenient API that returns a single Voice IME
subtype if exists. As far as we can tell, It has never returned two
or mode pairs. It also has never returned non-voice
InputMethodSubtype.
In order to support per-profile IME mode in InputMethodManagerService
without introducing a bunch of new complexity and technical debt, this
CL re-implements IMM#getShortcutInputMethodsAndSubtypes() based on how
it has been used actually in the ecosystem.
The first thing this CL changes is that
IMM#getShortcutInputMethodsAndSubtypes() no longer takes subtype
locale into account when looking for the best voice IME subtype. This
is because InputMethodSubtype is no longer a recommended way to
represent IME languages. Ignoring subtype locale makes the
implementation much easier to understand and maintain.
The second thing this CL changes is that
IMM#getShortcutInputMethodsAndSubtypes() is now just a utility method
that is implemented in the client side on top of other well-defined
public APIs such as IMM#getEnabledInputMethodList() and
IMM#getEnabledInputMethodSubtypeList(). This means that this API
becomes per-profile IME ready for free once other public APIs become
per-profile IME ready.
[1]: Ibd0f7ef5101013569c303820a3adc9038a97356d
4e4569dab5
Bug: 120709962
Test: AOSP Keyboard still shows voice IME shortcut when the device has
one or more IMEs that expose voice InputMethodSubtype.
Change-Id: Iaf31e9f3213f4e644b64c9658f1b59d371e3c2b4
The initial implementation of AbstractPerUserService assumed the
AbstractRemoteService instances would be created in demand, because that was
the aproach used by Autofill (to minimize the time system service is bound to
the autofill service process).
But for other systems like ContentCapture, it makes more sense to keep a
permanent connection to the remote service, which is running all the time, so
this change changes the infra to allow such permanent connection (which includes
defining an idle timeout value that never unbinds).
Bug: 117779333
Test: atest CtsContentCaptureServiceTestCases CtsAutoFillServiceTestCases
Change-Id: I43386a3fddc56f1dfd6e4e55f243eaa297921123
ResolverActivity now identifies that the intent is a browsable intent,
and thus omits the Always button and replaces it with a settings button
tha can be used to configure the user's wanted behaviour.
Also prints out a message explaining that the user is giving the app
an access to open URLs from a specific host.
Bug: 116610086
Test: manually tested on device (Pixel 2XL) - will add unit test to
document behaviour
Change-Id: I81988b9a4d082bc1e6491186d39532fd283f2ede