Update handling of <User Control Pressed> messages with power related
operands. Power commands change the power status properly and should not
be converted to power keycodes.
This particularly changes the handling of <User Control Pressed>["Power"]
which could be converted to KEYCODE_POWER before when the device was on
when the keycode was received, causing the device to turn off. This is
no longer supported and <User Control Pressed>["Power"] will be treated
as a power on command.
Test: atest HdmiCecLocalDeviceTest
Fixes: 174452275
Change-Id: I10f6d0d235d999bd29b54ba96728c0bda9697ec5
Clasifiers now return a Result object on all their classification
methods. The Result object now contains the "reason" for falsing
instead of asking the Classifier for the reason after the fact.
Bug: 172655679
Test: atest SystemUITests
Change-Id: I0865f18cbae9367c203936fbbc3923de55c81007
This institutes a HistoryTracker mechanism that will allow the
FalsingManager to take recent activity into account when classifying
gestures. The HistoryTracker returns a penalty that is pased to each
classifier for them to use when making decisions.
As of right now, no classifier actually uses the history penalty when
making a classification decision.
The HistoryTracker keeps records of the last 3 seconds of falsing
results, applying a decaying penalty to the results over time. It also
assigns a confidence to its results, based on how consistent they are.
Each individual classifier is also able to return a confidence score
now, such that, if they are not confident in their decision, they
don't throw off the score that gets stored in the HistoryTracker.
Confidences currently returned by the classifiers are somewhat
arbitrary and should be adjusted in future CLs.
Everything is currently open for adjustment:
- The length of history
- The decay function applied to history
- The method by which our confidence in the history is calculated
- The confidence returned by each individual classfier
- How the history penalty is taken into account by each classifier
- ... and probably more.
Bug: 172655679
Test: atest SystemUITests
Change-Id: Ief2a5144a0cda659c7d78ed6e489231d481b6872
- remove unused persistent data store
- fix if statement
- use undeprecated ipw
Bug:175296120
Test: manual
Change-Id: I3790ab670f5856edd9dc742ff6285b7055588de2
ConnectivityService is going to become a mainline module which
cannot access hidden APIs. Thus, replace the VPN uid range
controlling APIs from NMS to INetd directly.
Bug: 170598012
Test: atest FrameworksNetTests
Test: atest HostsideVpnTests
Test: manually test to connect to VPN and check the uid range
Change-Id: Ie6656ef36f54c2f14d5a2899e763a29b70a30f5d
Some apps still use these fields. Remove them can make the app's
behavior unexpected. Although they shouldn't use these hidden APIs, it
won't cause any trouble if we bring the fields back. The user experiance
can keep the same.
NoNonSdkCheck: Revert Non-SDK API change
Fix: 174657478
Test: Steps in the bug.
Change-Id: I8da15ba3f66d20b4ac599db32539acb76d279978
DOZE_AOD_DOCKED should not have screen based trigger sensors
enabled. In fact, it can end up in inconsistent states currently.
When first entering it, the sensors are not enabled. But if the screen
then turns off (in a dark room) and then back on, the sensors are
left on from the prior state.
This change ensures that, when we ask to turn off touch based sensors,
they actually turn off.
Fixes: 172412913
Test: manual
Change-Id: I86f800cb75fee9f2d7e60655af4803e616a68fb2
The activity slept callback was removed since commit 4679918. So
now just add the check at when an activity is stopped. Otherwise
it always takes 5s timeout to release the sleep wake lock.
Bug: 173186282
Test: ActivityTaskManagerServiceTests#testUpdateSleep
Change-Id: I7e662fea0c01ada95951009682375cd9fcec0b01
Putting initial code to detect unauthorized use of Intent.ACSD. For now
we only allow permission holders and apps instrumented via permission
holders (eg. CTS tests via shell).
The plan is to drop the broadcast when unauthorized for targetSdk < S
(to fix the security issue) and throw a SecurityException when apps
target SDK level S+. Because of this I'm using two separate @ChangeIds
for now.
Since there are still legit use-cases where apps use Intent.ACSD, I'm
checking this in disabled mode for now, only logging. Once I implement
the exemptions for these cases I'll turn on the feature. Once that
happens I can remove one of the @ChangeIds.
It's good to get this code now rather than all at once after all the
exemptions so we can see how things fit (plus have some tests).
I'll also protect IAM.closeSystemDialogs() in a future CL.
Bug: 159105552
Test: atest CtsAppTestCases:android.app.cts.CloseSystemDialogsTest
Change-Id: I055f42a34fecebcded55a5eb6ccb3cefa2031812
From S, it's required to specify explicitly either FLAG_MUTABLE
or FLAG_IMMUTABLE when creating a PendingIntent. Thus, add a
mutability flag to the PendingIntent in ConnectivityServiceTest
that doesn't specify it before.
Bug: 173157160
Test: atest FrameworksNetTests
Change-Id: I755c53b90d709dfbac576dc076722476c3edee35
Updating all IME tests with new assertions (visibleLayersShownMoreThanOneConsecutiveTime and visibleWindowsShownMoreThanOneConsecutiveEntry). For the visibleWindowsShownMoreThanOneConsecutiveEntry, adding a new param to it to ignore some windows as the InputMethod window should be ignored as it only shows one time. Same behaviour for visibleLayersShownMoreThanOneConsecutiveEntry.
Also enabling some assertions that were disabled that seems to work.
Test: atest FlickerTests
Bug: b/171049649
Change-Id: I15a6e4934dfc64fd9449d4ff15ce7b1ab881f324
In order to support ConnectivityService mainline, the dependency
with NMS should be removed. The idle timer control API should be
replaced with calling INetd interface instead of using NMS hidden
API. However, NMS has more logic than setting the idle timer to
netd. If CS would like to send idle timer setting to netd directly
, those logic should be handled by CS itself or moved to other
equivalent places.
The power state is sent to BatterystatsService and logged the
corresponding metrics at the same time, so writing metrics should
be able to put together inside BatteryStatsService.
Bug: 170598012
Test: m and use statsd_testdrive to verify
Change-Id: Iadfa3671ed34bf403be8b53eb47f83386b22c85a
The bug would occur when Mockito stopped mocking methods when the test
is done, but the mocked object still exists, and is then accessed as a
scheduled message triggers it.
Test: atest NotificationManagerServiceTest
Bug: 174997218
Change-Id: I3c76456927bb0c27945b137187011b5eb3c7102c
This removes the i18n source from the non-updatable stubs which removes
them from the frameworks/base/core/api files too. The API is still
protected by both the build and Gerrit review as the API is specified
in the external/icu/android_icu4j/api/public/ directory.
The i18n stubs source is used instead of the implementation source for
generating the JavaDoc. That revealed a minor issue with metalava which
is fixed in this topic.
The i18n stubs library was statically included alongside the conscrypt
stubs library so it will still appear in the monolothic android.jar.
Bug: 174344410
Test: m offline-sdk-docs
- check that i18n classes are present
m android_stubs_current android_system_stubs_current android_test_stubs_current
- check that i18n classes are present in each jar
m droid
Change-Id: I744c8bac54a8a5518ca0eca2a7700abbfa0997f4
Untrusted display (e.g. virtual display created by app, a common
case is screen recorder) doesn't support system decorations. There
is nothing to do with additional features.
This saves 31 layers (according to current features) per untrusted
display. And also reduce the cost of traversing entire hierarchy.
Fixes: 175179353
Test: DisplayAreaPolicyTests#testEmptyFeaturesOnUntrustedDisplay
Change-Id: Iad45217c9e09f33ef9f3f4503b9db2a8a21995a3
SAW permission is added to the shell to allow it to create
TYPE_APPLICATION_OVERLAY windows during testing.
Test: atest CtsWindowManagerDeviceTestCases:HideOverlayWindowsTest
Bug: 159616727
Change-Id: I503cd8da24ff4d2b928f930ac61090e6782c1546
The top activity of the dock task was finished due to starting
the singleTask root activity. However, the root activity was remained
in STOPPED state because the activities in dock task cannot be
resumed while in split-screen mode.
Ensure the activity visibility if the target task is unfocusable.
Bug: 174440887
Test: start singleTask activity on dock task
Change-Id: I4f02758287ca4ef0e710bb556b5910600e725e40
1. The framework need to know the instance of the client connected to
know which instance is idled.
2. The framework need to know the instance of the soft AP info.
3. Add infoList callback support for dual APs mode.
AP+AP Part 5 includes:
1. Support forceClientDisconnect in dual AP mode.
2. Support dual SoftApInfo callback
a. New callback onInfoListChanged
b. Add instanceIdentifier in SoftApInfo but it is used only in
framework.
c. Add instanceIdentifier in WifiClient but it is used only in
framework.
Bug: 162686273
Test: FrameworksWifiApiTests
Change-Id: I207831ff15a3044316556d61a72542ff35c94e74