Commit Graph

18341 Commits

Author SHA1 Message Date
Dmitri Plotnikov
c10248df56 Merge "Lock BatteryUsageStats snapshot directory" into tm-dev 2022-03-24 15:29:52 +00:00
TreeHugger Robot
44f3f74955 Merge "Revert "Use new T activity transitions in legacy"" into tm-dev 2022-03-24 07:27:39 +00:00
Pablo Gamito
1250be73c8 Revert "Use new T activity transitions in legacy"
This reverts commit e0ce996ecc.

Reason for revert: Edge extension is likely causing segfaults

Change-Id: Id53e4b7e10e0509742bef4b48263b5c58e06baed
2022-03-23 22:35:26 +00:00
Michael Wachenschwanz
7dd534b98a Merge "Ref count isolated uid use for long partial wakelocks" into tm-dev 2022-03-23 20:25:44 +00:00
Lais Andrade
352d8d7abe Merge "Fix PIN lock pattern not respecting user settings" into tm-dev 2022-03-23 18:36:58 +00:00
Lais Andrade
9bab88b20a Fix PIN lock pattern not respecting user settings
The LockPatternView had a boolean attribute mEnableHapticFeedback that
held a copy of the user settings for enabling "Touch feedback"
vibrations. This attribute was used together with
HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING deprecated setting to
bypass the user settings in the vibrator service.

This change removes the use of this deprecated flag and lets the
Vibrator service apply the user settings for "Touch feedback" to
vibrations generated for the PIN lock input in LockPatternView.

Fix: 216656312
Test: manual
Change-Id: If9733c059e5059b6e58b6f84d100df2a0abafab6
2022-03-22 22:58:08 +00:00
Jernej Virag
d27d7fe051 Merge changes from topic "revert-17199637-revert-17083643-large-icons-tm-XHQQYXZDHH-KIGUXQGTHZ" into tm-dev
* changes:
  Size restrict right notification icon size
  Downscale large bitmaps in CachingIconView
  Support downscaling of Drawable icons in LocalImageResolver
2022-03-22 20:07:04 +00:00
Issei Suzuki
f51bb0783b Merge "Migrate DEBUG_ANIM logcat message to ProtoLog." into tm-dev 2022-03-22 18:19:19 +00:00
Eric Biggers
3abc52220b Merge "Stop using FDE-related constants from IVold" am: 489ba5ac07 am: 84f05b1b9c am: e1a9ca0ec8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031025

Change-Id: Ic411eb688afe449212dee247d2ecb39471c4314f
2022-03-22 18:04:27 +00:00
Eric Biggers
e1a9ca0ec8 Merge "Stop using FDE-related constants from IVold" am: 489ba5ac07 am: 84f05b1b9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031025

Change-Id: Id7be68ef1c367fb461236a0c14b4dbb8e0ca5bdd
2022-03-22 17:47:04 +00:00
Eric Biggers
489ba5ac07 Merge "Stop using FDE-related constants from IVold" 2022-03-22 17:37:32 +00:00
Pablo Gamito
fa5aefba20 Merge changes from topic "t-activity-backport" into tm-dev
* changes:
  Use new T activity transitions in legacy
  Backport window extension animation support
2022-03-22 15:15:48 +00:00
Calvin Pan
1da7fdde5e Merge changes from topic "app_selection_in_locale_picker" into tm-dev
* changes:
  Add subtitle in System language
  Reuse LocalePickerWithRegion in app language selection
2022-03-22 03:35:28 +00:00
Dmitri Plotnikov
6add0aa96e Lock BatteryUsageStats snapshot directory
From documentation:
"File locks are held on behalf of the entire Java virtual machine.
They are not suitable for controlling access to a file by multiple threads within the same virtual machine."

This means that we should use two locks: one internal to system server,
and another cross-process.

Bug: 216454829
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: I7689ab91a0759f99da700383647f4f8a1fae4362
2022-03-21 17:59:16 -07:00
Michael Wachenschwanz
7589e541d1 Ref count isolated uid use for long partial wakelocks
The isolated uids need to be kept in the map while it is holding a long
partial wakelock.

Bug: 218298973
Test: atest BatteryStatsNoteTest
Change-Id: I86456137e6d6ad47f9974da281defc04d20fb32f
(cherry picked from commit fd48aa6fa6)
Merged-In: I86456137e6d6ad47f9974da281defc04d20fb32f
2022-03-22 00:31:53 +00:00
Treehugger Robot
c5a6c17fa5 Merge "Add i18n Settings OWNER for system language settings" am: 06da2b3f5c am: 11f453bf93 am: af02ce3a8e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2033224

