Commit Graph

18593 Commits

Author SHA1 Message Date
Chalard Jean
25cae56500 Merge "Annotate NSM heavy methods with @WorkerThread" am: db9e849986 am: 11166d7d71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625859

Change-Id: I4091f82e7b95901a88cd9528c92df4519fb3edd1
2021-03-17 03:08:28 +00:00
Chalard Jean
db9e849986 Merge "Annotate NSM heavy methods with @WorkerThread" 2021-03-17 02:03:22 +00:00
Aaron Huang
ce43593e5e Merge changes from topic "pacproxy-service" am: 16f50075b1 am: 688ae36dcb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553959

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ife210de3adbdaff6c88caf744d805571b365b294
2021-03-15 12:30:17 +00:00
Aaron Huang
16f50075b1 Merge changes from topic "pacproxy-service"
* changes:
  Make PacProxyService be a system service
  Revert^2 "Refactor setCurrentProxyScriptUrl to a void method"
2021-03-15 11:49:45 +00:00
Aaron Huang
5d31a15d84 Make PacProxyService be a system service
PacProxyInstaller class is running a thread all the time and is
listening to intent ACTION_PAC_REFRESH so it would be better to
make it be a system service with a manager class PacProxyManager
which is obtained with getSystemService(PacProxyManager.class).
Besides, rename PacProxyInstaller to PacProxyService will
be easier to know it's the service for PacProxyManager.

ConnectivityService is going to be a mainline module and it
needs constructor of PacProxyService to be SystemApi.
However, in current design, it needs to pass a handler and
an int arguments to the constructor which would be difficult
to maintain if just expose the constructor directly.

So, define a listener for the event that the current PAC
proxy has been installed so that the handler and the int
arguments can be removed from the constructor.

Bug: 177035719
Test: FrameworksNetTests
Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
2021-03-15 14:40:58 +08:00
Chalard Jean
ed40025e25 Annotate NSM heavy methods with @WorkerThread
Test: TH
Bug: 181906747
Change-Id: Ia30273466c1b91a3dcc5d36dac61f92185dec96e
2021-03-11 10:47:46 +00:00
Riddle Hsu
4b5690b9bd Merge "Fix worng value of 'TOTAL of Rss Total' when dumpsys meminfo" am: 90e336819c am: 5028f8923a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625700

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia3f761098ec224c709b1f779e3e4b296f08e265a
2021-03-10 16:38:05 +00:00
weihua.li
af6f90bbf1 Fix worng value of 'TOTAL of Rss Total' when dumpsys meminfo
Use memInfo.getTotalRss instead of memInfo.getTotalPss
to get the value of 'TOTAL of Rss Total'.

bug 182328162

Signed-off-by: weihua.li <weihua.li@unisoc.com>
Change-Id: I5487abe4870e10f4ee79c86c0ad0e75a3843deb1
2021-03-10 13:56:35 +08:00
Paul Hu
a8469c27cb Merge "New API for comparing two intents of PendingIntent object." am: 687da317ad am: 46a371b494
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1597953

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0beb8b5bebdddba8e01f3dbef595212862150365
2021-03-09 11:51:29 +00:00
Paul Hu
687da317ad Merge "New API for comparing two intents of PendingIntent object." 2021-03-09 10:55:00 +00:00
paulhu
514881581d New API for comparing two intents of PendingIntent object.
Bug: 174237997
Test: atest PendingIntentTest
Merged-In: Ic5eb20f94ff6fd6953315a5f848effa25b813da7

Change-Id: Ic5eb20f94ff6fd6953315a5f848effa25b813da7
2021-03-09 02:49:43 +00:00
Sudheer Shanka
b3cb4e56ea Merge "Remove network capability from CAPABILITY_ALL constant." am: 9ffb8a6bc6 am: bae26c2434
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1621039

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id47ab43ab3265371371195ce00d7e5cb6aa551cc
2021-03-06 00:38:11 +00:00
Sudheer Shanka
4d9cc95b52 Remove network capability from CAPABILITY_ALL constant.
We shouldn't include it until we also update OomAdjuster
to add it to certain processes.

