Commit Graph

10289 Commits

Author SHA1 Message Date
Yasin Kilicdere
78719a9eba Merge "Remove allowedToRemoveOne boolean parameter from UM.getRemainingCreatableProfileCount()" 2022-02-04 17:00:43 +00:00
Etienne Ruffieux
c4837b1306 Merge "removed hidden Bluetooth permissions in BatteryStatsManager" 2022-02-03 19:27:06 +00:00
Etienne Ruffieux
df4be0287b removed hidden Bluetooth permissions in BatteryStatsManager
Tag: #feature
Bug: 200202780
Test: build
Change-Id: I477ec9e53ce1b945a40108ea018a42e3bcfeea32
2022-02-03 10:13:26 +00:00
Wenhao Wang
ec8c5511af Revert "Revert "User consent for Logcat data access""
This reverts commit d7138b445c.
This patch fixes the breaking caused by
commit b4f8ed9bb8.

It's a workaround patch. The upcoming patch will have solid fix.

Bug: 193708292
Bug: 217482811
Bug: 217495147
Test: atest PlatformRuleTests -- --abi x86_64
Test: atest FrameworksServicesTests -- --abi x86_64
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: If18086130599f0ae027d16ccbb7b5b5cd73f2e72
2022-02-02 16:08:19 -08:00
Artur Satayev
d8e72d1329 Merge "Introduce Build.VERSION.KNOWN_CODENAMES." am: 4db55d2f36 am: 5901c38224 am: d9e5f4369e am: c4dcf0c319
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1966780

Change-Id: Icae3207485650b94c5abd26325ddb639a8a40646
2022-02-02 18:11:23 +00:00
Yasin Kilicdere
7ac52f42d2 Remove allowedToRemoveOne boolean parameter from UM.getRemainingCreatableProfileCount()
Bug: 217364189
Test: atest android.multiuser.cts.UserManagerTest
Change-Id: Idebeab6407eb90967dcd0ebbcfaba4b76a8f1263
2022-02-02 17:43:45 +00:00
Artur Satayev
c4dcf0c319 Merge "Introduce Build.VERSION.KNOWN_CODENAMES." am: 4db55d2f36 am: 5901c38224 am: d9e5f4369e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1966780

Change-Id: Ib904befa95b89da857df5373033865a8e6c55c10
2022-02-02 17:33:44 +00:00
Artur Satayev
d9e5f4369e Merge "Introduce Build.VERSION.KNOWN_CODENAMES." am: 4db55d2f36 am: 5901c38224
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1966780

Change-Id: I67b6f324752123888993560ea484383b6b81f2e6
2022-02-02 17:19:00 +00:00
Artur Satayev
4db55d2f36 Merge "Introduce Build.VERSION.KNOWN_CODENAMES." 2022-02-02 16:52:37 +00:00
satayev
434ef186e6 Introduce Build.VERSION.KNOWN_CODENAMES.
See go/mainline-sdk-codenames-issue.

Known values are to be used to distinguish multiple pre-release
codenames, and to allow in development artifacts to be installable
on released versions of the platform for testing going forward.

This does not change pre-T behaviour at large however.

Bug: 211747008
Test: presubmit
Change-Id: I0c8df8e767ea61b27bb53da53fb6c9b2c842dbbc
2022-02-02 16:52:14 +00:00
Treehugger Robot
57a7b823d1 Merge "Support "Parcel.propagateAllowBlocking" for AIDL" am: bcefef7a8c am: 7d4245bc61 am: 4dbefbccd5 am: f1bc977e8d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1964223

Change-Id: Ie91a206e927a8c857cc3eb556b95bae5d49e89b3
2022-02-02 16:45:48 +00:00
Treehugger Robot
f1bc977e8d Merge "Support "Parcel.propagateAllowBlocking" for AIDL" am: bcefef7a8c am: 7d4245bc61 am: 4dbefbccd5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1964223

Change-Id: Ic9c06eb3bc13a2161454cc73e96e3cca2e8f6705
2022-02-02 16:25:50 +00:00
Treehugger Robot
4dbefbccd5 Merge "Support "Parcel.propagateAllowBlocking" for AIDL" am: bcefef7a8c am: 7d4245bc61
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1964223

