Commit Graph

10505 Commits

Author SHA1 Message Date
Robert Horvath
fdea83b5b3 Merge "Don't poke user activity when dream ends" 2022-03-30 12:57:36 +00:00
Jooyung Han
7c05a983e7 Merge "Fix Parcel.writeFixedArray javadoc" am: 3337082dec am: 13cd8e4f59 am: bfcb72d582 am: f0759689a9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2045075

Change-Id: Ib5cfae3f982a321037fc9f64ceb767d43a2335f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 19:15:47 +00:00
Jooyung Han
f0759689a9 Merge "Fix Parcel.writeFixedArray javadoc" am: 3337082dec am: 13cd8e4f59 am: bfcb72d582
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2045075

Change-Id: Id8339ca4e794b4816f4ba8d84f06fb579dbfcc01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 15:33:50 +00:00
Jooyung Han
906819c815 Fix Parcel.writeFixedArray javadoc
Reference to createFixedArray shoudl be escaped. Otherwise resulting
html renders as <s>(strikethrough) tag.

Bug: 227007069
Test: m online-sdk-docs
  and see if ./reference/android/os/Parcel.html works ok
Change-Id: I7a3b447cbeddd8d66ca1733dc8d115c61ece2509
2022-03-26 20:00:29 +09:00
kholoud mohamed
284246f7e6 RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
(cherry picked from commit b7aedc6f3d)
Merged-In: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
2022-03-25 16:14:51 +00:00
Jackal Guo
62f7b52786 Merge "Remove unused PackageManagerNative APIs" 2022-03-25 00:25:55 +00:00
Kedar Chitnis
dd5c440802 Revert "Guest mode updates to resolve privacy concerns in guest mode"
Revert "Guest mode UX flow updates to user settings"

Revert submission 16545010-kedarc-ephemeral-guest

Reason for revert: A conflicting CL got merged after presubmits were triggerred, will rebase and push again
Reverted Changes:
I86a5a1571:Guest mode updates to resolve privacy concerns in ...
I7cf205883:Guest mode UX flow updates to user settings

Change-Id: I91093a241f31a82f427be24d03e6c922779ceed0
2022-03-24 12:45:25 +00:00
Kedar Chitnis
d96ba2dee5 Guest mode updates to resolve privacy concerns in guest mode
- Add API in IUserManager to allow setting ephemeral user flag
- Implement and export this API in UserManagerService and UserManager
- Set guest as ephermal by default when createGuest in UserManager is called
- Handle guest user switching in UserSwitcherController for the case
  of dynamic change of ephemeral state
- Add persistant notification when in guest mode to indicate
  - if guest session is new or previously used.
  - if guest session will be cleared on exit or not
- Add buttons in persistant notification to reset or exit guest
- Add flags to enable/disable this feature

Bug: 214031645
Screenshots: go/ephemeral-guest-b-214031645-ux
Test: Manual test using sunfish, atest SystemUITests, atest SettingsRoboTests
Change-Id: I86a5a15715cc6dde0eae93d38cd1c5cef33d7c67
2022-03-24 04:28:45 +00:00
Robert Horvath
7592e0073d Don't poke user activity when dream ends
The dream may end for various reasons, including some that do not
represent user activity, such as app crashes or the app being updated.
In these cases, the user activity should not be poked, as this would
reset the inattentive sleep timer.

Bug: 215559033
Test: atest PowerManagerServiceTest
Test: Kill dream app, observe `dumpsys power` lastUserActivityTime
Test: Kill dream app, verify inattentive sleep timer not affected
Change-Id: If9b61cab3d5e21b89f3c0ab7fe541d46bc865f97
2022-03-23 13:00:34 +01:00
Jerome Gaillard
b5413cbc4f Merge "Read-only properties can have values of arbitrary length" am: 329f25d91a am: f589cf9955 am: b2869273bb am: 59ce0178fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2036307

Change-Id: I719766ad7c780d39d9a1bbab15c3c5f9512877f4
2022-03-23 11:32:07 +00:00
Jerome Gaillard
59ce0178fa Merge "Read-only properties can have values of arbitrary length" am: 329f25d91a am: f589cf9955 am: b2869273bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2036307

