Commit Graph

615375 Commits

Author SHA1 Message Date
Bill Yi
7a5ad17bde Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Idccaa0c15bb909260d06e811daeb26ed94061741
2020-12-10 06:43:59 -08:00
Marvin Ramin
0786ebc98e Update handling of incoming CEC power key presses
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
2020-12-10 15:40:39 +01:00
Dave Mankoff
1179f84f54 Make FalsingClassifiers less stateful.
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
2020-12-10 09:40:11 -05:00
Dave Mankoff
3ae5052e7b Add HistoryTracker to FalsingManager
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
2020-12-10 09:40:07 -05:00
TreeHugger Robot
0d0dd7f821 Fix up LogicalDisplayMapper
- remove unused persistent data store
- fix if statement
- use undeprecated ipw

Bug:175296120
Test: manual

Change-Id: I3790ab670f5856edd9dc742ff6285b7055588de2
2020-12-10 14:38:45 +00:00
Jeff Sharkey
c9dc68f063 Merge "Update OWNERS info for NetworkPolicy related files." 2020-12-10 14:33:07 +00:00
Tiger Huang
a02ab70564 Merge "Bring insets fields back to AttachInfo" 2020-12-10 14:26:30 +00:00
Chiachang Wang
c92383fd6d Resolve UidRange dependency between NMS and CS module
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
2020-12-10 22:24:47 +08:00
Tiger Huang
cbfa72a4b6 Bring insets fields back to AttachInfo
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
2020-12-10 14:23:32 +00:00
Dave Mankoff
fcc5a5f92f Unregister Touch Sensors for DOZE_AOD_DOCKED
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
2020-12-10 09:16:59 -05:00
Jeff Sharkey
9bfd484087 Merge "Mitigate performance TypedXml regression." 2020-12-10 14:12:06 +00:00
TreeHugger Robot
ed6341bf97 Merge "Prevent accidentally click on RecyclerView" 2020-12-10 13:39:58 +00:00
Pavel Grafov
28fb4ade13 Remove stub since proper delegate is implemented
The delegate was added to ArcDevicePolicyManagerWrapperService

Bug: 160457441
Test: Threehugger
Change-Id: I219abd5f48ff345b97cf5771dc18f0188795022f
2020-12-10 13:29:46 +00:00
Riddle Hsu
cde89554f9 Release sleep wake lock if activities are stopped while sleeping
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
2020-12-10 21:24:37 +08:00
Riddle Hsu
8e48dd4ce3 Merge "Do not add display area features for untrusted display" 2020-12-10 13:16:23 +00:00
TreeHugger Robot
f1338dbbaa Merge "Refactor updating rules for all apps in NetworkPolicyManagerService" 2020-12-10 12:53:51 +00:00
Bill Yi
e0446debec Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I64b958a268b991f7f4c8b2d27387ef57ea3b7704
2020-12-10 04:52:06 -08:00
TreeHugger Robot
85c84a7c07 Merge "Implement setAlwaysOn to IVibratorManagerService" 2020-12-10 12:50:11 +00:00
Bernardo Rufino
9674c1f1f9 Log on unauthorized Intent.ACTION_CLOSE_SYSTEM_DIALOGS
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
2020-12-10 12:47:48 +00:00
paulhu
508ebddc46 Add a mutability flag to the PendingIntent
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
2020-12-10 12:28:14 +00:00
Paul Hu
88b298c86a Merge "Revert "ConnectivityServiceTest: Mark unaudited PendingIntents with FLAG_MUTABLE_UNAUDITED"" 2020-12-10 12:27:07 +00:00
Isaac Chiou
48b6f8616f Wifi: Disable network when detecting carrier eap error
Disable network temporarily when detecting carrier eap error

Bug: 148940011
Test: atest FrameworksWifiTests
Test: make sure network can be disabled when detecting carrier eap error
Change-Id: Ide5f8b2a084ce3d72b6ba820393b9fb9b22aff0f
2020-12-10 20:26:30 +08:00
TreeHugger Robot
2c70cd586b Merge changes I944dc1cd,I97c962d5
* changes:
  Track CEC version of CEC devices
  Add HdmiDeviceInfo#mHdmiCecVersion
