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
This patch let DecorCaptionView report back to it's owner about height
change, instead of let the DecorView query the height. The previous
query points enableCaption() and updateDecorCaptionStatus() cannot
ensure the caption layout is finished and attached to the phone window.
Such that it may return a zero caption insets when it shouldn't be, if
the app do window configuration change handling by restarting.
The layout will ensure the caption insets get set when everything is
ready.
There will be no caption height change when resizing or moving, make
sure the calculated insets always include the caption regardless of the
frame position.
Bug: 154792488
Test: Manuel test with message and settings app.
Test: go/wm-smoke
Test: atest InsetsControllerTest#testCaptionInsetsStateAssemble
Test: atest InsetsSourceTest#testCalculateInsets_caption_resizing
Change-Id: I1728628eccb32b912210a64fe3a1c9cbe9e3b302
In ViewConfiguration, we use isUiContext to verify if a context
is an visual context. However, DecorContext uses Application
context as a base context and return false as intended.
This patch overrides isUiContext to report context#isUiContext
instead.
fixes: 153664027
Test: atest DecorContextTest#testIsUiContextFromVisualDecorContext
Change-Id: Ida26b9617c74dc6997fc2c00d97d3420a0978fc7
This error showed because DecorContext uses application context
to get WindowManager. This CL changes to use PhoneWindow to obtain
WindowManager instance. Also refactor ctr to obtain context from
PhoneWindow.
Bug: 152806048
Test: manual - enable strict mode and check the error log not shown.
Test: atest DecorContextTest
Test: atest MemoryTests#testActivityRecreation
Change-Id: I1d416b9cdb015c9bc3553571041f3b14bb9da5da
Currently, the screenshot process only remains bound to SysUI
(by ScreenshotHelper) until the screenshot finishes saving. This
makes it vulnerable to getting cached and frozen. Since the process
now includes UI with touch focus for longer than that, this can
cause ANRs in the screenshot process, if it is frozen while it's
supposed to be accepting touch input.
Retaining the binding for the entire lifecycle of the screenshot
UI fixes this problem.
Test: manual -- used the steps in b/153577093 to verify the
freezing behavior and verified that it no longer occurred after
the change
Bug: 153418099
Fix: 153418099
Change-Id: Idca24a69274af3d633e1243b46b602613cb04d50
- nullcheck buttonBarDivider
- only apply padding to non-default layout resolver
- create header for user instead of just once, because
it gets updated after it's first created
Fixes: 154832840
Fixes: 154330193
Test: manual
Change-Id: Ia9f2a1112a406e898dcf66954887ababae48f001
Added a new flag "--statsd" to dumpsys procstats, it'll dump
the identical protobuf data as the one being sent to statsd;
these data is aggregated/reduced. The tradtional "--proto"
is still supported in case the full data is needed.
Align the ProcStats's proto message definition with the statsd.
Fixed various other issues with ProcStats's dumping.
Bug: 148542701
Test: atest ProcStatsValidationTests
Change-Id: I5a22603bfbc97bfac93179289df839710364677d
* changes:
Rollback chooser menu to version Q behavior for accessibility button (2/n).
Rollback chooser menu to version Q behavior for accessibility button (1/n).
Allow separate Activities to handle the multiple-target case for the hardware and software shortcuts. Migrate from an extra to an explicit class so the Intent dispatch will launch the correct Activity for the particular shortcut.
Bug: 151294664
Test: manual test
Change-Id: I54bb1d3ab91e2757c465e8763786d0234f6d4ea8
1. Replace ACCESSIBILITY_BUTTON_TARGET_COMPONENT key with
ACCESSIBILITY_BUTTON_TARGETS key.
2. Rollback to version Q widgets.
Bug: 151294664
Test: manual test
Change-Id: Ibaa3b058418476e58291bfb95a1935dbf5c70e25
For example, if share sheet is fully expanded in personal profile,
when we go to the work tab, the direct share targets should
also be expanded there.
Fixes: 154523836
Test: manual
Test: atest ChooserActivityTest
Change-Id: I9346d7485f7498fc038c86bf5f8550c8ea6d0b48
This CL does the following changes:
- Save and restore the resolver drawer layout height.
This is necessary because when we toggle darkmode,
we don't go through handleLayoutChange, thus we don't
recalculate the height the standard way.
- Disables saving state for the viewpager.
This is necessary, because the content is
incorrectly restored afterwards. It's better to
reload it instead.
- Saves and restores the last selected tab. This is
necessary because with the viewpager state saving
disabled, it defaults to the first tab.
I considered updating the configChanges attribute in
the manifest to include dark mode toggling, but it
gave unsatisfactory result - the share sheet only
partially became dark.
Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Fixes: 154526324
Change-Id: I99e159ea7ca413f8acbc0429a43ce5aba32a1b28
Adds filter to prevent passing binder objects in the extras and styling
APIs for inline suggestions. Avoids these to be used to send over remote
objects for Autofill provider and IME to communicate through private APIs
bypassing the OS.
Bug: 152316540
Test: atest CtsAutoFillServiceTestCases
Test: atest InlineSuggestionsRequestTest
Change-Id: I00940a845ed0e2546cbe09fa36e2439869c2f783
Please see the original change I0d6b4a7b12b234939cb6eb3a32658b28f61dff4f,
where the additional locks were first introduced, but the original lock
was not consistently removed.
Bug: 153826721
Bug: 153813215
Test: Disable and reenable WiFi.
Change-Id: I0e68889e9dfe22495d64b16a495a83434b816304
The crash was caused by trying to resolve an instant
app which is not allowed on the main thread, fixed it by
resolving on a background thread.
Fixes: 146141583
Test: atest IntentForwarderActivityTest
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Change-Id: I250d682cf90870c7360eb66529be8c91fac266b1