Removing the mapping is prone to races in keeping the state consistent
with the server. An inconsistent state can lead to multiple alarms on
the server for the same listener.
Test: atest CtsJobSchedulerTestCases doesn't fill the alarm queue with
more than one alarm.
atest CtsAlarmManagerTestCases
Bug: 154444435
Change-Id: Iaf11d5decb17fbf2366b49d9865231bf65dbdc41
When a package that is part of a shareduid is installed / updated its
lineage is compared against the current signature / lineage for the
shareduid. If the new package has more than one signature in the lineage
an IndexOutOfBoundsException is thrown by SigningDetails#hasAncestor
crashing the system server. This commit ensures the ancestor check
is only performed against the current signer for the shareduid.
Fixes: 155134046
Test: atest SigningDetailsTest
Change-Id: Icef9f21c6901e255e5276085259d2f773f41e858
ServiceSpecificException might be thrown, but it is not
actionable by the caller. Hence hide the comment.
Fixes: 151156841
Test: none
Change-Id: I07836fe2c5cc361fa81f6fc24851ad2b0721591b
(cherry picked from commit d3abb6d385)
Merged-In: I07836fe2c5cc361fa81f6fc24851ad2b0721591b
Log only the parent state to avoid unnecessary process states from being
sent to statsd. This may not work for all cases, but the edge cases can
be revisited later.
Bug: 135965535
Bug: 135375287
Test: manually tested using chrome
Change-Id: I87b79f5d21f186f227a5a50bbe83b56a9105348c
* before the fix, the method would return false if the two bundles both
contains a nested bundle for the same key, and the nested bundles are
equal. i.e. the test case
InlinePresentationStyleUtilsTest#testBundleEquals_nestedBundle_equal
would fail.
Test: atest InlinePresentationStyleUtilsTest
Bug: 154957669
Change-Id: Ia2cf682619fa245d846972a8683d03333551df78
Otherwise the initial intents will be shown in the other
profile as share targets. This would cause a crash when
the user selects the app, as the activity cannot
be resolved.
Fixes: 155088755
Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Change-Id: I0604c15c35ecddf163460286b84c27daf6ca9a5b
Previously we would check for autolaunch the first time
onPostListReady is called, but that is too early in the case
when we start the async task for sorting the targets. In
that case onPostListReady is called twice - once before
task is launched, and once after task is finished.
We fix this by passing the rebuildListCompleted parameter to
the onPostListReady callback and use it to check for autolaunch.
Test: atest ChooserActivity
Test: atest ResolverActivity
Test: manual
Fixes: 154728817
Change-Id: Ib1b049af00d791898b908bdb65971c07c558f3ac
1) Actions are only registered when the service starts. If the locale
changes, the labels need to be translated, so re-register the actions
when this happens.
2) When its shortcut isn't visible the a11y menu action is a no-op. The
list should be an accurate representation of what actions are available.
Pass SystemActions into NavigationBarFragment, which keeps track of the
shortcut availability, to unregister/register the action.
To do this, SystemActions exposes register/unregister to the fragment
and makes SYSTEM_ACTION_ID_ACCESSIBILITY_MENU public.
3) Remove Toggle Split Screen from SystemActions. The trigger isn't
system-level but is rather buried in the Recents UI in a button for each
app, and the a11y user can access this like everyone else.
SystemActionPerformer will still handle the legacy action call in
performSystemAction.
4) Rename "Accessibility Menu" to "On-screen Accessibility Shortcut"
Bug: 152636060, 152635646, 154833492
Test: Manual TalkBack test
Change-Id: I9b037f91c8d3b6f193fc9aee95ef73b7f3fbf315
The file descriptor is only closed in certain situations. Explicitly
closing it to ensure we don't have any leaks.
Bug: 154277871
Test: take a system heap dump via developer options & and watch for StrictMode violation
Test: adb shell am dumpheap <system|another app> & and watch for StrictMode violation
Change-Id: I3ae3e270bcec18ba531055becfff32924c8f2a2d
When creating Context without a container Context, cache the value of #isSystemOrSystemUI().
Fix: 154161051
Test: atest FrameworksCoreTests:ContextTest
Change-Id: I1d16173c7da06a73d1338e3d6e75f5b56fcdbe23
Added requests to take screenshot of a Window that's organized
by the client. The resulting screenshot will be attached to a
SurfaceControl and reparented to the requested window's parent. The
client will be responsible for showing, setting z order, etc. They can
also re-parent to another place in the hierarchy. The default is to
parent to the window's parent since that's usually where a screenshot is
placed.
Test: Builds
Bug: 152114574
Change-Id: I5c829e029f3528fdb382842e9f0474097e01cb2e
Merged-In: I5c829e029f3528fdb382842e9f0474097e01cb2e
This way receivers like recents know whether the activity
was already visible before a restart attempt.
Bug: 154575664
Test: added test. Can also launch a running activity into
split-primary and it won't expand it.
Change-Id: If59ee1615fa36bbe3af9412194a7f96b9377528a