Commit Graph

5474 Commits

Author SHA1 Message Date
Goven Liu
b75323eb34 Merge "[Wi-Fi] Add intent action & extra keys & result codes for add networks." 2019-11-18 04:33:17 +00:00
Robert Horvath
993e82eec7 Merge "Add setting to go to sleep after long user inactivity" 2019-11-15 15:05:15 +00:00
Alan Stokes
096757a77f Merge "Remove instant apps access to verifier consent setting." 2019-11-14 09:35:41 +00:00
Jeff Sharkey
97d3ca1e8f Merge changes from topic "legacycodez"
* changes:
  Progress towards splitting MediaProvider UID.
  Progress towards splitting MediaProvider UID.
2019-11-13 20:53:45 +00:00
TreeHugger Robot
bc7671b9fb Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." 2019-11-13 15:46:27 +00:00
Alan Stokes
698eb16409 Remove instant apps access to verifier consent setting.
This setting should be private to GPP, and there should be no reason
for any app to access it.  And GPP is migrating away from this
relatively public setting, so it can't be relied upon.

Test: Builds
Bug: 135751498
Bug: 37119785
Change-Id: I839c2d67ae54b4df184ea7ee1c7aebee72c6e794
2019-11-13 15:44:00 +00:00
Julia Reynolds
6f08e137e5 Merge "Constants for NLS specific approval screens in Settings" 2019-11-13 14:02:39 +00:00
Artur Satayev
f0b7d0ba51 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 12:58:29 +00:00
Jeff Sharkey
ab0a97220a Progress towards splitting MediaProvider UID.
We're working towards making MediaProvider into a Mainline module,
which means it can no longer share the "android.media" UID built
into the OS.  The major reason for this is because they're signed
with separate keys, but a secondary reason is that we don't know what
database customizations an OEM has performed in their MediaProvider.

This initial pass introduces the APIs needed to support a "legacy"
MediaProvider that will be used to migrate data between the old and
new UID.  This legacy provider is implemented using the same code
as the modern provider, but hosted at the "media_legacy" authority.

Bug: 144247087
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ibc38a786799e138e9c3e31297c7066bab6843d89
2019-11-12 15:48:52 -07:00
Bernardo Rufino
cf4d35c664 Merge "Remove instructions for specifying package in ACTION_MANAGE_OVERLAY_PERMISSION" 2019-11-12 10:03:23 +00:00
Tyler Gunn
4857c1f9ef Merge "More telephony updates for mainline." 2019-11-11 19:22:46 +00:00
Tyler Gunn
00d737bd17 More telephony updates for mainline.
Add new TelecomManager#getDefaultDialerPackage which is multiuse aware;
this is used when showing the voicemail notification.
Remove some @hide methods from Conference; push these inline.
Move ConferenceParticipantConnection into frameworks/opt/net/ims since
it is just an IMS implementation detail.

Bug: 141576016
Test: Manual smoke test.
Test: Run unit tests.
Test: Run CTS tests.
Change-Id: I39b6955cb14cc1ca68b05c620c3d09a2cdfe30c9
2019-11-11 08:28:38 -08:00
Bernardo Rufino
e941d8c923 Remove instructions for specifying package in ACTION_MANAGE_OVERLAY_PERMISSION
Since we are removing such capability in the other topic CL. Check that
CL for rationale.

Test: Builds
Bug: 135920175
Change-Id: I9d1d5afb1d72270a81888bea3ec0bd6f2f4e9542
2019-11-08 17:43:38 +00:00
govenliu
4ab3e4e09d [Wi-Fi] Add intent action & extra keys & result codes for add networks.
For supporting the mechanism for apps to add saved networks to the device, need to:
1. Add one new intent action.
2. Define two extra keys for passing data to Settings APP and get result
back.
3. Define 3 result codes.

