Commit Graph

1890 Commits

Author SHA1 Message Date
tom hsu
e3027052d1 [Pnalingual] Default open for panlingual
- Make UI show on the settings by default.
 - Remove icon of system language entry.

Bug: 219384592
Test: local
Change-Id: I0d6dff0461d3e8c5cdfe1329cdd6592dd053ea43
2022-02-14 12:22:38 +08:00
Evan Rosky
0ef7951dee Merge "Hook up fixed-rotation logic to shell transitions" 2022-02-10 19:51:45 +00:00
Nikita Ioffe
130228bfe0 Promote Slog to @SystemApi(client = Client.MODULE_LIBS)
Bug: 218862380
Fixes: 218862380
Test: m
Change-Id: I8ae8968471130e87abff14593a992229e683b034
2022-02-10 16:30:17 +00:00
Evan Rosky
91a630b912 Hook up fixed-rotation logic to shell transitions
This works by separating an app launching to 2 phases
(similar to legacy fixed rotation). First it launches
the app into a different rotation. Once the animation
finishes it creates a new seamless display-rotation
transition.

Because we have displayRotation in windowconfiguration,
we can directly rotate a window's surface instead of
checking explicitly for fixedRotationState. Since the
second-phase is a transition, we don't (ab)use
seamlessRotator. Once the display lines-up, the
surfaces and configurations automatically update.

Since we still want to explore shell-transitions style
rotation (single-transition), add a system property
to turn it off and on.

Bug: 217560545
Test: existing tests and manual tests
Change-Id: I0b34b32ff5b2650a519d3c195df452de446cf515
2022-02-09 17:12:31 -08:00
Steven Ng
cd9b0794e8 Merge "Add feature flag to gate dark theme bedtime settings" 2022-02-09 10:25:28 +00:00
TreeHugger Robot
7fab305427 Merge "New API: DumpableContainer.removeDumpable." 2022-02-09 05:46:08 +00:00
Treehugger Robot
d20a9b29c5 Merge "Adds OWNERS to com.androd.util.Dump*" am: adeac26d27 am: 8b2b5eb434 am: 5a0ab52de4 am: d707b4d927
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976775

Change-Id: I8b1344f89272575da23be85b138b33a8a0fc7f2f
2022-02-09 05:08:03 +00:00
Treehugger Robot
d707b4d927 Merge "Adds OWNERS to com.androd.util.Dump*" am: adeac26d27 am: 8b2b5eb434 am: 5a0ab52de4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976775

Change-Id: I3c54539abad06a232a17a42b008d35d3f6c62e29
2022-02-09 04:56:11 +00:00
Treehugger Robot
5a0ab52de4 Merge "Adds OWNERS to com.androd.util.Dump*" am: adeac26d27 am: 8b2b5eb434
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976775

Change-Id: I64ffe6eac9439a3e67c01607d367a0978b5cae93
2022-02-09 04:45:48 +00:00
Felipe Leme
ab085b2792 Adds OWNERS to com.androd.util.Dump*
Test: no, thanks
Bug: 149254050

Change-Id: Ie7ca5bcba00177efde125246354a88cec29a38a4
2022-02-08 16:26:38 -08:00
Treehugger Robot
ed3eb039b8 Merge "Delete legacy fs-verity support" am: 81568fa22f am: b4661e274c am: b754030dbe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1966068

Change-Id: If68ccff8bad40fd9c74f38a7cd935a00c1575ba8
2022-02-08 01:50:05 +00:00
Treehugger Robot
b754030dbe Merge "Delete legacy fs-verity support" am: 81568fa22f am: b4661e274c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1966068

Change-Id: I797f197a29a811795fc5be5339be1afbde2e5fcd
2022-02-08 01:26:39 +00:00
Treehugger Robot
81568fa22f Merge "Delete legacy fs-verity support" 2022-02-08 00:48:19 +00:00
Felipe Leme
e5ae1783f8 New API: DumpableContainer.removeDumpable.
Test: m update-api
Test: atest com.android.internal.util.DumpableContainerImplTest

Bug: 149254050
Bug: 217567642
CTS-Coverage-Bug: 149254050

Change-Id: I4efe99a545bd3db2308d0956eaa85e0f799f0f1d
2022-02-07 22:59:23 +00:00
Treehugger Robot
885dd4472b Merge "Remove asapperstein from OWNERS." am: 06a35d9039 am: fa7a88e8fb am: 9997a8e895 am: d9666b1551
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1973059

