Sound trigger calls into audio policy manager (APM) for the sake of
allocating and releasing audio sessions.
APM calls into sound trigger for the sake of notifying it of
external capture session start/end.
Both calls are essentially synchronous, i.e. required for the
completion of the operations that trigger them.
Since both services use coarse locks to protect their state, if both
those calls happen concurrently, a deadlock would result.
The fix is to invoke
AudioPolicyManager::{acquire/release}SoundTriggerSession()
outside of the critical section of SoundTriggerModule.
Bug: 148691451
Change-Id: I157367b9e43963e37344958e1647e9f6c29d5e6e
The kernel no longer enforces XOM layouts, and the build system no
longer generates XOM binaries. As a result, the zygote code to mark XOM
sections of memory readable for apps with targetSdkVersion<Q.
Bug: 147300048
Test: m -j
Change-Id: I0abb0abb54f8f5a538da9194a900e6a64e574bfe
Merged-In: I0abb0abb54f8f5a538da9194a900e6a64e574bfe
Move the logic to startProcessLocked so that it can use app info/flags.
Bug: 135754954
Test: NFC
Change-Id: I50cfb8d0ec4ce1f79dec56b8bef09752a1b37490
Merged-In: Ief86185c6866640700e2548259df9ba1fb617e4d
(cherry picked from commit 5750d3b153)
Add TIF API for getting encoding in order for TV App to use it.
Test: m framework update-api
Bug: 112835103
Change-Id: I975dda20f129cb05d55eb59a1a60bcdb22b2533e
Sampling is done in cycles where length of single cycle is
configurable server side.
During one sampling cycle only one stack trace / message is reported.
Two sampling strategies are used in this CL.
1. Sampling uniformly packages and appops, and waiting only for
messages coming from sampled package (all other packages are
silenced to presereve system resources). All appops are recorded,
but sampled appop has preference and replaces any previous stack
trace / message. This strategy is created to focus on all packages
and all apps uniformly.
2. Creating list of rarely used packages - packages which were not
using any dangerous permissions for more than a week. Any newly
installed app is automatically added to this list, including apps
which were updated. Whenever message is received for rarely used
package, there is 50% probability that this message will replace
whatever is being sampled in current sampling cycle. This strategy
is created to focus on newly installed apps, on apps which are used
infrequently and on apps which use dangerous permissions infrequently.
Bug:136134050
Test: atest android.app.appops.cts.RuntimeMessageCollectionTest
Change-Id: I3109b38bf0482481acf945d5441a26bfe704c9b5
Log metrics for the new app-op permission INTERACT_ACROSS_PROFILES and
each of the new app-facing and DPC-facing APIs where possible.
Simple getters do not have logging. Setters have logging but only when
the value has changed.
I always moved the logging into a separate private method. This is done
to keep the logging code from overpowering the actual logic in the
corresponding methods, particularly when there are conditions attached
to when we want to log.
There are also a few minor clean-ups in CrossProfileAppsServiceImpl.
Bug: 136249261
Bug: 149370554
Bug: 149318411
Bug: 149370875
Bug: 149370515
Test: atest com.android.cts.devicepolicy.CrossProfileAppsHostSideTest
Test: atest
com.android.cts.devicepolicy.CrossProfileAppsPermissionHostSideTest
Test: atest com.android.cts.devicepolicy.ManagedProfileCrossProfileTest
Test: atest com.android.cts.devicepolicy.ManagedProfileTest
Change-Id: Ibf2899f9b9974387ed1ba62fd02ece54a4c1564b
Use PropertyInvalidatedCache to save on redundant
binder calls for isPowerSaveMode and isInteractive.
Bug: 140788621
Test: atest BatterySaverTest
Test: atest PowerManagerTest
Change-Id: I849a48eb7c901d3178097d33dce01630dbb78267
Ran into some visual issues with it, reverting to old treatment for now.
Bug: 144022299
Test: Visual verification
Change-Id: Id9370b5cef8dbc032791d36192ddbe285a790a9e
Use the early TaskOrganizer concepts to implement Split-screen
in system-ui.
This includes changes to both FW and SystemUI. The changes to
FW involve removing the use of split-screen specific behavior (like
minimize dock and direct ordering) and also reducing things that
care about primary vs secondary. It also changed ActivityStack
to inherit bounds from parent** when in split-mode so that sysui
only needs to manipulate the tile and/or reparent stacks to
effect their geometry.
This means a lot of layout logic moves to SystemUI. The bulk of
the work done in ActivityStack which is split-screen related is
moved into SplitDisplayLayout. This basically takes a snapshot of
display configuration and manages the sizes of splits and their
snap targets.
Intermediate dragging of divider bar now only moves root task leashes
around rather than talking to WM. This includes position as well
as crop (which used to be stack crop). Once the user releases
the divider bar, it will calculate (based on snaps) the new
root task sizes and update their configurations via
WindowContainerTransaction. Because the interim updates are only
on the leashes, no configuration updates occur until the end.
Entering/Exiting split-mode is now handled by SplitScreentaskOrganizer#
onTaskInfoChanged. This is effectively a state-machine that
looks at the current split task membership vs. previous and then decides
when to move things into/out-of split tasks and how to coordinate with the
DividerView.
Minimized dock is relegated to a purely system-ui concept. To
accomplish this, **the home *stack* is set to the minimizedhomebounds
by systemui. This means that it's relative position to its parent is
negative! This allows us to leave the split sizes constant, have
their children inherit the "actual" split sizes, but keep the
home stack unchanging in its minimized size. We just adjust the crop
negative to reveal it.
IME handling is done through the same mechanism as app-driven IME
animation... only Divider receives the control instead of the app.
This allows synchronized animation of split tasks with IME. To
account for insets, though, when IME is opened, the bottom stack
will be repositioned in WM.
Bug: 133381284
Test: Manual, use split-screen, rotate device, launch unresizable
apps in split, use divider snap to close/maximize apps, etc.
Change-Id: I103f68030a170e2fd3d8f2125b81cf33af412793
Make methods that read/write mBugreportInfos lock protected and add
"Locked" suffix to the method name. BugreportInfo objects are read/write
in different functions, to keep the code clean, add lock protected
getter/setter methods.
Bug: 142217059
Test: Takes interactive/full bugreports as expected
Change-Id: Iaadd6c9dce5009e40dd015e3b62bcd6e36966e00
This makes it easier to fix the tests after adding new dependencies to the BubbleController constructor.
Test: atest SystemUITests
Change-Id: Iea67826f6dd1e994dca9d6425dd85a4db2cabaf2
The kernel no longer enforces XOM layouts, and the build system no
longer generates XOM binaries. As a result, the zygote code to mark XOM
sections of memory readable for apps with targetSdkVersion<Q.
Bug: 147300048
Test: m -j
Change-Id: I0abb0abb54f8f5a538da9194a900e6a64e574bfe
Add a touch handler to the ScrollView container to catch touches
outside of the power, wallet, and controls UIs.
Adjust MultiListLayout and GloblActionsLayout to allow a very
simple row-based layout for the new power menu design, instead
of having to use ListGridLayout.
Extract the AirplaneMode action into its own class, instead of
defining it inline.
Bump emergency to the top of the list of global actions to
ensure it's top-priority and positioned correctly for global
actions layouts without a separated view.
Fixes: 149299063
Test: Manual. Enable quick controls -- tapping beneath the controls
area should dismiss the GlobalActionsDialog. Dismissing should
still work in either the grid (no Controls) or column (no wallet
or controls) layouts. Tapping actions, swiping cards in Quick
Access Wallet, and interacting with control items should still
work as expected.
Change-Id: Iad32045837edb0be6c9f36ec5d663483bda6f5de
If a launching activity starts another activity before it
finishes drawing, because it becomes invisible, it is dropped
from active transition info. The waiting result should not use
the intermediate state as the launch is completed.
Bug: 123355661
Bug: 149326995
Test: atest ActivityMetricsLoggerTests#testConsecutiveLaunch
Change-Id: I9a5776cc7895a8d62ca28700c18efa4fd8b7c33d
This has been split out from the CL adding the metrics to unblock other
CLs.
Bug: 136249261
Bug: 149370554
Bug: 149318411
Bug: 149370875
Bug: 149370515
Test: none required as just a proto file change
Change-Id: I1c1b129449faed8f1ef43b0798e538b6637f188a
Ignore theme colors and use dark colors by default at all times for
controls. Apply latest color changes to match design.
Bug: 149485215
Test: visual
Change-Id: I179b9b3a4469f7373f7a2d5174d435fdda1b6ac0
This is exactly equivalent to the previous version (though a bit
more expensive) but is useful for followup changes. See [NS D03]
to see a sample of how this will be used.
Bug: 113554781
Test: FrameworksNetTests
Change-Id: I39f3c248bd2f23f7b22bd89d2e1e031653fe9ddb
They don't get moved, so instead of deleting a redundant copy we are
deleting the only copy.
Bug: 149200535
Test: Manual. After repro steps in bug app is moved, profiles are not
deleted.
Change-Id: Id6af14ca4611a668135330565fce976cab7610ef
In Q, a manifest flag requestLegacyExternalStorage was
introduced to grant legacy apps full access to external storage.
This flag was sticky across app updates so an app already installed on
a users device would typically always have the legacy_storage appop
even if it received an update to stop requesting the manifest flag.
With the R scoped storage model, we would like to break this
stickiness for 2 reasons:
1. Increase the impact of the storage restrictions
2. Ease testing. Because of the stickyness it is difficult
for apps targeting R to actually lose their legacy_storage appop
Unfortunately, we have to still provide a path for apps who care about
migirating their data on external storage from unreachable locations
on R devices. The canonical example is an app with 3 versions:
(1) Qcannot_migrate, (2) Qcan_migrate, (3) Rcannot_migrate
An update from: 1 -> 2 -> 3 will be fine because (2) will migrate the
apps data. However, apps can very well update from (1) - (3) thereby
losing access to their data in unreachable storage locations on R devices.
To facilitate this migration, apps (targeting R) can explicitly
request the preserveLegacyExternalStorage manifest flag. This will
ensure that if they get updated on a device with a previous version of
their app with the legacy_storage appop, they'll keep legacy_storage
status. Of course, fresh installs (of target R apps) will not have the
legacy_storage appop even if they have requestLegacyExternalStorage
and preserveLegacyExternalStorage flags.
By default, this new flag will be false, legacy status will *not* be
preserved (the legacy_storage appop will *not* be sticky). But apps
that care about migrating data can set the flag to true and
will preserve whatever legacy status they had on an existing install.
Test: atest RestrictedPermissionsTest
Test: atest RestrictedStoragePermissionSharedUidTest
Bug: 148944140
Change-Id: Ifd3410ed1a60f4c0e8414fce904139b539e13ad8
Parsed the manifest and included in the relevant PackageManager data
structures.
Test: atest RestrictedPermissionsTest
Test: atest RestrictedStoragePermissionSharedUidTest
Bug: 148944140
Change-Id: I785e707aa4c879ea163c1611c1693fea74f4ac82
This attribute will default to false and does nothing in the false
state.
In the true state, it will allow an updating app preserve any legacy
storage access from the existing installed version on device.
Test: atest RestrictedPermissionsTest
Test: atest RestrictedStoragePermissionSharedUidTest
Bug: 148944140
Change-Id: Id5b6d7aadd9d9844c8bd1164087a9e093481e234
Allow the background image to be changed. Use the i18n 'Loading...'
text.
Bug: 148207527
Test: manual, home mock apk for camera
Change-Id: I705648c948aaf34ab624ded4fdbef415791c2481
* Introduced logic that allows the profile owner of an
organization-owned device (COPE PO) to set the restriction
KEYGUARD_DISABLE_SECURE_NOTIFICATIONS on the parent profile.
Bug: 149007069
Test: Manual testing with TestDPC
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testSetKeyguardDisabledFeatures
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyguardDisabledFeatures
atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetKeyguardDisabledFeatures
atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyguardDisabledFeaturesLogged
Change-Id: I06d8985471bdae3386ba68d67467f136668a4ca4