Bug: 136472483
Test: just add action, test case will be in Settings App side.
Change-Id: I7391a6b8d89bd4621aab833b2da2a981f7b8163b
2019-11-09 00:39:19 +08:00
Robert Horvath
5560f38654 Add setting to go to sleep after long user inactivity
The European Commision prescribes an auto-standby feature for TV panels:
After some hours of inactivity, the device has to go from on-mode to
standby-mode or off-mode, or another condition not exceeding the
applicable requirements for standby-mode or for off-mode.

After a long time of no user activity the device should go to sleep,
even if wakelocks are held (eg. during video playback).

Test: 1. Set attentive timeout low, to 35s:
         `adb shell settings put secure attentive_timeout 35000`
      2. Play a YouTube video
      3. Observe warning dialog appearing after 5s
      4. Verify: Clicking a remote button or changing the setting higher hides
         the warning. Remote button press is consumed.
      5. Verify: After 35s of not pressing a button the device goes to sleep
      6. Verify: If "Stay awake" developer option is enabled, then
         warning is not displayed and device does not go to sleep after 35s
      7. Verify: No warning or sleep if setting is set to -1
Test: `atest frameworks/base/services/tests/servicestests/src/com/android/server/power/PowerManagerServiceTest.java`
Bug: 137633812
Change-Id: I551b6cffc336437fb1c5a00b4102f68ae0e003e9
2019-11-08 15:18:28 +01:00
Hall Liu
e2f17aad5e Add new SystemApi methods for mainline
Add new SystemApi methods for Telecom to call in lieu of the old @hide
methods. Also moved CallerInfo and CallerInfoAsyncQuery to Telecom
because there are no more users in Telephony.

Bug: 141576016
Test: CTS
Change-Id: I458ba6bcfc03db72c0419b0cab2f0d0adfa971d4
2019-11-07 13:34:11 -08:00
Julia Reynolds
a124aab432 Constants for NLS specific approval screens in Settings
Test: atest
Bug: 141689199
Change-Id: Ia6ded1774f135dd288e584b3da7141355df848a3
2019-11-06 12:38:50 -05:00
Hui Yu
a86a36b184 Merge "Add process capability as a new dimension." 2019-10-31 23:11:21 +00:00
TreeHugger Robot
6807fa4c81 Merge "Clean up code for experiment of JIT'ing priv apps" 2019-10-31 21:05:57 +00:00
Ivan Chiang
3bc64a128b Merge "Update java doc for correct rotation of thumbnail from Q" 2019-10-31 09:57:14 +00:00
Phil Weaver
22c2c46b88 Merge "a11y: don't crash the system when illegal component name encounted" am: f4d1789b81 am: 411b523373
am: 015fe4ff3e

Change-Id: Id23f04ae4bd5c3c622e64525a89303bb79ba24ec
2019-10-30 19:07:09 -07:00
Phil Weaver
015fe4ff3e Merge "a11y: don't crash the system when illegal component name encounted" am: f4d1789b81
am: 411b523373

Change-Id: Idb8ffd83b4d8b89ebba52ad6fe5e7037ac61b4b7
2019-10-30 18:59:00 -07:00
Phil Weaver
f4d1789b81 Merge "a11y: don't crash the system when illegal component name encounted" 2019-10-31 01:29:30 +00:00
Hui Yu
2696932100 Add process capability as a new dimension.
Add new attribute capability to ProcessRecord, it represents what this
process is allowed to do. Capability is a separate dimension for
process state (ProcState).

In OomAdjuster.java, capabilities can be passed from client to service.

Add PROCESS_CAPABILITY_FOREGROUND_LOCATION to represent the capability
that can access location while-in-use.

For permission such as foreground location access, AppOpsService
checks for FOREGROUND_LOCATION capability, also checks if the process
is in one of the foreground process states, if both conditions meet,
the locaton operation is allowed.

Remove PROCESS_STATE_FOREGROUND_SERVICE_LOCATION.