Change-Id: I9e47a1284eaf625f6c5b405e1740bebe59a784f6
2022-02-07 17:36:36 +00:00
Treehugger Robot
d9666b1551 Merge "Remove asapperstein from OWNERS." am: 06a35d9039 am: fa7a88e8fb am: 9997a8e895
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1973059

Change-Id: I2551415ff2e70cccf437377d4f4d1e691b40f235
2022-02-07 17:21:44 +00:00
Treehugger Robot
9997a8e895 Merge "Remove asapperstein from OWNERS." am: 06a35d9039 am: fa7a88e8fb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1973059

Change-Id: I8ef42c647324ee150af0a85603b2cbb7ad7510ea
2022-02-07 17:05:36 +00:00
Felipe Leme
2eea07021e Changes Activity to use Dumpable for "legacy" cases.
Test: adb shell am start com.android.settings && adb shell dumpsys activity com.android.settings --autofill
Test: atest CtsAppTestCases:android.app.cts.ActivityDumpTest

Bug: 149254050

Change-Id: I658b18a965f3d35c3ecbb2aae58c7c7d7527c6e4
2022-02-04 15:39:13 -08:00
Andrew Sapperstein
aea112fe32 Remove asapperstein from OWNERS.
No longer on Settings, which was a team using FeatureFlagUtils.

Change-Id: I9c1c05b023021defcbce19ef500ddb13159caa87
2022-02-04 17:34:32 +00:00
Steven Ng
352566214e Add feature flag to gate dark theme bedtime settings
Hide dark theme bedtime settings from the settings because the
preinstalled Digital Wellbeing hasn't supported that yet.

Test: manually check the visibility of dark theme bedtime settings in
      the settings app after toggling the corresponding feature flag
Bug: 217866453
Change-Id: I71704bb6d09176e0854c527dc86a6a0041d01140
2022-02-04 13:28:43 +00:00
Victor Hsieh
e97a8700b0 Delete legacy fs-verity support
The "legacy" fs-verity was introduced in P in Pixel 3 kernel. During
fs-verity upstream to Linux, the API has changed. During Pixel 4 / Q
development, fs-verity was upstreamed to Linux kernel. By setting
ro.apk_verity.mode = 2, device vendors such as Pixel 4 can opt in to
enable the support. The feature has become mandatory for new devices
shipped with R.

Since Pixel 3 family is no longer supported, it's time to remove the
dead code.

Bug: 120629632
Test: m
Test: TH
Change-Id: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
Merged-In: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
2022-02-01 23:09:43 +00:00
kholoud mohamed
dc0bab518f Allow overriding enterprise badge drawables
Bug: 203548565
Bug: 188410712
Test: manual testing
Change-Id: Ibee6c28e8a231eab9c370af3065619c2dffa706a
2022-01-29 15:05:19 +00:00
TreeHugger Robot
bb93951990 Merge "Move CtsContentTestCases to group presubmit-large" into sc-dev am: a9a177e057 am: dd9121aaf6 am: 5150b2b56c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16709491

Change-Id: I7f5b843e8a7c1c944ffc088556c64889e781e84f
2022-01-27 19:05:33 +00:00
TreeHugger Robot
a325e1bd17 Merge "Move CtsContentTestCases to group presubmit-large" into sc-dev am: a9a177e057 am: dd9121aaf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16709491

Change-Id: Ibb755f0f754c230678d3bfecc41b6aa36f834c6b
2022-01-27 18:47:46 +00:00
TreeHugger Robot
5150b2b56c Merge "Move CtsContentTestCases to group presubmit-large" into sc-dev am: a9a177e057 am: dd9121aaf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16709491

Change-Id: I24513de281029178f2cdd9360ce87ed4d8eb210c
2022-01-27 18:47:46 +00:00
Calvin Pan
2801e6de4f Merge changes Ib484fc0c,I2b9ff69c,I0a31b117,I888c65c8,I03723cfe, ...
* changes:
  Clean <plurals> in DateTimeView
  Clean <plurals> in CertificateMonitor
  Clean <plurals> in FillUi
  Clean <plurals> in BugreportProgressService
  Clean <plurals> in keyguard
  Clean <plurals> in ChooserActivity
  Clear <plurals> in TextUtils
  Clean <plurals> in FindActionModeCallback
  Clean <plurals> in ZenModeConfig
  Add util class for plurals
