Commit Graph

5859 Commits

Author SHA1 Message Date
Jeff Sharkey
4b773c909a Merge "Calculate MediaColumns.HASH when demanded." 2018-12-11 22:55:14 +00:00
Jeff Sharkey
47ad186aac Calculate MediaColumns.HASH when demanded.
We'll come back in a future change to wire up automatic hashing in
onIdleMaintenance(), but we'll hold off on that until we've
implemented our optimized in-kernel hashing.

For now, generate the has when demanded via canonicalize(), and
clear any hash whenever the file is edited.  Tests to verify sanity.

Bug: 120782363
Test: atest android.provider.cts.MediaStoreTest
Change-Id: I287f7a204655b37e4efd519579b12084ee4fb8e3
2018-12-11 12:24:19 -07:00
Olivier Gaillard
5e29d89ce1 Merge changes I99ba18d8,Id04f35f5,I4995c35e,Ia836da7d
* changes:
  Only keep one overflow entry per uid.
  Add app id instead of uid to WorkSourceProvider whitelist.
  Sets ThreadLocalWorkSource to authorized work source.
  Make sure callEnded is always called.
2018-12-11 17:27:17 +00:00
Alex Kershaw
8a8430bff0 Merge "Add isManagedKiosk system APIs." 2018-12-11 17:02:25 +00:00
Olivier Gaillard
76c231d0d8 Sets ThreadLocalWorkSource to authorized work source.
Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest
Change-Id: I4995c35eed87154312e5e560716d66b3fc2ae221
2018-12-11 15:43:19 +00:00
Olivier Gaillard
0e4d61ea13 Make sure callEnded is always called.
Currently checkParcel might throw for instance although this is not
enabled by default.

Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest
Change-Id: Ia836da7daa690dfa176d48cfe86ca4b7eb7cccc6
2018-12-11 15:42:12 +00:00
Alex Kershaw
2418ea970b Add isManagedKiosk system APIs.
Add system APIs isManagedKiosk and isUnattendedManagedKiosk. These will
be defined in the CDD.

The intention is to have privacy and security-approved definitions that
future features (removing user consent dialogs, stronger APIs) can use
specifically for publicly-accessible dedicated devices.

We use 'kiosk' rather than 'publicly-accessible dedicated device' for
ease-of-use, which is actually consistent with ChromeOS.

Bug: 111384878
Test: Each use will have its own CTS tests. The definitions themselves
will be in CDD. Currently tested by calling the methods in TestDPC.
Change-Id: If080a3b9dae285bc28823e6004750908009130d2
2018-12-11 13:01:11 +00:00
Wei Wang
c9c6a91e46 Merge "Add more shutdown actions and a new NPU sensor type" 2018-12-11 04:19:43 +00:00
Jordan Liu
62b6a1d09d Merge "Return "" not "null"" am: eebbd2b639 am: edaf4401e1
am: ec098703ef

Change-Id: I99f6eadac7e431a335ef620a0d953a2ab4e3fb8f
2018-12-10 17:54:14 -08:00
Jordan Liu
ec098703ef Merge "Return "" not "null"" am: eebbd2b639
am: edaf4401e1

Change-Id: Id4c2bf04e877664188c8fab2905601d6f431cfde
2018-12-10 17:44:53 -08:00
Wei Wang
bc79c4fdca Add more shutdown actions and a new NPU sensor type
Also limit internal API with android.Manifest.permission.DEVICE_POWER

Bug: 116541003
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java
Change-Id: I45be565d5c9eb39d6ff1d8b38d6830de2a33045d
2018-12-10 17:01:39 -08:00
TreeHugger Robot
c2f699d8fe Merge "Exposed canSwitchUsers() and added an API in UserManager for SUW." 2018-12-10 06:54:21 +00:00
Seongho Kim
73273e0caa Return "" not "null"
Some models such as LDU, WIFI do not have "gsm.version.baseband",
which should return "null" when it is called.
However it returns "" not "null"

Bug: 120685535
Test: Self-Test
Change-Id: Idc1363d45a0ece3a35f46da287e21015ac1387af
2018-12-08 01:34:04 +00:00
Tim Van Patten
3c61284416 Update ANGLE Developer Options
Update ANGLE developer options to allow selecting the OpenGL driver
(default, ANGLE, native) for each app as well as forcing ANGLE for all
apps.

Bug: 118384925
Test: Verify the default/ANGLE/native values are saved and applied and
used by the loader.

Change-Id: I189889b9b780eabe812298c0dd02838f70f97a03
2018-12-07 21:06:58 +00:00
Anthony Stange
d2ca6c6dfe Merge "Revert "Schematize vold system properties"" am: 6ee45c6f14
am: 510c8c463f

Change-Id: If137d417a8f042e8cbde842578caaa3e54bb8c6d
2018-12-07 04:37:45 -08:00
Anthony Stange
6ee45c6f14 Merge "Revert "Schematize vold system properties"" 2018-12-07 12:04:56 +00:00
Anthony Stange
2473b08b07 Revert "Schematize vold system properties"
This reverts commit 7bc31dc162.