2020-12-10 12:23:49 +00:00
Antonella Dellanzo
b1e55c28cb Updating IME tests
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
2020-12-10 13:18:29 +01:00
Lucas Lin
9e75ca54a3 Merge "Reimplement DumpUtils#checkDumpPermission() in ConnectivityService" am: d0c6af4b5f am: a7ae56b380 am: 37bc327902
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519792

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If1eb5c4a9975fd87dfab5bb893d6c23ae2bae41c
2020-12-10 11:54:51 +00:00
Ulyana Trafimovich
1eb1c8ee41 Merge "Add <uses-library> information." am: af5dab1cb3 am: 37c820a0c4 am: 9a0bd6c7a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427189

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idd6195ea15651399dba5108ed3739f9cedbbcee2
2020-12-10 11:54:12 +00:00
Hyundo Moon
154b489b40 Merge "Add PlaybackState.ACTION_SET_PLAYBACK_SPEED" 2020-12-10 11:46:59 +00:00
TreeHugger Robot
ea748be0c9 Merge "Add change id for FLAG_SLIPPERY" 2020-12-10 11:34:06 +00:00
Chiachang Wang
39d9dc0fcf [IT01] Move power state stats logging out from NMS
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
2020-12-10 19:32:29 +08:00
Jan Tomljanovic
6129cfa7af Fix the bug where inner lock in MultiRateLimiter is null.
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
2020-12-10 11:31:45 +00:00
Narayan Kamath
f6cf5abf47 Merge "ResolverActivity: Rename alwaysCheck to always." 2020-12-10 11:29:31 +00:00
Paul Duffin
5a4e8f234d Unbundle i18n API from android-non-updatable
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
2020-12-10 11:23:19 +00:00
Lucas Lin
37bc327902 Merge "Reimplement DumpUtils#checkDumpPermission() in ConnectivityService" am: d0c6af4b5f am: a7ae56b380
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519792

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52b048b4ecd3f228c7d13aafeaa6bd852f564a46
2020-12-10 11:15:16 +00:00
Ulyana Trafimovich
9a0bd6c7a1 Merge "Add <uses-library> information." am: af5dab1cb3 am: 37c820a0c4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427189

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I222a034fc1d5808b95378d4967b716cac305c5fa
2020-12-10 11:14:51 +00:00
Mariia Sandrikova
e714b0389f Merge "Letterbox: show activity under insets when possible or needed" 2020-12-10 11:09:12 +00:00
Lucas Lin
a7ae56b380 Merge "Reimplement DumpUtils#checkDumpPermission() in ConnectivityService" am: d0c6af4b5f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519792

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibd216cc83e539f202e01076b97fa2d981185dc49
2020-12-10 11:06:27 +00:00
Lucas Lin
d0c6af4b5f Merge "Reimplement DumpUtils#checkDumpPermission() in ConnectivityService" 2020-12-10 10:57:58 +00:00
Riddle Hsu
b87dc233af Do not add display area features for untrusted display
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
2020-12-10 18:57:11 +08:00
Linus Tufvesson
f57a88f03b Allow 3p apps to hide non system overlay windows
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
2020-12-10 10:47:48 +00:00
Treehugger Robot
e386b0a3df Merge "Add VcnManagementService owners" am: a048b25ee9 am: 49931b4ba7 am: 131a515878
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520919

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id0ef4c0b28a2ec6bc8299e0df452dc5b696abaa2
2020-12-10 10:40:56 +00:00
Louis Chang
fc165b971c Ensure the next activity of non-focusable task to be visible
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
2020-12-10 18:39:36 +08:00
Ulyana Trafimovich
37c820a0c4 Merge "Add <uses-library> information." am: af5dab1cb3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427189

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2330ce207e2185daa7267898557b775c50f48664
2020-12-10 10:35:29 +00:00
Treehugger Robot
131a515878 Merge "Add VcnManagementService owners" am: a048b25ee9 am: 49931b4ba7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520919

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9785a70e2567fdf5722d4153a679e0d9f0afb2e3
2020-12-10 10:25:36 +00:00
TreeHugger Robot
9608af1e3e Merge "Align SplitDivider layer name for AppPairs flicker test" 2020-12-10 10:25:28 +00:00
Ulyana Trafimovich
af5dab1cb3 Merge "Add <uses-library> information." 2020-12-10 10:19:34 +00:00
lesl
d3d17acd9c wifi: Add instance identifier in SoftApInfo/WifiClient and infoList callback
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
2020-12-10 18:07:34 +08:00
Adam Bookatz
c8eaa82d5c Merge "Cleanup some SystemService.onUser...() comments" 2020-12-10 10:03:34 +00:00
Treehugger Robot
c71d6ec10c Merge "[Mainline] Network netId to getNetId() migration" am: 7225913863 am: 983a2fe29b am: ce461d3660
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520637

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6c09a80a7dd55b357426e01b50725254a9c03148
2020-12-10 10:01:36 +00:00
Terry Wang
93e2122828 Porting AppSearch jetpack upstream changes to platform
Changes included:
#af6646e : Support retrieving the current database's schema
#2696e50 : Unhide the createGlobalSearchSession API.

Bug: 162450968
Test: presubmit
Change-Id: I1a69db42742c45b97fca945e3b917df274ba75bb
2020-12-10 02:01:02 -08:00
Treehugger Robot
49931b4ba7 Merge "Add VcnManagementService owners" am: a048b25ee9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520919

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id9c51d9fec851d9396f7b7a8cf336d7d7e4cc435
2020-12-10 09:53:57 +00:00