2022-01-27 06:31:58 +00:00
Jing Ji
354efbc368 Merge changes from topic "bg_app_restrictions"
* changes:
  Expose the bg restriction exemption list as an internal API.
  Add an action button to the notification for bg battery abusive apps
  Exempt certain app behaviors for their background battery usage
  Add tracking on abusive broadcast and service binding requests
  Add exemption cases for app background restrictions
  Monitor long-running foreground services
  Post notification on abusive background current drain
  Allow limited alarms/jobs when background restricted
  Cap the LRU position of broadcast receivers in bg restricted apps
  Add a tracker on background current drains for each uid
  Add background restriction levels definition and its controller
2022-01-27 05:57:18 +00:00
Jing Ji
7271a9845b Exempt certain app behaviors for their background battery usage
If the app is hosting media playback or location foreground services,
or has active media session, the background battery usage during that
will be excluded from the abusive background battery usage monitoring.

Bug: 200326767
Bug: 203105544
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I7ddeffe3490608ee3f005af6f4722270756085a3
2022-01-25 15:23:26 -08:00
Jing Ji
627bbedd40 Add a tracker on background current drains for each uid
On detecting excessive battery usage of a background uid, we may
move the background restriction of the apps running in this uid to
more restrictive levels.

Bug: 200326767
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I6c2d41e44367a283d8aa9491be683018a80a810c
2022-01-25 14:33:12 -08:00
Victor Hsieh
1fb2d90296 Delete legacy fs-verity support
The "legacy" fs-verity was introduced in P in Pixel 3 kernel. During
fs-verity upstream to Linux, the API has changed. During Pixel 4 / Q
development, fs-verity was upstreamed to Linux kernel. By setting
ro.apk_verity.mode = 2, device vendors such as Pixel 4 can opt in to
enable the support. The feature has become mandatory for new devices
shipped with R.

Since Pixel 3 family is no longer supported, it's time to remove the
dead code.

Bug: 120629632
Test: m
Test: TH
Change-Id: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
2022-01-25 17:22:36 +00:00
Jing Ji
1507931e89 Add background restriction levels definition and its controller
This CL adds the definition of background app restriction levels.

The existing various system background app restriction features will
be mapped into the levels here, including app standby buckets,
background restrictions (forced-app-standby) etc. Future CLs may
apply restrictions to background apps accordingly.

BYPASS_INCLUSIVE_LANGUAGE_REASON=Legacy API name

Bug: 200326767
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: Icf82031c572e7b8e82e6528402e9df4de5b7a675
2022-01-24 18:34:48 -08:00
Jackal Guo
7172238add Move CtsContentTestCases to group presubmit-large
The test config takes longer than 900 seconds to run. Move it to a
dedicated group for running slow presubmit Test Mapping test.

Some more context is in the referenced bug, e.g, b/174495337
The group will work exactly the same as presubmit for now.

Bug: 174654670
Bug: 174495337
Fix: 215431363
Fix: 215549069
Test: treehugger
Change-Id: Id9769bbc625b42257af603d69098ae69c0fabb80
Merged-In: Id9769bbc625b42257af603d69098ae69c0fabb80
(cherry picked from commit ccc91c4fa9)
2022-01-24 23:45:31 +08:00
Calvin Pan
936a4e3687 Add util class for plurals
Bug: 199230228
Test: make
Change-Id: I5756846dcd10f17520afcc34bf23de0a45a2bcb9
2022-01-24 14:46:06 +08:00
Jason Chiu
b216e02ab9 Add a feature flag for settings_search_full_large_screen
Bug: 205079744
Test: manual
Change-Id: I040b3cc171e932014e8dca4d97c9018f190b9b17
2022-01-24 12:22:09 +08:00
Michael Wachenschwanz
90a6c03c8f Merge "Introduce modem element to power_profile.xml" 2022-01-21 10:08:12 +00:00
Dmitri Plotnikov
c830547fd1 Merge "Add SparseLongArray.incrementValue()" 2022-01-20 22:35:55 +00:00
Dmitri Plotnikov
bb925fb034 Add SparseLongArray.incrementValue()
This method is used for accumulation of long values: if
the key does not exist, one is created.  If one already exists,
the passed value is added to the previous value.

This method is similar to the existing
SparseDoubleArray.incrementValue() method

Bug: 215427055
Test: atest FrameworksCoreTests:SparseLongArrayTest
Change-Id: I771d9bc2bdd12ca4260b20186ced70f5862b6f56
2022-01-19 18:20:29 -08:00
Bernardo Rufino
1a5cb387d6 Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""
This reverts commit 331be9a643.

Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).