Fixes: 181902246
Test: atest ./tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
Change-Id: I3bfdd2b01c3ba8010e96177e41fc90be3dce8a55
Merged-In: I888764ff22fba92fe2cccf3d8442ed318a19ad2a
2021-03-05 09:09:55 +00:00
Sudheer Shanka
2640acbea8 Merge "Add new network process capability." am: ae0fa6d359 am: 028e394c23
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612822

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6894d30d9cc47c3d14596f878b0b91084a4d50e8
2021-03-04 04:23:15 +00:00
Sudheer Shanka
ae0fa6d359 Merge "Add new network process capability." 2021-03-04 03:02:49 +00:00
Xin Li
1af6a12e98 Merge "Merge RQ2A.210305.007" 2021-03-03 21:41:39 +00:00
Treehugger Robot
695f4e3373 Merge "[FUI18] Expose notifyNetworkStatus as system API" am: 10eb5d0faf am: 0f2ed8b795
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1559088

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If1f3a928ed881ddd9826675f4729f35d9d0f1727
2021-03-03 17:22:35 +00:00
Treehugger Robot
0f2ed8b795 Merge "[FUI18] Expose notifyNetworkStatus as system API" am: 10eb5d0faf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1559088

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8b20786397ff83c0d086549a0d942c5703e31b9a
2021-03-03 16:21:54 +00:00
junyulai
33b44da527 [FUI18] Expose notifyNetworkStatus as system API
Test: m -j doc-comment-check-docs
Bug: 174123988
Merged-In: I11d4c9ab24de87fb2ad120e3787b78b73133e874
Change-Id: I11d4c9ab24de87fb2ad120e3787b78b73133e874
  (cherry-picked from ag/13749978)
2021-03-03 20:01:46 +08:00
Chilun Huang
e58d56d580 Merge "Add ownership for ConfigurationController" am: c8677e4d05 am: 00a8690dc9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612036

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If7bcd0a1ec24961df911e2b89d3a83969354e6ac
2021-03-03 08:34:30 +00:00
Chilun Huang
00a8690dc9 Merge "Add ownership for ConfigurationController" am: c8677e4d05
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612036

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I15f1598662278724e1ee158d6c00ab2388399007
2021-03-03 08:07:14 +00:00
Sudheer Shanka
9771009668 Add new network process capability.
- Introduce network capability which allows apps to access network
  despite power restrictions.
- Update NPMS to allow apps network access only if they are in a
  higher proc_state or they are hodling the new network capability.

Bug: 177641226
Test: atest ./services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: Ia411ddef2e8cb77d371c22262d5b1e06a0396e29
Merged-In: Ia411ddef2e8cb77d371c22262d5b1e06a0396e29
2021-03-02 06:43:51 +00:00
Chilun
2ce64824e9 Add ownership for ConfigurationController
Bug: 127877792
Test: manual
Change-Id: I01b89191ef1b9c2bf82573b265ef2e04ce7acb18
2021-03-02 06:29:17 +00:00
Abhijeet Kaur
0877967417 Merge "Disable resetting WRITE_MEDIA_IMAGES and WRITE_MEDIA_VIDEO appops" am: 789ff12ec1 am: a544a57512
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1602374

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I20f544283749a14fc8f4a2c011deac048cf7768a
2021-02-24 18:27:59 +00:00
Abhijeet Kaur
a544a57512 Merge "Disable resetting WRITE_MEDIA_IMAGES and WRITE_MEDIA_VIDEO appops" am: 789ff12ec1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1602374

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3f57d8dd875390671527f46df93b5366133d946c
2021-02-24 18:00:54 +00:00
Abhijeet Kaur
789ff12ec1 Merge "Disable resetting WRITE_MEDIA_IMAGES and WRITE_MEDIA_VIDEO appops" 2021-02-24 17:27:31 +00:00
Roshan Pius
7394e95f36 Merge "Add getTargetSdkVersion without AppInfo" am: f8ab9c895b am: 1d024a0e6a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1599639

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If5d59fda78badffd826160743adbcfa990052537
2021-02-24 01:43:56 +00:00
Roshan Pius
1d024a0e6a Merge "Add getTargetSdkVersion without AppInfo" am: f8ab9c895b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1599639

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iab7f841edba1f96b5b8248bdee88d9165f4d644e
2021-02-24 01:30:53 +00:00
Kevin Han
2c842f3aa7 Merge "Register AppHibernationManager in service registry" am: 44183743e0 am: 0de60cd4e8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572766

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ied0817ca6d49f0861bdb929a6fca78a1d75cb729
2021-02-24 01:23:36 +00:00
Kevin Han
0de60cd4e8 Merge "Register AppHibernationManager in service registry" am: 44183743e0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572766

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibf8ac130fe7800af2d83b16f2ae90a7df5558c62
2021-02-24 00:32:44 +00:00
Abhijeet Kaur
953d180af7 Disable resetting WRITE_MEDIA_IMAGES and WRITE_MEDIA_VIDEO appops
App holding System Gallery role is allowed WRITE_MEDIA_* appops by
virtue of the role. This allows the System Gallery app write-access for
images and videos.