Change-Id: Ic92ddb1194fe927607bcb315ffbf86b6a1d23b6b
2022-03-23 11:16:22 +00:00
Jerome Gaillard
329f25d91a Merge "Read-only properties can have values of arbitrary length" 2022-03-23 10:21:15 +00:00
Eric Biggers
ef03435ebf Merge "Stop using FDE-related constants from IVold" am: 489ba5ac07 am: 84f05b1b9c am: e1a9ca0ec8 am: 3abc52220b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2031025

Change-Id: I4f2322c1d89d96b2579f0126e876de9a1a48fee4
2022-03-22 18:32:35 +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
Nikita Ioffe
f9c71c991e Merge "Remove TRACE_TAG_APEX_MANAGER" into tm-dev am: 2da047710d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17320803

Change-Id: Ia63c07aa7662ef6d586a8d9e2ecde4503b2c79a3
2022-03-22 15:59:38 +00:00
Nikita Ioffe
2da047710d Merge "Remove TRACE_TAG_APEX_MANAGER" into tm-dev 2022-03-22 15:53:59 +00:00
Jerome Gaillard
069f22cf0c Read-only properties can have values of arbitrary length
Read-only properties are defined by having a key starting with "ro.".

Bug: 226123443
Change-Id: Ic91e0b7d57e614b620e5147f96356ffd7154daa2
2022-03-22 15:16:45 +00:00
TreeHugger Robot
1d6ce68e7c Merge "Add flag to refresh of user vibration settings before vibrating" into tm-dev am: ff063eb689
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17293184

Change-Id: Ife869c20bbd67ed797ce48b81059d393b34cea26
2022-03-22 14:43:37 +00:00
TreeHugger Robot
ff063eb689 Merge "Add flag to refresh of user vibration settings before vibrating" into tm-dev 2022-03-22 14:42:43 +00:00
Nikita Ioffe
e4f87d302e Remove TRACE_TAG_APEX_MANAGER
It's value is equal to the TRACE_TAG_PACKAGE_MANAGER, and it is only
used in the single place in ApexManager.java, while the rest of
ApexManager.java is using a correct TRACE_TAG_PACKAGE_MANAGER tag.

Bug: 191178460
Test: m
Test: presubmit
Change-Id: Icb2d5d0db0a33c73e6d7d28f352e66b3d5782eab
2022-03-22 11:18:21 +00:00
Adam Bookatz
4ee6144536 Merge "Relax permissions for isUserOfType, isUserNameSet" into tm-dev am: 56996833f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17073401

Change-Id: I4cbc346ad7dab2b6d9d168658e4b503fc1b520ef
2022-03-22 02:41:43 +00:00
Adam Bookatz
56996833f7 Merge "Relax permissions for isUserOfType, isUserNameSet" into tm-dev 2022-03-22 02:33:54 +00:00
Lais Andrade
4668cc8505 Add flag to refresh of user vibration settings before vibrating
Add hidden flag to VibrationAttributes that enforces the service to
refresh the cached user settings values before vibrating with the given
effect. This allows user settings to apply this to vibratins played as
preview of new intensities set by the slider.

This solution still requires the Settings to update the user intensity
before playing the preview, but it doesn't bypass any user settings or
policies in order to play the preview, avoiding a shortcut that could be
used to enforce vibrations without user control.

This setting is also applied to external vibrations, which could be used
to preview haptics instead if a prebaked effect. It also applies to
ringer mode, that is now cached by the service instead of queried on
each vibrate call.

Fix: 219693646
Fix: 219695212
Fix: 157533521
Test: VibrationSettingsTest & VibratorManagerServiceTest
Change-Id: I605ccd2a4a3b89f1ba5bc86d8f3f64dd6d2714eb
2022-03-21 18:33:37 +00:00
Artur Satayev
473b764e00 Merge "Fix KNOWN_CODENAMES javadoc to mention that all codenames are there." into tm-dev am: ca5c0898bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17220883