Original commit message:

Migrate unsafe parcel APIs in framework-minus-apex

Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
2022-01-19 11:13:18 +00:00
Winson
efbb319630 Move package parsing to services.jar
This facilitates exposing the Parsed_ classes as
@SystemApi(client = SYSTEM_SERVER) while keeping everything inside
services.jar rather than having it split across both jars.

This reverts getPackageArchiveInfo to use legacy PackageParser, since
framework.jar can no longer access the moved classes.

Bug: 214038417

Test: presubmit, no logic changes

Change-Id: I152d70fb4f643d32efb012cfb20b0fbc5f88f2d8
2022-01-18 12:47:45 -08:00
Felipe Leme
bcafba3a1f Creates a generic mechanism to dump app-side information.
Currently, 'dumpsys activity' can dump the state of some managers:
 - AutofillManager
 - ContentCapturemaanger
 - UiTranslationController

But the support for these custom dumping is hardcoded into
Activity itself, which makes it harder to extend. For example,
automotive builds provide an app-side Car object, which currently
cannot be dumped.

This CL makes the mechanism more flexible by providing a couple new
public / SystemAPIs that let Automotive (or other mainline modules)
extend it.

Examples:

$ adb shell dumpsys activity com.android.car.carlauncher/.CarLauncher --list-dumpables
$ adb shell dumpsys activity com.android.car.carlauncher/.CarLauncher --dump-dumpable CarUserManager
$ adb shell dumpsys activity service com.android.systemui/.SystemUIService CarUserManager

NOTE: this CL only adds the new APIs; a follow-up CL will change the
existing managers to use them.

Test: see above
Test: m update-api

Bug: 149254050
CTS-Coverage-Bug: 149254050

Change-Id: I6920ff3542d3d75edd667c2c7658e9d0a7af534f
2022-01-13 11:43:13 -08:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
Michael Wachenschwanz
b4c244ceb2 Introduce modem element to power_profile.xml
Also, introduce ModemPowerProfile to handle the data in the modem
element.

Bug: 207697945
Test: atest PowerProfileTest

Change-Id: I6f692106309644a1b9a6d4ad2adc9eb08a598b26
2022-01-11 14:34:43 -08:00
TreeHugger Robot
66eca70ab0 Merge "Change close guard logged messages" 2021-12-21 15:55:19 +00:00
Ioannis Ilkos
0bde67ab00 Change close guard logged messages
Unless we are looking at stack traces (e.g. from strict mode) it's not
possible to identify which type of object is not being closed (most
methods are 'close' or 'release). Change the logged text to clarify.

Change-Id: Ib90eac716f43c2c2caf8d8c6fb64a7bd90562da9
Test: manual
2021-12-21 11:46:10 +00:00
Zoey Chen
ca44a97a4f Merge "[ProviderModel] Internal cleanup, remove the Provider Model flag" 2021-12-20 15:27:26 +00:00
Zoey Chen
29c2e807e0 [ProviderModel] Internal cleanup, remove the Provider Model flag
Bug: 197066557
Test: atest TileServicesTest, atest TileQueryHelperTest, atest QSTileHostTest, atest NetworkControllerDataTest, atest NetworkControllerSignalTest
Change-Id: Ic88255873fe6ed8ac3e8b0a1368e9a7f480b09ff
2021-12-17 13:08:12 +00:00
Bernardo Rufino
90bb3709dc Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
2021-12-15 18:21:38 +00:00
Jing Ji
162bf7f024 Merge "Add settings to toggle the phantom process monitoring in dev options" into sc-v2-dev am: 1a789dc532
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16463227

Change-Id: I88d048fb2f44aa1f838cad7935ad42f087f9487e
2021-12-14 23:26:48 +00:00
Jing Ji
09dcdad5eb Add settings to toggle the phantom process monitoring in dev options
For power users, the monitoring on phantom processes could be turned
off from the Settings->Developer Options->Feature flags.

Bug: 210353231
Bug: 205156966
Test: Manual
Test: atest AppChildProcessTest
Test: atest CtsAppTestCases:ActivityManagerTest
Change-Id: I05f5b43e281b98676c615d350c213620d3d72b5c
Merged-In: I05f5b43e281b98676c615d350c213620d3d72b5c
2021-12-14 06:42:43 +00:00