Change-Id: I77917e4f9e7c29f93817bdc2fb96e051c4abfaa9
2022-02-02 16:21:40 +00:00
Treehugger Robot
bcefef7a8c Merge "Support "Parcel.propagateAllowBlocking" for AIDL" 2022-02-02 16:11:30 +00:00
Simon Bowden
9515833d64 Merge "Directly implement areAllEffectsSupported and areAllPrimitivesSupported rather than creating and throwing away an extra array to pass into the non-All version." 2022-02-02 13:00:25 +00:00
Shubham Dubey
b771f83365 Merge "Revert "User consent for Logcat data access"" 2022-02-02 12:11:21 +00:00
Shubham Dubey
d7138b445c Revert "User consent for Logcat data access"
This reverts commit b4f8ed9bb8.

Reason for revert: Breaking Dex2oatPressureRuleTest and PreRebootLoggerTest
BUG:217482811
BUG:217495147

Change-Id: I745de0dbcaa328918b5a1c58028471fd3d8ae0ab
2022-02-02 09:25:41 +00:00
Xiang Wang
0c20077d1f Merge changes from topic "convert_metadata"
* changes:
  Add allowGameFpsOverride intervention flag
  Introduce new game mode config xml resource file
2022-02-02 05:43:03 +00:00
Eun-Jeong Shin
813624d64d Merge "User consent for Logcat data access" 2022-02-02 04:18:38 +00:00
Jooyung Han
eadcb18d7e Merge "Add Parcel APIs for fixed-size array" am: aa16747474 am: 14b9e5e7da am: 3b606f3c91 am: 78eabfbcaf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1958141

Change-Id: I908bd99259ef6d47af0f0c1ca66fbe68703e4da9
2022-02-02 01:21:12 +00:00
Jooyung Han
78eabfbcaf Merge "Add Parcel APIs for fixed-size array" am: aa16747474 am: 14b9e5e7da am: 3b606f3c91
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1958141

Change-Id: I25cd86fc750eacbb7e6fe1ab9461236433865332
2022-02-02 01:03:46 +00:00
Jooyung Han
3b606f3c91 Merge "Add Parcel APIs for fixed-size array" am: aa16747474 am: 14b9e5e7da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1958141

Change-Id: Idcf39c703c900d003e8f70f2c78abaeccf4fa724
2022-02-02 00:45:14 +00:00
Jooyung Han
aa16747474 Merge "Add Parcel APIs for fixed-size array" 2022-02-02 00:12:49 +00:00
Makoto Onuki
a988435f43 Support "Parcel.propagateAllowBlocking" for AIDL
Bug: 216685683
Test: atest android.os.cts.ParcelTest
Change-Id: I9299632c8c4fd88afc6b539270c097b9c00188b3
2022-02-01 14:54:43 -08:00
Xiang Wang
7998c248cc Introduce new game mode config xml resource file
If the new resource file parser fail to parse the boolean values from
the resource file due to tag not found in manifest or missing file, the
existing metadata values will be used to populate pre-existing flags

Bug: 214448560
Test: atest GameManagerTest
Change-Id: I1543a1bb84379a2e9322a65d41e44fa6014821b9
2022-02-01 14:33:40 -08:00
eunjeongshin
b4f8ed9bb8 User consent for Logcat data access
The LogcatManagerService checks if logd access is coming
from background or foreground.

If the requester is foreground, the LogcatManagerService
generates a notification to get user consent. If the user grants access,
the LogcatManagerService approves logd access. If the user
does not grant access, the LogcatManagerService denies logd access.

If the requester is background, the LogcatManagerService waits
to observe process status change. If the
process status updates to foreground from background,
LogcatManagerService sends a notification to get user consent.
If the process remains background, the LogcatManagerService denies logd access.

This codebase is the continuity of the implementation ag/16618162 to
obtain user consent.

Bug: 193708292
Test: CtsVerifier
Ignore-AOSP-First: pending fix for logcat privacy issue