Change-Id: Ie97d5e66708b350b2f6f600d9b8b5e838a1b0d0f
2022-03-21 13:47:47 +00:00
Artur Satayev
ca5c0898bf Merge "Fix KNOWN_CODENAMES javadoc to mention that all codenames are there." into tm-dev 2022-03-21 13:45:10 +00: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
Lee Shombert
3283d252b0 Merge "Formally define allowable IpcDataCache modules" into tm-dev am: 299a36c3c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17187931

Change-Id: I1147ef69417e4c9fc17a12137fe448d4b7bced44
2022-03-19 15:23:56 +00:00
Lee Shombert
299a36c3c0 Merge "Formally define allowable IpcDataCache modules" into tm-dev 2022-03-19 15:16:53 +00: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
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
Lee Shombert
a1953c28f4 Formally define allowable IpcDataCache modules
Bug: 219609105

The allowable IpcDataCache modules are formally defined as a
@StringDef.  There is no change to the system APIs.

A future change may subdivide the SYSTEM module into small,
feature-specific modules, such as package manager and user manager.

Test:
 * atest FrameworksCoreTests:IpcDataCacheTest
 * atest CtsOsTestCases:IpcDataCacheTest

Change-Id: I15e358723a36b76c384ccfb70bed63e80d57c4c7
2022-03-18 21:21:36 +00:00
Eric Biggers
ec56282d41 Merge "Remove support for converting from FDE to FBE" am: 855ec2d31a am: 6a72370d4b am: 071a3b1820
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2027583

Change-Id: I7949c7f4b4d62f8a38563b2705995cefa69cedaa
2022-03-17 22:57:31 +00:00
Eric Biggers
bf9e19c56c Remove support for converting from FDE to FBE
Devices that launched with Android 10 or later require FBE (File Based
Encryption) from the beginning, so there's no need to support converting
to FBE after the fact anymore.  This was only ever a developer option,
so it probably wasn't used much.  And in any case, it's not used
anymore, as isConvertibleToFBE() is hard-coded to return false.  Besides
the fact that FBE has been required for several releases now, this
functionality was only ever available on devices that use FDE (Full Disk
Encryption), but FDE support has been removed from Android.

Therefore, remove this unused code.

Bug: 208476087
Change-Id: I1f56c8e05fb3fba09aab4bf5f8609b0f552b8999
2022-03-16 23:17:11 +00:00
satayev
82d33f26f9 Fix KNOWN_CODENAMES javadoc to mention that all codenames are there.
Bug: 220153433
Test: atest BuildTest
Change-Id: I93cade7cb11e34557445b74d1e1841508061d616
2022-03-16 14:33:53 +00:00
Jackal Guo
4cd70ac4c8 Remove unused PackageManagerNative APIs
These APIs was used by IORAP, and some of them aren't well protected.
Since IORAP are removed from Android, removing these APIs to mitigate
the vunlerability.

Bug: 213903886
Test: build
Test: manually using the PoC in the buganizer to ensure the symptom
      no longer exists.
Change-Id: I3e6c9e74476f2a3621a223bbc4851927ddc3d619
2022-03-16 16:48:06 +08:00
Eric Biggers
6a8f891205 Merge changes from topic "remove-auth-token"
* changes:
  Remove HardwareAuthToken parameter from unlockUserKey
  Remove HardwareAuthToken parameter from clearUserKeyAuth
  Remove HardwareAuthToken parameter from addUserKeyAuth
  Don't pass HardwareAuthToken to unlockUser() in non-SP verifyCredential
  Remove non-SP based setLockCredentialInternal()
  Remove HardwareAuthToken support from FakeStorageManager
2022-03-15 21:33:26 +00:00
Steven Moreland
e9889e0fc1 Merge "ParcelableHolder: assert stability on read" am: 180aa227f6 am: a9febdf125 am: 6f2efc48ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2020960

Change-Id: I708ea16d3907e8bde822c5cf370ae0a66355c1a5
2022-03-15 18:16:49 +00:00
Eric Biggers
841350e6ac Merge changes from topic "remove-fde"
* changes:
  Remove unused FDE methods from StorageManager
  Stop checking FDE password cache
  Remove checks for FDE in 'adb backup'