When app preferences are reset AppOpsService toggles the appops for
all apps. Only the appops mentioned in sOpDisableReset are not toggled.

Disable WRITE_MEDIA_* appops to reset, as the system gallery app loses
write access on images/videos.

Bug: 179133883
Test: Manual
Change-Id: I168221c641566a9f691ed7956c038206b114d802
Merged-In: I168221c641566a9f691ed7956c038206b114d802
2021-02-23 19:07:26 +00:00
Winson
3eb5bd0a11 Add getTargetSdkVersion without AppInfo
For quickly checking an app's targetSdkVersion without building and
returning an entire ApplicationInfo object.

Bug: 164459559

Test: atest android.content.pm.cts.PackageManagerTest#testGetInfo

Merged-In: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
Change-Id: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
2021-02-23 09:25:58 -08:00
Kevin Han
44183743e0 Merge "Register AppHibernationManager in service registry" 2021-02-23 02:02:49 +00:00
Xin Li
be473bf819 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559
2021-02-21 09:39:53 -08:00
Treehugger Robot
8a1fc93c4d Merge "Use formal API for ActivityThread to set proxy" am: 394170f9cc am: b70ef11f73
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1512874

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifae677c9751d618617083696a89252f11bd222b4
2021-02-19 07:06:33 +00:00
Treehugger Robot
394170f9cc Merge "Use formal API for ActivityThread to set proxy" 2021-02-19 05:42:06 +00:00
Remi NGUYEN VAN
72887073f2 Use formal API for ActivityThread to set proxy
Add setHttpProxyConfiguration to the public API, and use
ConnectivityManager APIs from ActivityThread (instead of hidden APIs) to
get/set the proxy for an app process.

The default proxy is now initialized with getDefaultProxy instead of
getProxyForNetwork(null); this should not make a difference, as nothing
should have called bindProcessToNetwork at that point yet.

Bug: 174436414
Test: m; device boots
Merged-In: Ifb516194ecde1567cea4b6806946091cdcf2f015