Change-Id: I4103c72daebdea5e8f04ab4901c05be2f1aefc84
2022-02-01 17:09:30 +00:00
Simon Bowden
5b14477dc9 Directly implement areAllEffectsSupported and areAllPrimitivesSupported
rather than creating and throwing away an extra array to pass into the
non-All version.

Test: presubmit
Change-Id: I8539e16272a591a193d846b490b02f72e95aba6a
2022-02-01 12:23:29 +00:00
Lais Andrade
c5743eeaf1 Merge "Add code examples to VibrationEffect javadocs" 2022-02-01 10:55:35 +00:00
Hui Yu
6bcc18f7ed Merge "Add WakeLock.setStateListener() API." 2022-02-01 01:01:06 +00:00
Lais Andrade
9742051b8a Add code examples to VibrationEffect javadocs
Update Composition and WaveformBuilder class javadocs to include code
snippets with examples of how to create effects with these classes.

Bug: 203785430
Test: N/A, javadoc updates only
Change-Id: Ie75cff326ca88a3d153d390f152ff1eed7687371
2022-01-31 17:19:06 +00:00
TreeHugger Robot
d42a4f09c6 Merge "Improve javadoc for some vibration functions." 2022-01-31 11:25:18 +00:00
Etienne Ruffieux
fa43f240c4 Merge "Moving bt stats logging to BatteryStats." 2022-01-29 10:27:49 +00:00
Hui Yu
a714924707 Add WakeLock.setStateListener() API.
WakeLock uses this API to add listener of type WakelockStateListener,
whenever framework enable/disable this wake lock, the onStateChanged()
callback on this listener is called.

This API can be called before or afte acquiring the wakelock. It can be
called multiple times to change to another listener.

Add test cases testNotifyWakeLockCallback() and
testNotifyWakeLockCallbackChange() in PowerManagerServiceTest.java.

Bug: 213925462
Test: atest cts/tests/tests/os/src/android/os/cts/PowerManager_WakeLockTest.java.
Change-Id: Ic59303c59e53eb974e2765e3036002ac97ce8aa5
2022-01-28 11:58:55 -08:00
Michael Wachenschwanz
288b4bc054 Merge "Collect fine grain time-in-state Modem durations" 2022-01-28 18:11:53 +00:00
Etienne Ruffieux
5166da8664 Moving bt stats logging to BatteryStats.
Tag: #feature
Bug: 211851706
Test: manual
Change-Id: I7e40b64eaa334792dd409837fb9f512714f65eec
2022-01-28 17:16:50 +00:00
TreeHugger Robot
6c84fb3d29 Merge "Include the new USAGE_CLASS_MEDIA in the UsageClass IntDef." 2022-01-28 13:20:10 +00:00
Robert Horvath
5dfac22224 Merge changes from topics "low-power-standby-api", "lps-wakelock-testapi"
* changes:
  Add API to configure LPS maintenance mode behavior
  Add TestApi to force Low Power Standby to be active
  Add TestApi wakelock flag to have system acquire wakelock
  Allowlist active voice interaction session from Low Power Standby
  Introduce Low Power Standby API and wakelock restrictions
2022-01-28 12:27:05 +00:00
Sailendra Bathi
00049d6db7 Merge changes from topic "bug209973853_ 213658045"
* changes:
  Make StorageVolume#getOwner public
  Add API getStorageVolumesIncludingSharedProfiles()
2022-01-28 04:35:11 +00:00
Robert Horvath
abb95aecf3 Add API to configure LPS maintenance mode behavior
Allow Low Power Standby to be active during doze maintenance modes.

Bug: 190822356
Test: atest LowPowerStandbyControllerTest
Change-Id: I6db6e1a37f48d63d618245f308ea1053c45fb64b
2022-01-27 23:08:32 +01:00
Robert Horvath
e57eb6d07e Add TestApi to force Low Power Standby to be active
Since Low Power Standby depends on multiple factors to activate,
including the private device configuration for the delay after the
device becomes non-interactive, having this TestApi makes testing
faster and more reliable.

