imageValidationThrowOrWarning() logs the error as a warning if device
bootloader is unlocked, else re-throw the error.
Device lock state is queried via PersistentDataBlockManager service.
Bug: 128892201
Test: adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
--el KEY_USERDATA_SIZE 8192 \
-d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip \
--es ${IMAGE_KEY}
Test: Observe the logcat
Change-Id: I895e70d90624afda2bf7cd3b34ea8d21a1702163
... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()
Bug: 141745510
Test: atest CtsWindowManagerDeviceTestCases:PresentationTest
Change-Id: I2aaab1903dee54190338f7b6e49888aa51437108
UsageStats will return obfuscated NOTIFICATION_SEEN or
NOTIFICATION_INTERRUPTION events to callers of #queryEvents
and #queryEventsForUser if they don't hold the MANAGE_NOTIFICATIONS
permission.
Additionaly, refactor the query API in UsageStats to take in flags as
defined in UsageEvents to make future obfuscation/visibility parameters
cleaner.
Also, add the MANAGE_NOTIFICATIONS permission to shell for CTS test.
Bug: 144724524
Test: atest android.app.usage.cts.UsageStatsTest
Test: atest com.android.server.people.data.UsageStatsQueryHelperTest
Test: atest android.content.pm.cts.shortcutmanager.ShortcutManagerUsageTest
Change-Id: I118de7e589ac8dd5924d3740c70903fa484b79b5
This is required for the provisioning cross-profile consent screen which
is used to take some apps off INTERACT_ACROSS_USERS.
Hidden API CrossProfileApps#setInteractAcrossProfilesAppOp is changed
from requiring the broad app-op permissions to requiring
CONFIGURE_INTERACT_ACROSS_PROFILES. It then clears identity before
calling into AppOpsManager. For convenience, we also allow apps (such as
Settings) with the broader app-op permissions to continue to call this
method; in that case, we simply don't clear the identity and let
AppOpsManager check the permissions (so we allow AppOpsManager to set
the requirements if you don't have the new
CONFIGURE_INTERACT_ACROSS_PROFILES).
The CL also adds 'withCleanCallingIdentity' support to
CrossProfileAppsServiceImpl and moves over existing calls.
Bug: 136249261
Bug: 140728653
Test: atest --verbose com.android.managedprovisioning.provisioning.crossprofile.CrossProfileConsentActivityRoboTest
Change-Id: Ibd304563dd1ef5f16784e3502be5ef1ec4675b63
- READ_COMPAT_CHANGE_CONFIG is required to read the current state of the
config
- LOG_COMPAT_CHANGE is required to log the status of a compat change for
a package and/or uid to statsd
- OVERRIDE_COMPAT_CHANGE_CONFIG is required to add overrides
The permissions must be signature|privileged, as there are already
examples of code which this would not be sufficient (e.g.
MediaProvider).
This is a re-landing of https://r.android.com/1209240, which was
reverted due to http://b/142942524. The actual fix was done in
http://ag/10234812.
Bug: 142650523
Test: atest PlatformCompatTest
Test: atest PlatformCompatPermissionsTest
Change-Id: Ie9429477c9a1725b5cb67756787bf742038e5d2b
Renames PhoneTime[|Zone]Suggestion to TelephonyTime[|Zone]Suggestion.
Makes changes to generally avoid PHONE and use SLOT_INDEX or telephony
as appropriate for the usage. Removes telephony / phone from a few
variable names where it doesn't add value.
This commit also renames some remaining phoneId instances to slotIndex
which were missed when that rename happened.
Bug: 148842434
Test: treehugger
Change-Id: I4302e68082b802b75b53c02a9c9b1ae39dff6085
Area info cell broadcast messages are not handled
by cell broadcast receiver anymore. Instead, they will
be processed in cell broadcast service. Privileged apps
that are interested in getting the information will need
to get it directly from cell broadcast service.
Note this is only enabled for certain countries and carriers.
Test: Manual
Bug: 141318859
Bug: 141425194
Merged-In: I2245c39f679d0ad94c9a1325edc553f362fdce7c
Change-Id: I2245c39f679d0ad94c9a1325edc553f362fdce7c
(cherry picked from commit 80e432043582a14dc9d7382ed81b0699b9a01e49)
Area info cell broadcast messages are not handled
by cell broadcast receiver anymore. Instead, they will
be processed in cell broadcast service. Privileged apps
that are interested in getting the information will need
to get it directly from cell broadcast service.
Note this is only enabled for certain countries and carriers.
Test: Manual
Bug: 141318859
Bug: 141425194
Change-Id: I2245c39f679d0ad94c9a1325edc553f362fdce7c
Shell already can reboot a device (via `adb reboot` command). This
change allows shell to also trigger a reboot logic inside the
system_server.
Additionally, it allows to CTS test PowerManager.reboot API.
Test: adb shell svc reboot
Change-Id: I4545c4f3587fee2840a00648c569f75bb57501fc
Merged-In: I4545c4f3587fee2840a00648c569f75bb57501fc
Shell already can reboot a device (via `adb reboot` command). This
change allows shell to also trigger a reboot logic inside the
system_server.
Additionally, it allows to CTS test PowerManager.reboot API.
Test: adb shell svc reboot
Change-Id: I4545c4f3587fee2840a00648c569f75bb57501fc
Introduces the concept of a DisplayArea, corresponding to an area
on a logical display within which content can be placed.
DisplayAreas can contain more DisplayAreas, WindowTokens and ActivityStacks.
A future CL will expose an API which allows leashing a DisplayArea to transform
all its content simultaneously.
DisplayAreas are managed by a DisplayAreaPolicy, which creates and places the
areas, and decides which area a container is placed in.
This CL introduces the concept, but applies a no-op policy that maintains the
current orderings and does not apply any overrides.
Future work that remains:
- Writing the feature policies
- Adjusting Display & DisplayMetrics if the area is constraining its children.
- Moving the policy into an product-adjustable component
Bug: 147406652
Test: atest WmTests
Change-Id: If6fb1bba3b65ebf7ac9fdf99408c54bf77f602c9
Animation type is specified when starting a surface animation,
and is passed as an argument of a callback which is triggered
when a surface animation finishes.
Bug: 131661052
Bug: 142617871
Test: atest DimmerTests SurfaceAnimatorTest
Change-Id: I89c671cf49b049dd241b874096d8ef245deb547d
- MANAGE_USERS is required for getting current user
- ACTIVITY_EMBEDDING is required for launching app in ActivityView
Bug: 137197603
Test: manual test: build and flash
Change-Id: I80a2d39a825c2bc9d52572a434c2ccf32408ccff
App window requests IME, IME would be shown when showSoftInput() is
called from currently IME target.
This CL handles cases when IME target changes after showSoftInput was called
from the initial window and new window has received focus within same
app/task.
This CL also reports current control target on every startInput, which
sets current control target in WM.
Bug: 111084606
Test: atest CtsInputMethodTestCases
1. Open files app
2. Tap editor and make sure IME shows.
3. Open bubbles app.
4. Create a bubble and try typing in it.
5. verify IME shows as expected.
Change-Id: I9e8984b7e5aa989a53ece9e2576393f795b9ef94
Whitelisted telephony broadcasts using the intent background flag.
Ensured that each broadcast was protected manually through cts test below.
Bug: 148181747
Test: Switched on ActivityManagerDebugConfig.DEBUG_BACKGROUND_CHECK for SIM_STATE_CHANGED
Test: android.telephony.cts.TelephonyProtectedBroadcastsTest
Change-Id: Id280fc2128b84dda2a8184dfa32ecc5b8f787afb
UsageStats will not return SHORTCUT_INVOCATION events to callers
of #queryEvents and #queryEventsForUser if they don't have visibility,
as defined by ShortcutService#hasShortcutHostPermission.
Also, add ACCESS_SHORTCUT permission to shell for CTS test and add the
ShortcutManagerUsageTest to postsubmit.
Bug: 145549490
Test: atest android.app.usage.cts.UsageStatsTest
Test: atest android.content.pm.cts.shortcutmanager.ShortcutManagerUsageTest
Change-Id: I2a69f061c35c31035a5d0381ab2f42029ec4fffc
This is required for ambient display tests
Bug: 147874708
Test: Run newly added ambient display tests.
Merged-In: I61c28e15c4e5c3d0ffee4137ecb86e33f7e8f64d
Change-Id: I26ab1cd48816ddb3aa8b30708726a3e1a3a20b9a
android.permission.PACKAGE_USAGE_STATS is the minimal required
permission to get app usage stats, as confirmed by the API author
and usage stats is the only place giving us historical app-usage information.
Test: reduce thresholds and test with a toy app
Change-Id: Id8767cab93802d3fc90dc32a93ffb20a53f45ad9
After adding MANAGE_EXTERNAL_STORAGE permission to several apps on the
system partition, we should whitelist them
Test: m
Bug: 144914977
Change-Id: Ia4401904e23193b8628071d6a2a6d789faf0ece5