Currently, there is
onOpNoted - tells listeners that noteOp has occurred
onOpActiveChanged - tells listeners that an op's 'active' state has
changed, i.e. that a successfull startOp or stopOp has happened
There was, however, no way of telling a listener that a startOp has
happened (regardless of whether it was successful). This cl introduces
it, via a OnOpStartedListener.
This is required by the ForegroundServiceAppOpSessionEnded atom,
which counts the number of accepted vs. rejected attempts, and
therefore also needs to know when a rejected start happened.
This cl also contains some cosmetic moving of code so that
startOperation() and noteOperationImpl() are almost
exactly parallel.
* Also *
This cl fixes a bug I discovered in stopWatchingNoted, in which
the callback wasn't fully removed. Consequently, if a callback
was unregistered and then re-registered, the re-registration would
mistakingly be ignored (in direct contradiction to the javadoc).
Test: atest UidAtomTests#testForegroundServiceAccessAppOp
Test: atest AppOpsStartedWatcherTest AppOpsActiveWatcherTest AppOpsNotedWatcherTest
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd : {" | egrep '\(256\)'
Bug: 152800926
Change-Id: Icdb9edf6b2b7c5807b339c1aabb32e882190b071
Introduces new test api to access the background view of status bar and
navigation bar.
Bug: 154720832
Test: atest WindowInsetsPolicyTest
Change-Id: If38d3f57edfbb2631d4c1e47ed5347a332edacfb
Rank ChooserTargets of the same component as per available scores returned by AppPredictor.
These two features are guarded by flag "mChooserTargetRankingEnabled"
Add relevant logging to make it easy to figure out root cause from bug report.
Bug: 151112858
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Change-Id: Id8c4b373ba9e2e1ae29281791e49dde8722ba9d1
When admin sets a new strong auth timeout policy, replace the existing
alarm (which enforces strong auth after the timeout) with a new one
with updated timeout.
Bug: 146188984
Test: atest com.android.server.locksettings.LockSettingsStrongAuthTest
Test: atest MixedManagedProfileTest#testRequiredStrongAuthTimeout
Change-Id: Ibcc13eb0d66697aff44192769b8fd817ca6800b8
Use PropertyInvalidatedCache to avoid redundant calls to
SubscriptionController getSlotIndex and getPhoneId.
Bug: 151953109
Test: Verified cache operated correctly when phone process is killed.
Test: atest SubscriptionControllerTest
Test: atest android.telephony.cts.SubscriptionManagerTest
Change-Id: I70552537af44f3e05b156cd190ebb28f0d940bf6
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