Bug: 136274596
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
atest CtsAppTestCases:ActivityManagerApi29Test
atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/appop/AppOpsServiceTest.java
Change-Id: Ie1c8e670fb0789208b753eb49b7e2fce6a2f211f
2019-10-30 18:23:24 -07:00
TreeHugger Robot
639701e8cb Merge "Fix for race condition when loading fonts from font provider" 2019-10-30 23:04:07 +00:00
Jeff Sharkey
2cbafa9c8d Merge "Reconcile MediaStore with MediaMetadataRetriever." 2019-10-30 18:50:01 +00:00
Matt Pape
33f91f59fb Merge "Move namespace/prefix logic to Settings.Config." 2019-10-30 14:36:38 +00:00
TreeHugger Robot
94cc0ba959 Merge "Add Tap Gesture for Aware Settings" 2019-10-30 10:17:13 +00:00
Ivan Chiang
c5c74e61be Update java doc for correct rotation of thumbnail from Q
Before Q, the thumbnail has wrong rotation, the developers need
to rotate it to correct rotation manually. As of Q, we provide
the correct rotation of the thumbnail.

Test: m -j
Bug: 142601201
Change-Id: I9c472f47b2bd0c3191ff55d1eb8d21303437dedd
2019-10-30 15:10:32 +08:00
Edgar Wang
32af83b2cb Add Tap Gesture for Aware Settings
- Add new settings provider key for tap gesture.

Bug: 142702985
Test: atest & manual
Change-Id: Ib76327b37a415512145a150a4b0e176a6cb114d7
2019-10-30 13:12:32 +08:00
Philip P. Moltmann
128b70364e Note with featureId from ContentProvider
This takes the Context#getFeatureId from the calling context and pipes
it all way through to the noteOp calls done by the content provider.

Bug: 136595429
Test: atest CtsAppOpsTestCases (new test added to capture this case)
            TelecomUnitTests:CallLogManagerTest
	    ContentProviderClientTest
	    TelecomUnitTests:MissedCallNotifierImplTest
	    TelecomUnitTests:BasicCallTests
	    MediaInserterTest
	    PreferencesHelperTest
	    RankingHelperTest
	    PinnedSliceStateTest
	    FrameworksCoreTests:ContentResolverTest
Change-Id: I53b1035626229c920b353509a5bece157b52fb51
2019-10-29 15:41:28 -07:00
Jeff Sharkey
7b75fe5257 Reconcile MediaStore with MediaMetadataRetriever.
Over the last year we've been converging on saying that MediaProvider
is an indexed view of values that developers can obtain directly from
MediaMetadataRetriever.  This change starts indexing several fields
of interest to bring these two surfaces into sync.

Since we're going to be asking MediaMetadataRetriever about audio,
video, and image files, it could return any metadata values for any
of those file types, so we're adding and promoting fields up to the
MediaColumns level.

Bring back APIs related to "trashing" media items; they had been in
place for the last release, but were hidden until we had firm
requests to add them, and partners have now requested them.  Also
add APIs for marking media items as "favorite", as requested by
partners.

Bug: 135343128, 142478744, 122025511, 142498573
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ie839ec1b2eed621786d0d10f35a061cbc52f192b
2019-10-29 16:03:20 -06:00
Matt Pape
c600153ae3 Move namespace/prefix logic to Settings.Config.
Previously DeviceConfig, Settings.Config, and SettingsProvider needed to
understand how to append "/" to a namespace to create the prefix for key
names before saving them in SettingsProvider. This removes that
duplication and lets all of the compositing and decompositing happen in
Settings.Config.

Test: atest FrameworksCoreTests:DeviceConfigTest
      atest FrameworksCoreTests:SettingsProviderTest
      atest SettingsProviderTest:DeviceConfigServiceTest
Bug: 136135417