Change-Id: If9d907174100844d173289f2f2ab19278ce6297f
2022-03-21 21:47:19 +00:00
Treehugger Robot
af02ce3a8e Merge "Add i18n Settings OWNER for system language settings" am: 06da2b3f5c am: 11f453bf93
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2033224

Change-Id: I3ceb4c857eb22b06d6d9b8e097c404e17d94c004
2022-03-21 21:17:34 +00:00
Taran Singh
4cff41a3f2 Merge "Finish handwriting session for recents gesture" into tm-dev 2022-03-21 20:54:31 +00:00
Matt Casey
a127b9c0d3 Merge "Remove "Copied" toast from sharesheet." into tm-dev 2022-03-21 20:01:06 +00:00
Calvin Pan
969826576a Add subtitle in System language
Bug: 223090003
Test: Check the UI in per-app language selection page
Change-Id: I647f678016461b557e9f6d5de459fd2dee789b0d
2022-03-21 23:43:02 +08:00
Jernej Virag
6f2b34baf8 Downscale large bitmaps in CachingIconView
CachingIconView is used to displayed (smallish) icons in Notifications. Those can accidentally be made very large if big resources are used.
This makes CachingIconView use LocalImageResolver to load those images with limited size. This fixes large memory use of notification header icons.

Bug: 210690571
Bug: 218845090

Test: atest CachingIconViewTest
      atest NotificationManagerTest
      Verified with notification test APK on a Pixel

Change-Id: Ia37c1fd31a7720e6ec2fd20d7466d8dcaffa6507
2022-03-21 13:39:08 +00:00
Jernej Virag
698325914e Support downscaling of Drawable icons in LocalImageResolver
LocalImageResolver only enforced downscaling for Uri-based Icons at this point. This still allowed app developers to provide large bitmaps as a resource or as a bitmap payload itself. This change also verifies these new types of bitmaps.
Also adds an external size parameter to image resolver so different widgets can use it - right now the upper limit was hardcoded in pixels.

This also updates error handling - in some cases ImageDecoder would throw NullPointerException or NotFoundException except for promised IOException. This wraps those cases into more consistent API.

Bug:218845090
Bug:210690571
Bug:224768026

Test: Manually on device - tested on Raven and new Pixel with multiple
                       notification sizes via notification test apk.
      atest LocalImageResolver
      atest NotificationManagerTest

Change-Id: I4701d58ac3335d11a93355a39cee9f5c998eb830
2022-03-21 13:38:50 +00:00
Issei Suzuki
f3732b4991 Migrate DEBUG_ANIM logcat message to ProtoLog.
Added more log messages around animatingExit.

Bug: 205335975
Test: Existing builds and tests pass.
Change-Id: I4461eddd4a24c7bba1adef1571ce0fbf6d7db0a2
2022-03-21 14:00:13 +01:00
Calvin Pan
6cac5b89c0 Add i18n Settings OWNER for system language settings
Change-Id: Ia3217df6478716ec51b891057ba57a4d53a716ca
2022-03-21 09:06:57 +00:00
Calvin Pan
780ff7127a Reuse LocalePickerWithRegion in app language selection
- (LocalePickerWithRegion) Only list the language that supported by app
- Add "System language" option
- Add current app locale into suggestion list
- Sort locales by these priorities:
  1. Current app's locale
  2. System language
  3. Suggested language
  4. Supported languages

Bug: 223090003
Test: Manual
- (system languages page)
    Check Settings-> System -> Languages -> Languages
- (pre-apps language page)
    Check Settings-> System -> Languages -> Apps Languages
- Add unit test in follow CL(tracing in b/224747202)
Change-Id: I8dc9f73811dbf653b32773fb98ddb2e4656a4432
2022-03-21 14:48:09 +08:00
Eric Biggers
8f359f022a Stop using FDE-related constants from IVold
IVold.ENCRYPTION_STATE_* and IVold.PASSWORD_TYPE_* are values returned
by or accepted by FDE-specific vold methods, which are no longer used.
Stop using these constants so that we can remove them from IVold.aidl.

Notes on specific constants:

- Some constants have @UnsupportedAppUsage.  There is no reason why a
  non-system app should have been using these.  However, to avoid
  possibly breaking apps I just left these with hardcoded values.

- StorageManager.CRYPT_TYPE_* are used by
  LockscreenCredential.getStorageCryptType().  However, the caller of
  this method was removed by an earlier CL, so just remove this method.