Reason for revert: Breaking aosp_master build.

Change-Id: I34a5e9889c17e3454a0a86deabcec3c192a3da52
2018-12-07 11:43:03 +00:00
TreeHugger Robot
0f2f9d0694 Merge "Add commitChanges for signaling checkpointing end" 2018-12-07 05:52:48 +00:00
Inseob Kim
1a7cad6b1a Merge "Schematize vold system properties" am: 095d0f640e
am: 73694f8faa

Change-Id: If420ffa861d9d85f2baca9224b96f2716965f4b5
2018-12-06 18:42:29 -08:00
Treehugger Robot
095d0f640e Merge "Schematize vold system properties" 2018-12-07 01:46:45 +00:00
Felipe Leme
749b889889 Yet another (major) refactoring on Content Capture and Augmented Autofill.
Bunch of changes:

- Split public SmartSuggestionsService info ContentCaptureService and
  AugmentedAutofillService
- Renamed 'intelligence' packages to either 'contentcapture' or
  'autofil.augmented'
- Renamed internal packages and classes.
- Changed permissions, resource names, etc...
- Moved Augmented Autofill logic from IntelligeceManagerService (R.I.P.) to
  Autofill.
- Optimized IPCs by passing a String instead of the InteractionSessionId
  (that also solves the view -> service dependency).

Test: atest CtsContentCaptureServiceTestCases \
            CtsAutoFillServiceTestCases \
            FrameworksCoreTests:SettingsBackupTest
Test: manual verification with Augmented Autofill Service

Bug: 119638877
Bug: 117944706

Change-Id: I787fc2a0dbd9ad53e4d5edb0d2a9242346e4652d
2018-12-06 16:56:39 -08:00
John Reck
9f029c5be3 Merge "Add NDK async begin/end & counter" 2018-12-06 21:43:18 +00:00
TreeHugger Robot
1f7d427443 Merge "Wraps #exectTransact to set/restore worksource." 2018-12-06 15:57:22 +00:00
Olivier Gaillard
180f91f1f8 Wraps #exectTransact to set/restore worksource.
Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest
Change-Id: I334c4569706851925d95bd22931815572907b9a5
2018-12-06 12:56:46 +00:00
Olivier Gaillard
f9bb7f79c1 Merge "Use the calling worksource uid for trusted apps." 2018-12-06 12:47:45 +00:00
TreeHugger Robot
188cf112d2 Merge "Add public thermal API" 2018-12-06 10:26:48 +00:00
Cody Northrop
3f452404bd Merge "Guard ANGLE rules file check with DEBUG flag" 2018-12-06 03:52:57 +00:00
John Reck
77b31a5eb1 Add NDK async begin/end & counter
Bug: 111503982
Test: atest CtsAtraceHostTestCases
Change-Id: I038b76b505d3103f7b1e85a9469932d23cde2ab8
2018-12-05 18:16:39 -08:00
Olivier Gaillard
c17d280bab Use the calling worksource uid for trusted apps.
- Set ThreadLocalWorkSource to the work source uid when app has the
UPDATE_DEVICE_STATS permission. We only enable that in system server for
now.
- By default, set ThreadLocalWorkSource to the calling uid since we
always trust this value.
- If an app sets a work source uid without having the right permission,
we just ignore it (we do not throw an exception)

A follow-up commit will update the code to use the worksource from the
beginning of the call. Currently we get the work source at the end
inside of BinderCallStats, however the value might have been changed
when executing onTransact.

Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest
Change-Id: I351b8ac2b31feececc46c73f373f198b9b603c7e
2018-12-05 23:12:13 +00:00
Wei Wang
5947665d9a Add public thermal API
No permission added for now as there is no sensitive data exposed, other
than get system thermal status.

CTS will be added later to make sure call back triggered when status changes.

Bug: b/119613338
Test: PowerManager CTS test
Change-Id: I2e5ab716df82d82aa31cb1015bd5548fe312c1a4
2018-12-05 13:36:06 -08:00
Cody Northrop
bcf422bde1 Guard ANGLE rules file check with DEBUG flag
Temporarily disable ANGLE rules file checking to avoid
LeakedClosableViolation which is triggering crashes.

This can be removed when refactor is completed that avoids
holding a file descriptor open until the driver loads.

Bug: 119516511
Test: cts-tradefed run singleCommand cts -m CtsAngleIntegrationHostTestCases
Change-Id: Icd8a48c853825ebfd64cf0746ae8203554e1684e
2018-12-05 11:27:49 -07:00
Wei Wang
9c2b6766ba Merge "Thermal: change WARNING level to EMERGENCY" 2018-12-05 15:37:21 +00:00
Varun Shah
e38c678dcc Exposed canSwitchUsers() and added an API in UserManager for SUW.
UserManager#canSwitchUsers() is now exposed as a SystemApi for SUW use.
It requires either the MANAGE_USERS or INTERACT_ACROSS_USERS permission.