Change-Id: I06b797eeae54609aecdc0afe1df4e6c602a17a69
2021-02-19 13:53:56 +09:00
Josh Gao
a5ef566cd7 Merge "Attach protobuf tombstones to ApplicationExitInfo." am: 2e1418c47f am: 3d9f3f0076
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573681

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id05f24b1febaaacbaf1b1e3a28459e5546ebd510
2021-02-18 10:10:31 +00:00
Josh Gao
2e1418c47f Merge "Attach protobuf tombstones to ApplicationExitInfo." 2021-02-18 08:40:57 +00:00
Josh Gao
c36f532d91 Attach protobuf tombstones to ApplicationExitInfo.
Bug: http://b/159164105
Test: atest CtsAppExitTestCases
Change-Id: I377247e8fc85f917676cb57eaa3128b955634fa5
2021-02-17 17:40:49 -08:00
Benjamin Franz
8964ef6743 Merge "Add versioning to app compat framework" am: 80bbdfd100 am: 4fb9af6ced
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1585009

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I14b38edb7136852c5ecf78e0a4ad0266c77a453a
2021-02-16 12:51:34 +00:00
Benjamin Franz
80bbdfd100 Merge "Add versioning to app compat framework" 2021-02-16 11:48:36 +00:00
Rubin Xu
d6c19708af Merge "add MANAGE_CREDENTIALS appop" into rvc-qpr-dev-plus-aosp 2021-02-15 09:47:46 +00:00
Lorenzo Colitti
ed9730e6f9 Merge changes Ia68f482a,I4911e214,Ied379654,I66d18512,Ie8e1bd63 am: 45ec3191a7 am: 246444fef7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1581293

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I91816c01a799a89b89098a6e9ff256dae7d31dbf
2021-02-15 01:03:06 +00:00
Lorenzo Colitti
45ec3191a7 Merge changes Ia68f482a,I4911e214,Ied379654,I66d18512,Ie8e1bd63
* changes:
  Check registering system default callback needs NETWORK_SETTINGS.
  Move VPN code from ConnectivityService to VpnManagerService.
  Add a skeleton VpnManagerService, and start it on boot.
  Convert LockdownVpnTracker to NetworkCallbacks.
  Minor fixes to VpnTransportInfo.
2021-02-15 00:00:47 +00:00
Rubin Xu
603f3ee721 add MANAGE_CREDENTIALS appop
This is part of the work to support
a credential management app on
unmanaged devices.

Bug: 179180345
Test: atest android.appsecurity.cts.AppOpsTest

Merged-In: Ifd87b5e38f341db4b34bf9f61480e29e49148846
Change-Id: Ifd87b5e38f341db4b34bf9f61480e29e49148846
2021-02-14 19:16:09 +00:00
Rubin Xu
c9a8b2fa8e Merge "add MANAGE_CREDENTIALS appop" 2021-02-13 18:32:16 +00:00
Rubin Xu
fd4c56d4d3 add MANAGE_CREDENTIALS appop
This is part of the work to support
a credential management app on
unmanaged devices.

Bug: 179180345
Test: atest android.appsecurity.cts.AppOpsTest

Merged-In: Ifd87b5e38f341db4b34bf9f61480e29e49148846
Change-Id: Ifd87b5e38f341db4b34bf9f61480e29e49148846
2021-02-12 21:34:53 +00:00
Benjamin Franz
360d60d523 Add versioning to app compat framework
With this change, callers can set overrides for specific versions of an
app. The framework falls back to default version when the given version
doesn't have an override set.

Bug: 174043039
Test: atest FrameworksServicesTests:CompatConfigTest
Test: atest FrameworksServicesTests:PlatformCompatTest
Test: atest PlatformCompatGating
Change-Id: Ib5ff67e752a9c5ee94b6e1dd664d324ab5bf4542
2021-02-11 18:33:45 +00:00
Lorenzo Colitti
3dc6dbe80f Move VPN code from ConnectivityService to VpnManagerService.
ConnectivityService itself does not depend on mVpns or the Vpn
class any more. Most of this CL is simply moving code from one
class to another:

- Move the AIDL calls from IConnectivityManager to IVpnManager.
- Move the implementation from ConnectivityService to
  the new VpnManagerService.
- Move the APIs from ConnectivityManager to VpnManager, but
  temporarily maintain some shims in ConnectivityManager for the
  moved calls so that existing callers do not have to be modified
  in this CL.
- Update VpnService to call IVpnManager instead of
  IConnectivityManager.
- Move the code that registers the VpnManager service from
  ConnectivityFrameworkInitializer to SystemServiceRegistry.

Bug: 173331190
Test: atest HostsideVpnTests FrameworksNetTests CtsNetTestCases
Change-Id: I4911e2144df721a94fa00da9edf0dc372a7091c2
2021-02-12 01:12:24 +09:00