Change-Id: I126155594f3e764e149a4928d1b3708da68c97f4
2019-10-29 14:17:53 -07:00
Ivan Podogov
e09d37bcb3 Add AOSP intent for Work Policy Info
Bug: 134391103
Test: make, GTS
Change-Id: Ib51a00a40b04bcdd6db8f8c1ae8662d850c54713
2019-10-29 10:02:04 +00:00
Xin Li
b2198fa670 Merge "Merge Coral/Flame into AOSP master" 2019-10-27 04:44:29 +00:00
Evan Rosky
7fe119504e Merge changes If145323c,I3aa3fcdc
* changes:
  Track rotation and original frame in sizecompat
  Launch SizeCompat Activities in a Window on Freeform Desktop Mode
2019-10-25 20:59:00 +00:00
Chen Xu
43bd6f2ffc Merge "make CallerInfo as SystemAPI" am: 7e902363a6 am: 3f1055a2ba
am: 610244cd4f

Change-Id: I6a3335b42a072522956e747835737e2af455bf38
2019-10-25 11:10:42 -07:00
Chen Xu
610244cd4f Merge "make CallerInfo as SystemAPI" am: 7e902363a6
am: 3f1055a2ba

Change-Id: Id0cc4db02834da24e4a64f3ebe5b52a8138bb15b
2019-10-25 10:51:09 -07:00
Chen Xu
3f1055a2ba Merge "make CallerInfo as SystemAPI"
am: 7e902363a6

Change-Id: I7615196e88b03a733daa895e9ffb7ee3d7a47034
2019-10-25 10:37:43 -07:00
TreeHugger Robot
708bf5f22a Merge "Add permissions namespace to DeviceConfig" 2019-10-25 02:47:57 +00:00
Beverly Tai
ff829713b7 Merge "Add motion sense tap gesture + touch counts" into qt-qpr1-dev
am: cafc138898

Change-Id: I00de5d09e784872df24dc46ac13c92b9b88a311d
2019-10-23 11:22:51 -07:00
Shivam Agrawal
780b5bb91e Launch SizeCompat Activities in a Window on Freeform Desktop Mode
Currently, when a display is in freeform mode, an activity that
is not resizable launches in fullscreen. However, for large
screen devices, it is preferable to launch activities in windows
to create the true desktop experience. This CL changes launch
configurations and resize actions to make non-resizable activities
launch in a window and to prevent resizing of these windows. When
the display enters fullscreen mode, the activity keeps its original
bounds and launches in a letterbox.

To make this all work, ActivityRecord was updated to use the
hierarchy instead of trying to recalculate everything independently
with a fullscreen assumption. The result is that the ActivityRecord
configuration now (mostly) has the actual bounds of the app so
that positioning works properly.

Please note, the following tests were removed because the
functionality they were trying to test has changed. Previously,
when a task was nonresizeable, even if the display windowing mode
was freeform, it was launched in fullscreen mode. However this CL
allows nonresizeable tasks in freeform mode to be launched in
windows. These tests were removed since they are redundant
with non-resizable (which is handled by packagemanager):
- TaskLaunchParamsModifierTests#testForceMaximizesPreDApp
- TaskLaunchParamsModifierTests#testForceMaximizesAppWithoutMultipleDensitySupport

The following tests were added:
- TaskPositioningControllerTests#testHandleTapOutsideNonResizableTask
- TaskLaunchParamsModifierTests#testLaunchesAppInWindowOnFreeformDisplay
- ActivityRecordTests#testSizeCompatMode_KeepBoundsWhenChangingFromFreeformToFullscreen

This also adds a developer option to enable size-compat
apps to start in freeform mode.

Test: go/wm-smoke
Change-Id: I3aa3fcdcd2b1e0b875d61dfaed3d5e85313edc29
2019-10-22 14:10:36 -07:00
Beverly Tai
7825637f80 Merge "Play different sounds for wired/wireless charging" 2019-10-22 13:41:26 +00:00
Chen Xu
fba9ca44a2 make CallerInfo as SystemAPI
1. move CallerInfo from telephony.internal to andorid.telephony package
2. expose APIs inside CallerInfo which are consumed by non-telephony
code.