Bug: 190822356
Test: atest LowPowerStandbyTest
Change-Id: I5a16083f996bd7421197b08c6632655c8c3d8c29
2022-01-27 23:08:32 +01:00
Robert Horvath
4845efb60d Add TestApi wakelock flag to have system acquire wakelock
Allows CTS tests to test power restrictions that disable wakelocks
without the system suspending (since system-wakelocks are exempt).

Bug: 190822356
Test: atest LowPowerStandbyTest
Change-Id: I91f44ae93480be992151d845175606fb66ecb127
2022-01-27 23:08:32 +01:00
Robert Horvath
287a3a7b94 Allowlist active voice interaction session from Low Power Standby
If a voice interaction session is started, then it should be allowed to
use the network & wakelocks unrestricted while it is ongoing, since it
is direct user interaction.

Bug: 190822356
Test: atest LowPowerStandbyControllerTest PowerManagerServiceTest
Test: With reference VIS: adb shell cmd voiceinteraction show
      To verify allowlist/wakelock state: adb shell dumpsys power
Change-Id: I63cd0cf2e97b574ba8fa6c6caa8f046cce2bb821
2022-01-27 23:08:32 +01:00
Robert Horvath
570645567f Introduce Low Power Standby API and wakelock restrictions
In Low Power Standby, additional restrictions are placed on apps that
are in a process state of FOREGROUND_SERVICE or less important
during standby (while the device is non-interactive):
- Wakelocks are disabled
- Network access is blocked
During doze maintenance windows the restrictions are lifted temporarily.

This change introduces the APIs for Low Power Standby, as well as
the wakelock restrictions.

This feature is targeting TVs. To prevent Low Power Standby from being
enabled on other devices, the feature is guarded by the config flag
config_lowPowerStandbySupported.

Bug: 190822356
Test: atest LowPowerStandbyControllerTest PowerManagerServiceTest
Ignore-AOSP-First: New permission only added internally for now.
Change-Id: Ia40f8a0fc4b366860af58ad76c988f93a5d41936
2022-01-27 23:08:26 +01:00
Dmitri Plotnikov
3bf8cdd5ef Merge "Optimize retrieval of attributed power by process state" 2022-01-27 21:49:00 +00:00
Simon Bowden
424dfc5c19 Include the new USAGE_CLASS_MEDIA in the UsageClass IntDef.
Bug: 207477604
Test: presubmit
Change-Id: I860a5ce3e3978c1936dd0cfad7f25dcc40aebaa1
2022-01-27 17:54:36 +00:00
Simon Bowden
03a52de384 Improve javadoc for some vibration functions.
This is only clarifying existing behavior. Focused on clarifying
what it means to not support an effect, as well as ambiguity in
descriptions of VibrationAttributes.

Test: presubmits, comments only
Change-Id: I7ab5d488d72a386aa2786fdaeb93fef55aaed71d
2022-01-27 17:20:39 +00:00
Yasin Kilicdere
189b76c231 Merge "Add APIs to UserManager for getting remaining user/profile counts." 2022-01-27 16:27:24 +00:00
Treehugger Robot
7a9eed7a6c Merge "Revert "Changing readParcelable and readSerializable's method signatures."" am: de1df073cb am: c75c2e1818 am: 50f0139d43 am: 41285faf9a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1960781

Change-Id: I158b6db9798b98c6b668d42b19c9a136b138e038
2022-01-27 13:58:11 +00:00
Treehugger Robot
41285faf9a Merge "Revert "Changing readParcelable and readSerializable's method signatures."" am: de1df073cb am: c75c2e1818 am: 50f0139d43
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1960781

Change-Id: I0b6fba539144748868f739c5ad5a6661fec11868
2022-01-27 13:45:37 +00:00
Treehugger Robot
50f0139d43 Merge "Revert "Changing readParcelable and readSerializable's method signatures."" am: de1df073cb am: c75c2e1818
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1960781

Change-Id: I106956bce8783a8f8719b80bf5885f1b7d48f241
2022-01-27 13:34:25 +00:00