2022-03-15 17:23:08 +00:00
Michael Wachenschwanz
98a2f3a88b Merge "Fix units is getActiveRadioDuration documentation" into tm-dev 2022-03-15 17:06:05 +00:00
Steven Moreland
180aa227f6 Merge "ParcelableHolder: assert stability on read" 2022-03-15 17:00:57 +00:00
Mayank Garg
e8688b5353 Merge "Improved error code for Remove Result" into tm-dev 2022-03-15 02:08:04 +00:00
Michael Wachenschwanz
3f53035561 Merge "Smear ModemActivityInfo across multiple stats" into tm-dev 2022-03-15 01:26:33 +00:00
Eric Biggers
95792478f1 Remove HardwareAuthToken parameter from unlockUserKey
Due to the migration to synthetic passwords, the 'token' parameter to
unlockUserKey() is no longer needed.  Remove it.

Note: I didn't change unlockUser() in IActivityManager because it is
marked with UnsupportedAppUsage, so it might not be safe to change the
method signature.  It now just ignores the 'token' parameter rather than
passing it down the stack.

Test: atest com.android.server.locksettings
Bug: 184723544
Change-Id: I35ce09412f47f2f2a17a371d518a0a518b70bfb6
(cherry picked from commit b1bcec9c7d)
Merged-In: I35ce09412f47f2f2a17a371d518a0a518b70bfb6
2022-03-15 01:26:01 +00:00
Eric Biggers
d04de5ce97 Remove HardwareAuthToken parameter from clearUserKeyAuth
Due to the migration to synthetic passwords, the 'token' parameter to
clearUserKeyAuth() is no longer needed.  Remove it.

Test: atest com.android.server.locksettings
Bug: 184723544
Change-Id: I739b519b0e91293acbf018020891d68b3090c175
(cherry picked from commit 2a8ab47782)
Merged-In: I739b519b0e91293acbf018020891d68b3090c175
2022-03-15 01:25:57 +00:00
Eric Biggers
5eb0659999 Remove HardwareAuthToken parameter from addUserKeyAuth
Due to the migration to synthetic passwords, the 'token' parameter to
addUserKeyAuth() is no longer needed.  Remove it.

Test: atest com.android.server.locksettings
Bug: 184723544
Change-Id: I06e7c36787cc7f384acb7742737c3b1cfa50f0ae
(cherry picked from commit 6b220a95e9)
Merged-In: I06e7c36787cc7f384acb7742737c3b1cfa50f0ae
2022-03-15 01:25:51 +00:00
Eric Biggers
0bc49e6fc3 Remove unused FDE methods from StorageManager
Now that FDE is no longer supported, remove the FDE-related methods from
StorageManager that are no longer called.

Bug: 208476087
Change-Id: Ic24a5b029bdf51dec622d1b70cef9ef26c3d54c5
(cherry picked from commit 41fa601601)
Merged-In: Ic24a5b029bdf51dec622d1b70cef9ef26c3d54c5
2022-03-14 23:04:00 +00:00
Eric Biggers
e945bd62d6 Merge changes from topic "remove-fde" into tm-dev
* changes:
  Remove unused FDE methods from StorageManager
  Stop checking FDE password cache
  Remove checks for FDE in 'adb backup'
2022-03-14 23:03:22 +00:00
Michael Wachenschwanz
a3d930691e Fix units is getActiveRadioDuration documentation
Bug: 207697945
Test: n/a
Change-Id: Ie6d2846fe37962e6ce87c0bf35c5ee463b110901
2022-03-14 15:26:22 -07:00
Michael Wachenschwanz
be79640cb0 Smear ModemActivityInfo across multiple stats
If ModemActivityInfo is available on a device, smear the provided
transmit and received times across RadioAccessTechnology and frequency
(for NR RAT).

Bug: 207697945
Test: atest BatteryStatsNoteTest
Change-Id: Ifb4e30dc3fa5ac5dd4824a87a7a86c4a0d14d019
(cherry picked from commit e85ac3239e)
2022-03-14 15:16:15 -07:00
Dmitri Plotnikov
b79d6441df Merge "Track CACHED procstate in BatteryStats" into tm-dev 2022-03-14 19:42:07 +00:00