Bug: 140908357
Test: Build
Change-Id: Ie95897c77e97e40f5357c107aede82edfea44d5a
(cherry picked from commit b9a1eefec6)
Merged-in: Ie95897c77e97e40f5357c107aede82edfea44d5a
2019-10-21 21:39:58 -07:00
Beverly
1742455882 Add motion sense tap gesture + touch counts
AWARE_TAP_PAUSE_GESTURE_COUNT is the number of times the user
has used the Motion Sense tap gesture to pause media.  This number
is used to determine whether to show the "Tap to pause media"
contextual tooltip.

AWARE_TAP_PAUSE_TOUCH_COUNT is the number of times the user has
touched the device to pause media instead of using the Motion Sense
tap gesture (Motion Sense and tap gesture must be active for this value
to increment). This number is also used to determine whether to show the
"Tap to pause media" contextual tip.

We back up these counts so that users moving to new devices with Motion
Sense will not be given these contextual tips again if they already know
how to use the feature.

Test: manual
Bug: 138296598
Change-Id: I702719fb7cec8b6be9dff91d212a00fb26129957
Merged-In: I702719fb7cec8b6be9dff91d212a00fb26129957
(cherry picked from commit a6e468831a)
2019-10-21 17:36:15 +00:00
Beverly
a6e468831a Add motion sense tap gesture + touch counts
AWARE_TAP_PAUSE_GESTURE_COUNT is the number of times the user
has used the Motion Sense tap gesture to pause media.  This number
is used to determine whether to show the "Tap to pause media"
contextual tooltip.

AWARE_TAP_PAUSE_TOUCH_COUNT is the number of times the user has
touched the device to pause media instead of using the Motion Sense
tap gesture (Motion Sense and tap gesture must be active for this value
to increment). This number is also used to determine whether to show the
"Tap to pause media" contextual tip.

We back up these counts so that users moving to new devices with Motion
Sense will not be given these contextual tips again if they already know
how to use the feature.

Test: manual
Bug: 138296598
Change-Id: I702719fb7cec8b6be9dff91d212a00fb26129957
2019-10-21 09:39:52 -04:00
Grace Jia
e098ff69e2 Merge "Added support for Calls.FEATURES_VOLTE in call log." 2019-10-18 19:52:37 +00:00
Evan Severson
f7461f0c54 Add permissions namespace to DeviceConfig
Test: adb shell device_config put permissions
        one_time_permissions_timeout_millis 10000
      Assert one-time permission revokes in ~10 seconds
Bug: 136219229
Change-Id: I5689b10abfb7f5642b5c45f624320d2c6d785016
2019-10-18 12:46:34 -07:00
Edgar Arriaga
faa67eb022 Fix for race condition when loading fonts from font provider
Change-Id: Ia5713c53e5d881e4d9836622375a0da4ffe5a674
2019-10-17 13:10:47 -07:00
Kweku Adams
df33ae1b0b Removing periodic parole window.
The periodic parole window is the 10 minute window that occurs every
24 hours to let RARE apps run. Now that we have the quota system in
place, there's no need to have the periodic parole window. Alarms and
jobs will still be allowed to run when charging. Network will continue
to be restricted for RARE apps even when charging. JobScheduler requests
an exception for RARE jobs in quota, so they will still be able to run.

Bug: 136184981
Test: atest AppStandbyControllerTests
Test: atest CtsAlarmManagerTestCases
Test: atest NetworkPolicyManagerServiceTest
Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Test: atest com.android.server.AlarmManagerServiceTest
Test: atest com.android.server.AppStateTrackerTest
Test: atest com.android.server.job.controllers.QuotaControllerTest
Test: atest com.android.server.net.ConnOnActivityStartTest
Change-Id: Ide382ad7fb9c7441f0a5232833ad39bf8c3a1e94
2019-10-16 13:04:06 -07:00