Commit Graph

14608 Commits

Author SHA1 Message Date
Dmitri Plotnikov
38daff3ce2 Add binder call stats tracking for individual UID
Test: $ adb shell cmd binder_calls_stats --work-source-uid <UID>
followed by
$ adb shell dumpsys binder_calls_stats
or
$ adb shell dumpsys binder_calls_stats --work-source-uid <UID>

Change-Id: I8e7d8d4b50b4bd068ad13cbdc75bd87b8c25e7a6
2020-08-05 17:33:43 -07:00
Dmitri Plotnikov
1a33ace694 Merge "Implement a PowerCalculator to attribute system service power to apps" 2020-08-05 18:15:16 +00:00
Hongwei Wang
c32b547d01 Migrate PiP logs to UiEvent
Per go/uievent, migrated PiP logs to UiEvent and also in this change
- Deprecates counterpart proto definitions in metrics_constants
- Record PiP logs from SysUI only, deprecates what's used to be in WM

Changes to the actual logging
- No longer logs the actual aspect ratio
- Disables logging the change of aspect ratio since there are flood of
  events can trigger this
- Splits menu visibility log to SHOW_MENU and HIDE_MENU
- Splits removal of PiP to TAP_TO_REMOVE and DRAG_TO_REMOVE
- No longer logs supportsEnterPipOnTaskSwitch
- Adds new RESIZE logging

Bug: 147508020
Test: $ANDROID_HOST_OUT/bin/statsd_testdrive -terse 90
Change-Id: I805d16ae6f30c07270b743f7ae1e66cbbd121131
2020-08-04 14:07:25 -07:00
Dmitri Plotnikov
6c3defc282 Implement a PowerCalculator to attribute system service power to apps
Test: atest FrameworksCoreTests:com.android.internal.os.SystemServicePowerCalculatorTest
Test: atest FrameworksCoreTests:com.android.internal.os.SystemServerCpuThreadReaderTest
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsBinderCallStatsTest
Bug: 158232997

Change-Id: I14f6527524d6c32de460d80b33dfa0d6c0ad863c
2020-08-04 18:01:58 +00:00
Jack Yu
cb631bcf15 Merge changes from topic "refactor_pdcs"
* changes:
  Refactored precise data connection state
  Added hashcode for ApnSetting class
2020-08-03 22:54:50 +00:00
Ryan Mitchell
5fa0c6d621 Merge "OMS: Add config_signature policy handling" 2020-08-03 14:14:41 +00:00
Christian Wailes
1a08982881 Merge "Rename blacklist to denylist" 2020-08-03 14:02:47 +00:00
Orion Hodson
6f379f0346 Merge "Update art-team members in OWNERS files" am: 63ceb6abdb am: be3aeabfef am: 489aa7f7a2 am: fb84aa69d3 am: 181934aa7e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1376496

Change-Id: Ibbededd570645c4d6619c37406e1b160b8cfa77d
2020-08-03 10:16:15 +00:00
Orion Hodson
181934aa7e Merge "Update art-team members in OWNERS files" am: 63ceb6abdb am: be3aeabfef am: 489aa7f7a2 am: fb84aa69d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1376496

Change-Id: I15a51e9275717d184ba410ce1f963b3898123e1c
2020-08-03 09:53:57 +00:00
Orion Hodson
fb84aa69d3 Merge "Update art-team members in OWNERS files" am: 63ceb6abdb am: be3aeabfef am: 489aa7f7a2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1376496

Change-Id: I3aa4516eb8a4785eacb61b7dec2dc6401915a466
2020-08-03 09:30:37 +00:00
Orion Hodson
489aa7f7a2 Merge "Update art-team members in OWNERS files" am: 63ceb6abdb am: be3aeabfef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1376496

Change-Id: If52c858195b9619511e400567911e52b9c6004dc
2020-08-03 09:04:48 +00:00
Orion Hodson
63ceb6abdb Merge "Update art-team members in OWNERS files" 2020-08-03 08:18:39 +00:00
Charles Chen
1a364965ee Merge "Annotating context in framework base" 2020-08-03 06:13:18 +00:00
Charles Chen
6591174401 Annotating context in framework base
Bug: 151414704
Test: build & run
Change-Id: I42c8ab699433c51158a1af201da0521413d74dcd
2020-08-03 11:36:54 +08:00
Jack Yu
34a09a4cbd Refactored precise data connection state
Instead of triggering the data connection state changed
event from outside, now the event is triggering from
DataConnection. Whenever detecting data connection
state changes, the event will be triggered. This significantly
reduced the unnecessary redundant events sent to telephony registry,
even though it has a duplicate detection mechanism.

