Commit Graph

100799 Commits

Author SHA1 Message Date
Lee Shombert
6a23143c4c Merge "Clean up hasSystemFeature binder cache" 2020-01-26 19:02:43 +00:00
Hui Yu
88910decff FGS background start restriction.
1. Background started foreground service shall not have
while-in-use permissions including location, camera and
microphone. Many exemptions have been applied including:
--FGS started by widget.
--FGS started by notification.
--FGS started by IME or other visible app.
--FGS started by ROOT_UID, SYSTEM_UID, NFC_UID.

2. Add a phenotype key KEY_DEFAULT_BACKGROUND_FGS_STARTS_RESTRICTION_ENABLED
to turn on/off this feature (default is on).

3. In dogfood, if a background started FGS with while-in-use permission
(any of location/camera/microphone) run into this restriction, the FGS
will not been granted these permission. we show a toast message to
alert user and ask them to write a bugreport using instruction at
go/r-bg-fgs-restriction. So we can have a statistic how many apps will
be impacted by this feature.
These is a flag Settings.Global.FOREGROUND_SERVICE_STARTS_LOGGING_ENABLED
to turn on/off the toast message (default is on, in dogfood)

Bug: 136219221
Test: atest android.app.cts.ActivityManagerProcessStateTest
atest android.app.cts.ActivityManagerApi29Test.java
atest android.app.cts.ActivityManagerFgsBgStartTest

Change-Id: Ibc8aaa6839a69136f9311bfacdbab9705b31b6a7
2020-01-24 20:58:47 -08:00
Marco Ballesio
b83a44dcd9 Merge "Add support for freezing cached apps" 2020-01-25 03:39:53 +00:00
Julius D'souza
5eb161d910 Merge "KeyguardManager: add lock set and validation methods" 2020-01-25 03:32:36 +00:00
TreeHugger Robot
f3d1ce018d Merge "Clarify frame rate as frames per second" 2020-01-25 01:43:31 +00:00
Nate Myren
32af0ecb7e Merge "Disable user-facing historical app ops methods" 2020-01-25 01:40:14 +00:00
Ruchir Rastogi
c7e7661b7f Merge "Delete StatsLogEventWrapper" 2020-01-25 01:17:24 +00:00
Vishnu Nair
f85c92f4f6 Merge "Switch to compositor shadows for PiP and Freeform windows (disabled by default)" 2020-01-25 00:44:04 +00:00
Andrii Kulian
8127bfcc43 Merge "Merge sleeping activities with visibility updates" 2020-01-25 00:42:03 +00:00
Automerger Merge Worker
8c45fefa83 Merge "Bluetooth LE COC: Delete unused testing API" am: 25983a0972 am: dfe0273968 am: e8383fd5fc
Change-Id: I336a04270cbce29fb8998474f28d0dea8eadd9d2
2020-01-25 00:29:55 +00:00
TreeHugger Robot
201c242b84 Merge "Revert "Revert "Adds a new ACCESS_CONTEXT_HUB permission""" 2020-01-25 00:26:34 +00:00
Hansong Zhang
dfe0273968 Merge "Bluetooth LE COC: Delete unused testing API"
am: 25983a0972

Change-Id: Iba4797930d442399b4078705b30eef07855dabee
2020-01-24 16:22:26 -08:00
Amit Mahajan
a45fad224b Merge "Move EXTRA_SERVICE_STATE from Intent to ServiceState." 2020-01-25 00:19:42 +00:00
calvinpan
c64805d392 Merge "Redesign the setPreferredNetworkType"
am: 53b272d680

Change-Id: I9dec551a3aeb71edd52d33d1e92bb385bca7cf19
2020-01-24 16:12:48 -08:00
Julius D'souza
9367eb8146 KeyguardManager: add lock set and validation methods
The new methods are specifically for non-handset devices
and are guarded by SET_INITIAL_LOCK permission.

Bug: 143612363
Test: TreeHugger
Change-Id: Ifbe6a1b11f4849ec0ea9515ac7b018bb446799ea
Signed-off-by: Julius D'souza <jdsouza@google.com>
2020-01-24 15:37:13 -08:00
TreeHugger Robot
f61162a002 Merge "Combine package parsing thread pools" 2020-01-24 23:18:57 +00:00
Treehugger Robot
25983a0972 Merge "Bluetooth LE COC: Delete unused testing API" 2020-01-24 23:11:01 +00:00
Marco Ballesio
bdaf16e72a Add support for freezing cached apps
Freeze apps when cached and unfreeze them once removed from the cache or
killed. Frozen apps will not use any CPU cycles, reducing power
consumption for misbehaving processes which might attempt to run
while cached.

