Commit Graph

5462 Commits

Author SHA1 Message Date
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
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
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
Beverly
f364d7cdc3 Play different sounds for wired/wireless charging
- Allow different sounds to be played for wired and wireless
charging
- Only show the wireless charging animation if
config_showBuiltinWirelessCharging_anim is true

Test: manual
Bug: 135716837
Change-Id: I16161bed84fe586c50adb29f49e395f1f7a4dfe4
2019-10-16 11:32:34 -04:00
Al Sutton
66a3e0147c Move device specific settings to back up into common package.
This brings the list of device specific settings to backup into the same
package as the other lists of settings which are backed up.

Test: atest SettingsProviderTest
Change-Id: Iea4bef49c356c92773cf189e455cf608b6cdc4e6
2019-10-15 15:38:26 +01:00
Xin Li
5c4d37fc17 DO NOT MERGE - Merge QD1A.190821.011 into stage-aosp-master
Bug: 141248619
Change-Id: I078f35ceef06ae7d08c5de385fd023c71c1ecbac
2019-10-14 22:54:53 +00:00
Victor Hsieh
c6fff30aab Clean up code for experiment of JIT'ing priv apps
Test: atest DexManagerTests
Bug: 142547770
Change-Id: I26690020d5f7017fcec48311059f03c65139af92
2019-10-14 11:52:34 -07:00
Edgar Wang
434b36ec6e Merge changes I261ad35f,Id2611b3c into qt-qpr1-dev
am: d76cc783f8

Change-Id: I1c5f830f78239541c37990330cfd2eebbe7af0d8
2019-10-14 10:10:14 -07:00
Jeff Sharkey
93c7e3553b Merge "Progress towards per-volume database separation." 2019-10-14 15:24:59 +00:00
Ivan Chiang
176b8d09e1 Merge "Allow providers block folders in ACTION_OPEN_DOCUMENT_TREE" 2019-10-14 13:15:30 +00:00
Edgar Wang
ba07c45dcb Remove assist_gesture_enabled related keys from backup list
Bug: 142312794
Test: atest & manual
Change-Id: I261ad35f4b7a2c7ac706f092b1be85f4aa41a9d6
Merged-In: Ied7d97d4b4b0955981824d7342aabe74d06a0c1f
2019-10-14 19:07:43 +08:00
Edgar Wang
587ba7e46e Remove aware sensor related features from backup list
Bug: 142312794
Test: atest & manual
Change-Id: Id2611b3cbdaea57e9e8c563aac211796d27a49a7
Merged-In: Ifed4ebb5f5a2ebff0420b3ff1ab1e9a533829566
2019-10-14 19:01:14 +08:00
Grace Jia
2a2829a4af Added support for Calls.FEATURES_VOLTE in call log.
Test: CTS test
Bug: 141264508
Change-Id: Ia554be9e7150ea99c45ec011c166c1bcd87ddc9a
2019-10-11 23:05:58 +00:00
Jeff Sharkey
588c15e56e Reveal color standard, transfer, and range.
We've already been parsing them for many years, and they're well
defined by other public APIs, so let's reveal them in MediaStore.

Also get some storage-related documentation updated to guide
developers towards replacements in a post-scoped-storage world.

Bug: 140247264, 139185855, 141523097, 139185322
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Id39a74a9972a330b3f83913b2eef5100ec59627d
2019-10-10 17:44:57 -06:00
Jeff Sharkey
ff6423b27c Progress towards per-volume database separation.
After lots of feedback from a diverse set of stakeholders, the
following goals have become clear for MediaProvider:

-- When an SD card is ejected, we shouldn't be leaving "stale"
metadata around, such as artists, albums, or genres that are no
longer relevant.
-- We need to avoid heavy full re-indexing of content when an SD card
is only temporarily ejected and reinserted within a week.
-- We need to support "merged" queries against the virtual
VOLUME_EXTERNAL view of all currently mounted volumes.  For example,
developers should be able to quickly list all available artists
without needing to manually merge cursors.

With these goals in mind, we spent a lot of time pondering various
approaches, and landed upon defining "ID" columns using stable
values that enable instant merging between databases.  This is
implemented by running the 64-bit version of FarmHash against the
relevant KEY values, which have already been stripped to aid
clustering of equal values.  (These keys are how "The Beatles" and
"Beatles, The" and "Beatles" are already merged together today.)

The approach above now lets us define our artists, albums, and
genres in terms of the underlying audio table/view, meaning they're
always accurate.

Note that the above approach means that developers no longer have
dynamic control over genre membership, since it's now always derived
from the underlying media files.  This follows the design principle
we've been using for the last year of saying the source of truth is
the underlying media files, to ensure that we can accurately
reconstruct the database after corruption or wiping.  Developers
that want to edit artist, album, or genre information should edit
the metadata in the underlying file, which will trigger a rescan.

This change also deprecates the various _KEY constants, since
they're not reliable for sorting; developers should be using COLLATE
LOCALIZED or other methods.  (This places us in an awkward position
where we're adding newly-deprecated GENRE_KEY columns, but they're
needed for completeness.)

Fix keyFor() generation to use a consistent Locale.ROOT.

Bug: 136964095, 141520122, 140850497, 140127429, 138130722
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Id4945a04c6996c6ea4a909dda32aa1dd02759d08
2019-10-08 16:14:06 -06:00