This are also two behavioral changes.

1. Previously if a data connection supports multiple APN types,
there will be multiple data connection state changed event for
each APN type. Now there is only one. The listener should use
PreciseDataConnectionState.getApnSetting().getApnTypeBitmask()
to check which APN types this data connection supports.

2. If setup data call fails before a data connection instance
can be created, there won't be any event with fail cause.

Fix: 161572838
Test: FrameworksTelephonyTests and manual
Change-Id: I9723d5284c2a8fbae9f63179dc30ddc42da1d0fc
2020-08-01 21:33:27 -07:00
repo sync -c -j8
05a35b1877 Rename blacklist to denylist
Test: no new test
Change-Id: If8bb7c923f1ce8d8ce8c3142bf1b674982a96573
2020-07-31 16:23:55 -07:00
Winson Chung
c927ebd73b Merge "Only apply back gesture device config if there are existing insets" into rvc-d1-dev am: f7a4faa241 am: 57b3d2aa49 am: 646b83f0ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12272603

Change-Id: I42d62d5ed2935f33b344c221dd7a330854ee8d8c
2020-07-31 17:10:25 +00:00
Winson Chung
646b83f0ba Merge "Only apply back gesture device config if there are existing insets" into rvc-d1-dev am: f7a4faa241 am: 57b3d2aa49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12272603

Change-Id: If3fdd3b1e6a428a8c2e790d5487ace71db467148
2020-07-31 16:53:01 +00:00
Winson Chung
57b3d2aa49 Merge "Only apply back gesture device config if there are existing insets" into rvc-d1-dev am: f7a4faa241
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12272603

Change-Id: I60642aa24d0d3ac575b4d4b9dd9ac1441a32fd48
2020-07-31 16:51:39 +00:00
Orion Hodson
c320cd0b89 Update art-team members in OWNERS files
Test: build/make/tools/checkowners.py -c -v frameworks/base/core/java/android/os/OWNERS
Test: build/make/tools/checkowners.py -c -v frameworks/base/core/java/com/android/internal/os/OWNERS
Test: build/make/tools/checkowners.py -c -v frameworks/base/core/jni/OWNERS
Test: build/make/tools/checkowners.py -c -v frameworks/base/services/core/java/com/android/server/pm/dex/OWNERS
Test: build/make/tools/checkowners.py -c -v frameworks/base/tests/BootImageProfileTest/OWNERS
Change-Id: I958c12aacf2c0c18df7505674a49103f89e5a770
2020-07-31 08:52:35 +01:00
Alexander Mishkovets
1de09a1080 Merge "Integrate system language filtering functionality" am: 2df94f9b15 am: db00e424d9 am: 654ed1df03 am: 2f5ddb2fc6 am: 1048aa0326
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362798

Change-Id: I2a934212c1c22690675691961e7b3ed035cca32a
2020-07-31 01:11:38 +00:00
Alexander Mishkovets
1048aa0326 Merge "Integrate system language filtering functionality" am: 2df94f9b15 am: db00e424d9 am: 654ed1df03 am: 2f5ddb2fc6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362798

Change-Id: I0c3b27d5319e9403a5f637fcecaf319aa5810bc9
2020-07-31 00:36:39 +00:00
Alex Salo
91bc0fdc61 Merge "Bind NotificationService with INCLUDE_CAPABILITIES" 2020-07-30 18:41:13 +00:00
Winson Chung
a8a07f1f40 Only apply back gesture device config if there are existing insets
Bug: 161995292
Test: Change navigation modes and verify the insets are correct
Change-Id: I4d940099b7fdc00c129f60dc6b3d0cb470b7f42e
2020-07-30 17:35:17 +00:00
Alex Salo
8ca31120bc Bind NotificationService with INCLUDE_CAPABILITIES
Bug: 162273210
Test: presubmit tests
Change-Id: I36af96e141704917e043b7899b8eb595018b00af
2020-07-30 09:24:56 -07:00
Alexander Mishkovets
654ed1df03 Merge "Integrate system language filtering functionality" am: 2df94f9b15 am: db00e424d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362798