- StorageManager.CRYPT_TYPE_* also have a user in
  packages/apps/Settings, but it is obsolete code that I'm removing in
  another CL.

Bug: 208476087
Change-Id: I41c684b69a97dbafac65d8f55db2c284d7a8dd70
2022-03-21 05:11:28 +00:00
Tiger Huang
3e194cc9fa Push drag-resize mode to the client
The goal of this CL is to remove RELAYOUT_RES_DRAG_RESIZING_DOCKED and
RELAYOUT_RES_DRAG_RESIZING_FREEFORM, which is a step to make relayout an
oneway binder call.

When the resize mode is changed at the server side, the server will send
the new mode to the client via IWindow#resized, so the client doesn't
need to obtain the resize mode from the flags returned from relayout.

Bug: 161810301
Test: Perform drag-resize and drag-move on a freeform task and see if
      there is any unexpected behavior.
Change-Id: I450abc113932b6c1dc0ce0e2b76bebdf85a60777
2022-03-20 14:36:19 +08:00
Kholoud Mohamed
a8e9aa390d Merge changes from topic "apiFeedback" into tm-dev
* changes:
  RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
  RESTRICT AUTOMERGE move device policy resource APIs to a separate class
  RESTRICT AUTOMERGE hide device policy resources constants
2022-03-19 06:30:43 +00:00
TreeHugger Robot
9451a7a61e Merge "Track latency for showing the back arrow." into tm-dev 2022-03-19 02:44:22 +00:00
kholoud mohamed
b7aedc6f3d RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
2022-03-19 00:22:17 +00:00
David Anderson
652c4bade6 Merge "Add PackageManager feature strings for EROFS." into tm-dev 2022-03-18 17:29:26 +00:00
TreeHugger Robot
34fba3edc7 Merge "Send SDK sandbox UID instead of app UID in battery stats push metrics" into tm-dev 2022-03-18 17:04:25 +00:00
Corina Grigoras
2907ec82ab Merge "Move UiEventLogger interface to modules-utils." into tm-dev 2022-03-18 14:19:43 +00:00
Joanne Chung
2081b5d040 Merge changes from topic "presubmit-am-08bbcb587d4e47b6afcc900c23899344" into sc-v2-dev am: 0f608efde9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17184230

Change-Id: I35d157de8376b43f4359cd7243d12973704bf893
2022-03-18 10:21:11 +00:00
Joanne Chung
0f608efde9 Merge changes from topic "presubmit-am-08bbcb587d4e47b6afcc900c23899344" into sc-v2-dev
* changes:
  Add hotword detection metrics.
  Add HotwordMetricsLogger for statistics logging.
2022-03-18 10:02:36 +00:00
David Anderson
dc362ffcc7 Add PackageManager feature strings for EROFS.
This adds two feature strings for EROFS, one for the legacy staging
version present in 4.19 kernels, and another for the official mainline
version present in later kernels.

Bug: 215725871
Test: manual test
Change-Id: Ic36424b578f985ef5a826c3a89c243720fecd0a6
Signed-off-by: David Anderson <dvander@google.com>
(cherry picked from commit 035cfec7d6)
2022-03-18 04:43:46 +00:00
Marco Gontijo
b4355a326f Send SDK sandbox UID instead of app UID in battery stats push metrics
Bug: 225204467
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: I68825c156d67c535978922015f62f2add2ec634d
2022-03-17 22:14:18 +00:00
Matt Casey
d9874f9851 Remove "Copied" toast from sharesheet.
No longer needed in T thanks to clipboard overlay.

Bug: 214616654
Test: manual
Change-Id: I75d43260ff320e831aff91d6686fc25455e88125
2022-03-17 17:18:41 +00:00
Richard Gaywood
3be5773ec9 Implement puller for new SurfaceFlinger dmabuf stats.
Involves pushing most of the logic down out of StatsPullAtomService
and into KernelAllocationStats.cpp, as well as changing some method
signatures along the way.

At the end of this work, two new fields in atoms.proto will be
populated; these will allow us to tell how much of SurfaceFlinger's
dmabuf memory usage is due to buffers shared with other processes
and how much is due to private internal buffers.