Added UserManager#removeUser(UserHandle) which mirrors
UserManager#removeUser(int). It requires the MANAGE_USERS permission.

Bug: 120457727
Test: atest com.android.server.pm.UserManagerTest#testRemoveUserByHandle
Test: atest com.android.server.pm.UserManagerTest#testRemoveUser
Test: manual (run setup wizard)
Change-Id: Ie7a641da8ada789931b2b116c907a3ca298490f4
2018-12-04 17:08:40 -08:00
Inseob Kim
7bc31dc162 Schematize vold system properties
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: m -j
Change-Id: I8e04f643197b6c8a60cc38c6979e41c5de3469f5
Merged-In: I8e04f643197b6c8a60cc38c6979e41c5de3469f5
2018-12-05 00:04:24 +00:00
TreeHugger Robot
6220baa36e Merge "Schematize vold system properties" 2018-12-05 00:00:42 +00:00
Wei Wang
caff59d3d6 Merge "Thermal: Add set-status command to turn thermal status" 2018-12-04 23:27:28 +00:00
Wei Wang
ed2c902004 Thermal: change WARNING level to EMERGENCY
Bug: 119613338
Test: atest services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java
Change-Id: I3bde79a3598ef58072c8d9c2202a0eec6a968776
2018-12-04 14:48:28 -08:00
Wei Wang
cc91361106 Thermal: Add set-status command to turn thermal status
Bug: 111086696
Bug: 119413961
Test: adb shell cmd thermalservice set-status 3
Test: adb shell cmd thermalservice reset
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java
Change-Id: Ide114d1aadad67cbbbae645b56c6c082aceade21
2018-12-04 13:31:42 -08:00
Jeff Sharkey
f660c012b0 Merge "Add support for "Audiobooks"." 2018-12-04 16:58:17 +00:00
Jeff Sharkey
628d2e6888 Merge "Redact location Exif tags when no permission." 2018-12-04 01:28:37 +00:00
Philip P. Moltmann
7208efc83b Merge changes from topic "LocationAccessCheck"
* changes:
  New settings for testing permission controller
  Expose API needed for apps to use work profiles.
2018-12-03 19:59:03 +00:00
Jeff Sharkey
cb39499354 Redact location Exif tags when no permission.
When the caller doesn't hold the ACCESS_MEDIA_LOCATION permission,
any location Exif tags should be redacted for privacy reasons.  We
still allow unredacted raw file access if the media is owned by the
calling app, since they should be able to see data they contributed.

Certain backup apps really want to see the original contents without
any redaction, so provide them a setRequireOriginal() API so they
get a strong exception whenever the original bits can't be provided.

Add the ability to open a redacted file for read/write access by
stopping redaction for any ranges that have been overwritten with
new data, along with tests to verify this behavior.

Extend "content" tool to bind null values.

Bug: 111892141
Test: atest android.os.RedactingFileDescriptorTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I47b220036a712d9d49547196b90e031b10760f84
2018-12-03 12:57:09 -07:00
Olivier Gaillard
4845430ffa Merge "Use transaction name for binder trace" 2018-12-03 18:02:36 +00:00
Jeff Sharkey
2ea404fd2a Merge "Method to determine isolated storage mode." 2018-12-01 22:37:35 +00:00
Philip P. Moltmann
a3e358cf9f Expose API needed for apps to use work profiles.
Bug: 120303361
Test: Built
Change-Id: I5e4cd1450bb284321711558a4475e872d14022ff
2018-12-01 09:32:12 -08:00
Jeff Sharkey
10887d5e5a Add support for "Audiobooks".
Bug: 113356944
Test: manual
Change-Id: Ifed54c41a533ed2d556dc6561ea498ec293991a6
2018-11-30 13:53:19 -07:00
Jeff Sharkey
10ec9d8a42 Method to determine isolated storage mode.
Mostly designed for use by tests, but start using it elsewhere in OS
for consistency.

Bug: 119713234
Test: manual
Change-Id: I803671fd84547b75337bebf00c2fa2bdaf0f72e7
2018-11-30 10:52:02 -07:00
TreeHugger Robot
8faacd383d Merge "add android.os.Process.getRss()" 2018-11-30 01:16:38 +00:00
TreeHugger Robot
a248a6a08b Merge "Revert "Revert "support work chain in pulled atoms""" 2018-11-29 01:35:51 +00:00
Chenjie Yu
d7e3a228be Revert "Revert "support work chain in pulled atoms""
This reverts commit 9c7b131996.

Reason for revert: Fixed build failures due to merge

Change-Id: I7d7bfed3a3234b966f3fe3fd6e0cbc63d2bedf83
Test: unit test
2018-11-28 15:53:09 -08:00