Change-Id: I4684de9e0199b2d750108473366d04f605b6e955
2020-07-30 12:18:53 +00:00
Alexander Mishkovets
2df94f9b15 Merge "Integrate system language filtering functionality" 2020-07-30 11:44:00 +00:00
Alexander Mishkovets
77f6bc8951 Integrate system language filtering functionality
Filter system languages based on the configuration provided via
the corresponding system property.

Bug: 154133013
Test: manual; atest LocalizationTest
Change-Id: I7e4694f4b381ab81d0e8ceab97bad68bb266aaee
2020-07-29 10:16:24 +02:00
Zoran Jovanovic
9336d9e13b OMS: Add config_signature policy handling
Alongside SIGNATURE and ACTOR_SIGNATURE policies, add CONFIG_SIGNATURE
policy to overlayable that overlay fulfills if it is signed with the
same certificate as the reference package whose package name is
declared in 'config-signature' tag of SystemConfig and is vetted by
OMS that it's a system pre-installed package.

BUG: 158726924
TEST: regular aapt2, idmap2, OMS tests

Change-Id: I645ee72271496008742886274be0d63a2985201b
2020-07-28 18:30:53 +00:00
TreeHugger Robot
490f35034e Merge "Remove references to system-user-whitelisted-app" 2020-07-24 16:37:04 +00:00
Treehugger Robot
40a0100db8 Merge "Introduce uses-native-library tag" am: e6c21e2ea8 am: 64f6fa6fb9 am: 41521641c1 am: 590462e110
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372059

Change-Id: I46f8c3e9c8335c82fec61725faa25bb3675fc54d
2020-07-24 10:51:22 +00:00
Treehugger Robot
41521641c1 Merge "Introduce uses-native-library tag" am: e6c21e2ea8 am: 64f6fa6fb9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1372059

Change-Id: I9b4ee8e42ff69cf616c75588e943fa54d0aaf87c
2020-07-24 10:40:38 +00:00
Soonil Nagarkar
e76bbe2da2 Merge "Assorted cleanup and refactoring" 2020-07-24 03:34:19 +00:00
Jiyong Park
3b535c2d56 Introduce uses-native-library tag
This is a partial cherry-pick of
Iceb038aa86872d23e9faf582ae91b1fdcaf5c64c from the internal gerrit.
Cherry-picking to AOSP is needed to have other changes (art) in the
public repo.

The entire change will be merged along with the S release.

Bug: 142191088
Test: m

Change-Id: I13ccbe88be77258bcf1a71e33ab5560796fb605f
Merged-In: Iceb038aa86872d23e9faf582ae91b1fdcaf5c64c
2020-07-24 08:13:51 +09:00
Soonil Nagarkar
afec5ccf72 Assorted cleanup and refactoring
Will minimize future changes:
-Never return null GpsStatus to avoid breaking legacy clients
-Allow null location callback complete callbacks
-Return void from sendExtraCommand
-Combine appops and permissions checks into a single helper
-Allow passive provider to remember last locations even when there is
no active passive request.
-Add a couple new injectable helpers to support future changes along
with fakes for testing.

Test: presubmits + manual
Change-Id: If22bee787c5ab5c8c09d20e4742a8b5d1b7f0b59
2020-07-23 13:50:15 -07:00
Fabian Kozynski
9c3312c60a Add back privacy chip am: d074a54435
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12088484

Change-Id: Ie5210c9884715d104ca9be0ae37d39a44f7d80a6
2020-07-23 14:05:49 +00:00
Jiyong Park
5a63c65998 Merge "Introduce uses-native-library tag" 2020-07-23 08:56:41 +00:00
TreeHugger Robot
dd349767cb Merge changes from topic "privacy_chip_master"
* changes:
  Restricts notified app ops based on flags
  Add back privacy chip
2020-07-22 20:03:10 +00:00
Fabian Kozynski
882116eea1 Add back privacy chip
This adds back the privacy chip classes (Controller and view).

Change to using Executors and DeviceConfigProxy, also fix tests that
were flaky before.

Test: SystemUITests
Test: enabled hub and see chip appear (after re-opening QS)
Bug: 160966908
Change-Id: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
2020-07-22 10:34:17 -04:00
Sergey Nikolaienkov
9c9fb8870f Merge "Wire test API to reset the state of AppErrors" 2020-07-22 12:14:40 +00:00
Adam Bookatz
dc33904acb Remove references to system-user-whitelisted-app
The two SysConfig xml tags
system-user-whitelisted-app
system-user-blacklisted-app
are deprecated and were never used.