Change-Id: Ib055352062825db62927015c33ee0a285aa4630c
Depends-On: pa/1495867, ag/9976279, ag/9981529, ag/9987868¬
Bug: 143308662
Test: manual, atest CachedAppOptimizerTest
2020-01-24 15:08:01 -08:00
Nate Myren
697650b3b7 Disable user-facing historical app ops methods
Disable the ability to see historical app ops using dumpsys, and by
calling "getHistoricalOps", unless the calling package has an
instrumentation, or is the statsd package.

Fixes: 148227477
Test: attempt to call into getHistoricalOps while not an instrumented
application or statsd. The method should return an empty bundle. Run
"adb shell dumpsys appops --history" should return "no such arg", and
"adb shell dumpsys appops -h" should not show "--history" in the args.

Change-Id: Ie5ad9a90ffc0473aba958199450bcff9315f71a6
2020-01-24 14:13:00 -08:00
TreeHugger Robot
607b7ab283 Merge "Move euicc related file to telephony." 2020-01-24 22:08:50 +00:00
Sergey Volnov
ac90cd8bf9 Merge "Implement data sharing API for Content Capture." 2020-01-24 22:05:27 +00:00
Soonil Nagarkar
614210991b Merge "Add DPM API to request location provider enable" 2020-01-24 21:27:31 +00:00
Hansong Zhang
a0b7355a6f Bluetooth LE COC: Delete unused testing API
Some methods are for SL4A test only, and now they have been migrated.

Test: compile
Change-Id: I86e22814fc9a3fd296c359804a465b9ead4d926f
2020-01-24 21:26:07 +00:00
Vinit Nayak
b320cbccf6 Merge "Add rotation field to ThumbnailData for task snapshots" 2020-01-24 21:24:24 +00:00
calvinpan
d77e0bde77 Redesign the setPreferredNetworkType
Some APPs(like OMA DM) might enable or disable 5G settings, so redesign
the setPreferredNetworkType behavior.

1. Create allowed_network_type in telephonyprovider
2. Create get/set allowed network type API
3. When APPs call setPreferredNetworkType() that will AND with allowed
network type.

Bug: 136730709
Test: By Manual
1. setAllowedNetwork to disable 5G
2. setPreferredNetworkTypeBitmask to set NR_LTE_GSM_WCDMA
3. framework set LTE_GSM_WCDMA to modem
Merged-In: Ia257e6ddaa33c32bc09340a59c9daf71ce1fa8cf
Change-Id: Ia257e6ddaa33c32bc09340a59c9daf71ce1fa8cf
2020-01-24 13:23:27 -08:00
Hongming Jin
5abf503bfa Merge "Add a boot time service in sysUI to register system actions with accessibility registration API." 2020-01-24 21:22:28 +00:00
Arthur Ishiguro
0cf065e13c Revert "Revert "Adds a new ACCESS_CONTEXT_HUB permission""
This reverts commit 21de9eebb5.

Bug: 135951924
Test: Compile
Reason for revert: Uploaded CL to fix test failure

Change-Id: I29e2937406aaea92a5e24c06819ea22bf9c8b58d
2020-01-24 13:15:23 -08:00
Yuliya Kamatkova
56f7c7f37c Merge "Add Activity#setLocusContext API. Plumb LocusID to the System Server. Add locus update event to the Usage Stats. Test: Build and run on a test device with a test app. Bug: 147594233, 147100454" 2020-01-24 21:10:54 +00:00
Suprabh Shukla
30295f5421 Merge "Add an unsuspend button option to SuspendDialogInfo" 2020-01-24 21:08:21 +00:00
Ying Xu
4b0dec268d Merge "[Telephony Mainline] Remove hidden API usages in CarrierAppUtils" 2020-01-24 20:55:31 +00:00
Rob Carr
b6a5575a0f Merge "Replace deferTransactionUntilSurface with deferTransactionUntil" 2020-01-24 20:22:06 +00:00
Ruchir Rastogi
4e65e38795 Delete StatsLogEventWrapper
Since all pullers now use StatsEvent instead of StatsLogEventWrapper,
this class can be deleted.

Test: m -j
Test: m -j statsd_test
Bug: 146578681
Change-Id: I63013768ee13af0235f8cd857ca3fc16d2fd877f
2020-01-24 12:07:25 -08:00
Ömer Nebil Yaveroğlu
8d22767445 Merge "Various API changes including:" 2020-01-24 19:48:30 +00:00
Winson Chiu
6fe95622e9 Merge "Only throw SecurityException for OverlayManager callers targeting R" 2020-01-24 19:40:05 +00:00
Yuliya Kamatkova
48c38076ef Add Activity#setLocusContext API. Plumb LocusID to the System Server.
Add locus update event to the Usage Stats.
Test: Build and run on a test device with a test app.
Bug: 147594233, 147100454