Test: statsd_testdrive 10105
Test: adb shell dmabuf_dump
Bug: 220084049
Change-Id: Ia41cfd693d3db2bd06083801075cae290f67221f
2022-03-17 12:07:09 +00:00
Joanne Chung
28faf49c0b Add hotword detection metrics.
Bug: 207717787
Test: build & boot pass.
Test: manual. Both trust and no-trust still work.
Test: manual. In nornal case, log with expected values, see bug for
details. Log expected value for some error cases (not all are tested)
by local changes.

Android Metrics Design Review : eldar/276723226

Merged-in: Iaa778616eca4cfad83a94297d9cd6116bb9577e7
Change-Id: I98fde2467e09564569cdbf10b20e9defece65cbf
(cherry picked from commit e4b76fc200)
2022-03-17 19:36:08 +08:00
Andrei-Valentin Onea
c568c0d78e Merge "Treat allowlists differently for flattened apex" into tm-dev 2022-03-17 09:34:59 +00:00
Wu Ahan
332cf2b6d4 Merge "Mark instrument events of FrameTracker in the trace" into tm-dev 2022-03-17 02:00:24 +00:00
Andrei Onea
fd1c87c0a6 Treat allowlists differently for flattened apex
On devices which use flattened APEX, treat the allowlists as part of the
system image.

Test: m # lunch wembley_2GB-userdebug
Bug: 221862988
Change-Id: I1971a686aa111b396f9e694a74be70d758078423
2022-03-16 18:54:42 +00:00
Corina
cbc4d681e7 Move UiEventLogger interface to modules-utils.
This is so the soures can be accessed both fom framework and modules.
The implementation needs the local StatsLog, so cannot be reused.

Test: m
Test: atest SystemUITests
Test: make statsd_testdrive $ANDROID_HOST_OUT/bin/statsd_testdrive 90
Bug: 218862369
Change-Id: I27ebffa6817575f1377beb80f4092287d9b12c49
Merged-In: I27ebffa6817575f1377beb80f4092287d9b12c49
2022-03-16 18:41:11 +00:00
Pablo Gamito
e0ce996ecc Use new T activity transitions in legacy
Use the same animations in legacy as in shell now that we support edge extension and showBackground animation APIs in legacy as well

Bug: 218687242

Test: Check that the new T animations run as expected
Change-Id: I1a22b41661f085efa635929a6ddd1bbf52bdef4d
2022-03-16 17:14:43 +00:00
Wu Ahan
7f57784720 Mark instrument events of FrameTracker in the trace
Mark deferMonitoring/begin/end/cancel/abandon events of FrameTracker.

Bug: 220281996
Test: See trace
Change-Id: I3d3eace0048c523c94311432cb96db8301015c0c
2022-03-16 19:44:02 +08:00
Shan Huang
c987d9b846 Track latency for showing the back arrow.
Bug: b/222407451
Test: m -j
Change-Id: Id96af97db97dc3f5648fbfd92aead12b5f62d949
2022-03-16 01:41:18 +00:00
Jared Duke
b68458f6cc Revert "Support downscaling of Drawable icons in LocalImageResolver"
Revert submission 17083643-large-icons-tm

Reason for revert: Speculative revert for android.app.cts.NotificationManagerTest breakage.
Reverted Changes:
Ib66933a8f:Size restrict right notification icon size
If3d871e78:Downscale large bitmaps in CachingIconView
I504694cb2:Support downscaling of Drawable icons in LocalImag...

Bug: 224768026
Change-Id: Icae8dfdfb89544f76a43a141b5f93271a03db360
2022-03-15 22:21:10 +00:00
Jared Duke
71cf617ef3 Revert "Downscale large bitmaps in CachingIconView"
Revert submission 17083643-large-icons-tm

Reason for revert: Speculative revert for android.app.cts.NotificationManagerTest breakage.
Reverted Changes:
Ib66933a8f:Size restrict right notification icon size
If3d871e78:Downscale large bitmaps in CachingIconView
I504694cb2:Support downscaling of Drawable icons in LocalImag...

Bug: 224768026
Change-Id: Iabb2d26899979aff25afa095baacd6bae12f6fde
2022-03-15 22:20:51 +00:00
Taran Singh
d98f037ab2 Finish handwriting session for recents gesture
Finish stylus handwriting session when user swipes to recent.
Bug: 223748964
Test: Manually:
     1. Open an app with editor
     2. swipe on editor with stylus [or emulated stylus]
     3. Observe ink trail drawn on screen
     4. quickly sipe to recents, ink should go away.
     5. repeat steps 1-3 for swipe to home

Change-Id: Id750ff55cb447247c3eca75daf37cb5aeb1d0cfa
2022-03-15 20:44:30 +00:00