Bug: 139547572
Bug: 137101239
Test: compiles
Change-Id: I0a5a8cb9b178a3742ddc1fe70b9ee1e2737abdba
2020-07-21 23:35:04 +00:00
Jiyong Park
6a5b8b1f6d Introduce uses-native-library tag
Since Android 7.0, partners were able to export some of their native
shared libraries to apps. So far, the native libraries were provided to
all apps regardless of whether they are actually needed or not. Even
worse, it was impossible to prevent the installation of an app to the
device where the some (or all) of the required native libs don't exist;
the apps had to manually handle the case, which sometimes impossible
when the dependency is so fundamental.

This change introduces a new tag <uses-native-library> to the app
manifest. Similary to the existing <uses-library> tag which is for
(java) shared libraries, the new tag is used to describe the depedencies
to the native shared libraries.

Apps targeting Android S or higher are required to use the tag to import
the native shared libraries. Libraries that are not depended on won't be
available to the app even if the libraries are listed in the
public.libraries*.txt files. Furthermore, when the dependency can't be
satisfied for an app, the package manager refejects installing the app.

The dependency can be optional using the `android:required` attribute.
When it is set to true, the absence of the lib on the device doesn't
prevent the app from being installed. However, the app has to gracefully
deal with the absence.

The changed behavior only affects apps targeting S or higher. Existing
apps are unaffected; they still get all the public native libraries
regardless of whether they have <uses-native-library> tags or not; the
tags are simply ignored.

This is the first version of the implementation and therefore needs
further refinements. The followings are two major TODOs.

1) The native shared lib dependencies of the java shared libraries
are not enforced. For example, if an app depends on a java shared
library foo and foo depends on some native shared libraries, the
classloader where code from foo is loaded still gets all native shared
libraries. This should be fixed.

2) New APIs should be added. SharedLibraryInfo should be extended to
represent native shared libraries. The meaning of
ApplicationInfo.sharedLibraryFiles should be revised. Finally, the new
tag should be made public.

Bug: 142191088
Test: atest CtsUsesNativeLibraryTest
Change-Id: Iceb038aa86872d23e9faf582ae91b1fdcaf5c64c
2020-07-21 08:42:00 +09:00
Zhen Zhang
b658122b70 Merge "Scroll the hiding page to top on tab changed in sharesheet" into rvc-qpr-dev am: cfeb7627b7 am: f0bcb15f2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12159211

Change-Id: I5583f0cbd80a08deb073caabc76db918ab869bd8
2020-07-20 20:02:31 +00:00
Zhen Zhang
f0bcb15f2b Merge "Scroll the hiding page to top on tab changed in sharesheet" into rvc-qpr-dev am: cfeb7627b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12159211

Change-Id: I7e24275da391682facfdbb14b09bb6051ea1b09f
2020-07-20 19:44:30 +00:00
Zhen Zhang
cfeb7627b7 Merge "Scroll the hiding page to top on tab changed in sharesheet" into rvc-qpr-dev 2020-07-20 19:29:20 +00:00
Michael Wright
54ae0a7ce9 Merge "Fix color mismatch of pointers" am: e1c169c983 am: 23ff2399a1 am: 6cddd8d6b7 am: 45a25dc11b am: bb3eec1b51
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362517

Change-Id: Iad6662ed4026f10ee3cf13c2e92cb84e007a6cbb
2020-07-20 19:23:25 +00:00
Michael Wright
bb3eec1b51 Merge "Fix color mismatch of pointers" am: e1c169c983 am: 23ff2399a1 am: 6cddd8d6b7 am: 45a25dc11b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362517

Change-Id: I55b3072811a9f11ab88c886b48707217d688fc70
2020-07-20 19:00:26 +00:00
Fabian Kozynski
d074a54435 Add back privacy chip
This adds back the privacy chip classes (Controller and view).

Change to using Executors and DeviceConfigProxy, also fix tests that
were flaky before.

Test: SystemUITests
Bug: 160966908
Change-Id: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
Merged-In: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
2020-07-20 14:27:28 -04:00
Michael Wright
6cddd8d6b7 Merge "Fix color mismatch of pointers" am: e1c169c983 am: 23ff2399a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1362517

Change-Id: I52a57b66d2651b8fed6f80740b3463feb0a5c928
2020-07-20 18:06:50 +00:00
Michael Wright
e1c169c983 Merge "Fix color mismatch of pointers" 2020-07-20 17:28:16 +00:00