Created a SurfaceFreezer class which lives in WindowContainer
and manages/will-manage per-container freezing (snapshots).
This replaces the one-off change transition code.
Change Transitions used to create its own temporary leash
on initialization and that leash would be replaced/cleaned-up
as soon as the animation leash was created.
Now, the SurfaceFreezer creates the animation leash immediately
and SurfaceAnimator can take a SurfaceFreezer instance when it
starts an animation. At this point it will take the leash that
was already created by the freezer and use that. This removes
the messy reparenting/cleanup.
To deal with this, though, leash callbacks into Animatable
needed an extra stage: onLeashAnimationStarting. This is called
when SurfaceAnimatior is actually starting to animate the leash.
Next, DC.mChangingApps was converted to list of WindowContainers
rather than ActivityRecords. Some of the existing change code was
cleaned up (ie. there was some visibility stuff that doesn't make
sense because changing apps are visible->visible) and some of the
Activity-specific functions were generalized. For now, there are
a couple things that use the top-activity for changing Tasks.
The result of this means that windowing-mode change transition can
now fully live at the Task level. This also should allow freezing
at any hierarchy level which enables app-freezes that don't freeze
the whole screen and potentially mixed seamless/snapshot-based
rotations.
Bug: 149490428
Test: existing tests pass. Manually open app in freeform and
maximize/restore it.
Change-Id: Ib32524ebbbb084a98442d3d035897306a11ee6c2
Introduce IWindowToken to report config/display changes from
server side. When config change callback is received,
it will update the resources associated with the window token.
Test: WindowContextTests
Bug: 128338354
Bug: 146820733
Change-Id: I871bd78a21dbde1286786e65c340b6259b873660
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
Author: Marek Z. Jeziorek <marekj@google.com>
BUGANIZER BUGS Addressed
========================
Georgian: 111550750
Javanese: 139104208
GunjalaGondi, HanifiRohingya, Khojki, MasaramGondi, Wancho, and ...
WarangCiti: 148752969
Adlam, Tifinagh: 148752946
CHANGES
=======
Remove font files no longer required
deleted: other/NotoSansAdlam-Regular.ttf
deleted: other/NotoSansGeorgian-Bold.otf
deleted: other/NotoSansGeorgian-Medium.otf
deleted: other/NotoSansGeorgian-Regular.otf
deleted: other/NotoSansJavanese-Regular.ttf
deleted: other/NotoSansTifinagh-Regular.ttf
deleted: other/NotoSerifGeorgian-Bold.otf
deleted: other/NotoSerifGeorgian-Regular.otf
modified: fonts.mk
modified: other/Android.bp
Replacements for the above deleted files:
new file: other/NotoSansAdlam-VF.ttf
new file: other/NotoSansGeorgian-VF.ttf
new file: other/NotoSansJavanese-Regular.otf
new file: other/NotoSansTifinagh-Regular.otf
new file: other/NotoSerifGeorgian-VF.ttf
New additions to Android fonts (living/revival languages):
new file: other/NotoSansGunjalaGondi-Regular.otf
new file: other/NotoSansHanifiRohingya-Regular.otf
new file: other/NotoSansKhojki-Regular.otf
new file: other/NotoSansMasaramGondi-Regular.otf
new file: other/NotoSansWancho-Regular.otf
new file: other/NotoSansWarangCiti-Regular.otf
Test: ===================================================
Test: on Android (click on a link within a browser):
Test: Adlam https://en.wikipedia.org/wiki/Adlam_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_Extended
Test: Gunjala Gondi https://en.wikipedia.org/wiki/Gunjala_Gondi_(Unicode_block)
Test: Hanifi Rohingya https://en.wikipedia.org/wiki/Hanifi_Rohingya_(Unicode_block)
Test: Javanese https://en.wikipedia.org/wiki/Javanese_(Unicode_block)
Test: Khojki https://en.wikipedia.org/wiki/Khojki_(Unicode_block)
Test: Masaram Gondi https://en.wikipedia.org/wiki/Masaram_Gondi_(Unicode_block)
Test: Tifinagh https://en.wikipedia.org/wiki/Tifinagh_(Unicode_block)
Test: Wancho https://en.wikipedia.org/wiki/Wancho_(Unicode_block)
Test: Warang Citi https://en.wikipedia.org/wiki/Warang_Citi_(Unicode_block)
Test: ===================================================
Test: on Android (click on a link within a browser):
Test: udhr Adlam https://unicode.org/udhr/d/udhr_fuf_adlm.html
Test: udhr Georgian https://unicode.org/udhr/d/udhr_kat.html
Test: udhr Gunjala Gondi NA (Not Available)
Test: udhr Hanifi Rohingya NA (Not Available)
Test: udhr Javanese https://unicode.org/udhr/d/udhr_jav_java.html
Test: udhr Khojki NA (Not Available)
Test: udhr Masaram Gondi NA (Not Available)
Test: udhr Tifinagh https://unicode.org/udhr/d/udhr_tzm_tfng.html
Test: udhr Wancho NA (Not Available)
Test: udhr Warang Citi NA (Not Available)
Test: ===================================
Test: on Android (comparing two systems - before/after)
Test: Georgian: Systems settings menus compared side by side
Test: ===================================
Test: on Mac (comparing the existing Android fonts with the new font
Test: using diffenator - https://github.com/googlefonts/fontdiffenator)
Test: ===================================
Test: SansAdlam-VF: VALIDATED
Test: SansGeorgian-VF: VALIDATED
Test: SansGunjalaGondi: NEW (No Applicable)
Test: SansHanifiRohingya: NEW (No Applicable)
Test: SansJavanese: VALIDATED
Test: SansKhojki: NEW (No Applicable)
Test: SansMasaramGondi: NEW (No Applicable)
Test: SansTifinagh: VALIDATED
Test: SansWancho: NEW (No Applicable)
Test: SansWarangCiti: NEW (No Applicable)
Test: SerifGeorgian-VF: VALIDATED
Change-Id: I86d46f4b6404509a2e7792473a321f5538b9eb19
Signed-off-by: Marek Z Jeziorek <marekj@google.com>
- 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 80e4320435)
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