Change-Id: I1e058ac87244d47719606d8dcfaea2df4bff43d2
Signed-off-by: Yuliya Kamatkova <yuliyak@google.com>
2020-01-24 11:19:10 -08:00
Cody Kesting
7d2cbc1253 Merge "Fix javadoc build break s/line/link/"
am: 5cd89ebb01

Change-Id: Iba1f8ec62784f68bc415690ccf5966445c9b3542
2020-01-24 10:55:47 -08:00
Lee Shombert
be9ba356aa Clean up hasSystemFeature binder cache
Bug: 140788621

This is a non-functional clean-up.
1. Rename the classes and methods used by the binder cache so that
   everything public is based off of the binder name "hasSystemFeature".
2. Modified the hashCode() method to conform to the comments in cl/9965760

Test: Built a debug image and ran one iteration of MPTS.  Verified that no
errors were seen.

Change-Id: I3ffdda43a7dbe30a12449ff346e1e22b379ee308
2020-01-24 10:48:53 -08:00
Automerger Merge Worker
6e400d8819 Merge "Add API for apps to check if they are the network owner" am: e021269f8d am: 23f27778e3 am: 532b34a3c8
Change-Id: Ibe4cc2bd1d588dcbccd83f53ee3da9d067ae85b6
2020-01-24 18:47:28 +00:00
TreeHugger Robot
394041d988 Merge "Add hinge angle sensor type to sensors framework" 2020-01-24 18:45:01 +00:00
Cody Kesting
5cd89ebb01 Merge "Fix javadoc build break s/line/link/" 2020-01-24 18:37:51 +00:00
Peter Wang
caabef3f2c Merge "[Telephony Mainline] Expose APIs in SubscriptionManager"
am: c0e02ab436

Change-Id: I8599664e033e579f18acf30203fa3ff9207122a2
2020-01-24 10:37:27 -08:00
Treehugger Robot
c0e02ab436 Merge "[Telephony Mainline] Expose APIs in SubscriptionManager" 2020-01-24 18:31:32 +00:00
Qingxi Li
23f27778e3 Merge "Add API for apps to check if they are the network owner"
am: e021269f8d

Change-Id: I1316c7fccd9b7a35ff6d8a79a8afa13644d9ab54
2020-01-24 10:24:12 -08:00
Qingxi Li
e021269f8d Merge "Add API for apps to check if they are the network owner" 2020-01-24 18:12:52 +00:00
Roshan Pius
81d7cece57 Partial Revert of ag/10161061
Making battery stats final broke telephony unit tests (old mockito does
not allow mocking final objects).

Bug: 148282682
Test: Compiles
Change-Id: Id65ba702aa551c7c23bbd6efa527ef2b930478f5
2020-01-24 18:01:46 +00:00
Andrii Kulian
4679918cdf Merge sleeping activities with visibility updates
Previously we were using a separate SLEEP message to communicate
with the client. The sleeping implementation on the client though
simply transitioned it between STARTED and STOPPED states.

This CL relies on visibility updates to communicate the sleeping
state. The "sleeping" status field is still used in the server-side
to record when device started going to sleep, and prevents any
activity that was launched before to influence the power state of
the device.

Bug: 137329632
Test: AM/WM CTS and unit tests
Change-Id: Idd7f5bf6730d3372168d862ef713a44f700430f1
2020-01-24 09:59:36 -08:00
Nathan Harold
ed13bd68c7 Fix javadoc build break s/line/link/
Bug: 148248781
Test: compilation
Change-Id: I9df208a9b063b71b2f6cc3099005d1ab38044cd2
Merged-in: I9df208a9b063b71b2f6cc3099005d1ab38044cd2
2020-01-24 09:43:03 -08:00
Qingxi Li
7cf06627df Add API for apps to check if they are the network owner
This CL extends NetworkCapabilities#mEstablishingVpnAppUid
to the network owner app UID and introduces a new public API
to get this owner app's UID.

Bug: 142072839
Test: atest FrameworksNetTests
Change-Id: Id83cdea62b89b586aff74e51e3fee60e53d37d4c
2020-01-24 17:28:23 +00:00
Automerger Merge Worker
e29d03dbad Merge changes from topic "remove_ce_caching" am: 02e09b98b0
Change-Id: I064eaec6c1c5c056c850b71534b1e768a69a8d3a
2020-01-24 17:16:33 +00:00
Automerger Merge Worker
e636dc979c Merge "Add AIDL for registering ConnectivityDiagnosticCallbacks." am: 5b8737d5d2 am: fc04c3840f am: b52e9ce854
Change-Id: Iec4dcf4c39edb8994ed72b9550845ea5962e836a
2020-01-24 17:16:19 +00:00