Commit Graph

7676 Commits

Author SHA1 Message Date
TreeHugger Robot
896cdcca42 Merge "Apply intensity settings to composed vibration effects" into rvc-dev 2020-04-20 18:11:30 +00:00
Lais Andrade
bf7a301ab0 Apply intensity settings to composed vibration effects
Use the existing maxAmplitude and gamma adjustment values to apply the
relative scaling of default vibration intensity settings and user
settings on top of the PrimitiveEffect#scale value.

As a consequence, the relative scaled amplitude of a OneShot or Waveform
vibration effect should match the scaled PrimitiveEffect#scale value.

Fix: 154089649
Test: atest FrameworksCoreTests:VibrationEffectTest
Change-Id: I3ca0042a42675289a2ed8110c9dc3798055ebf4a
2020-04-20 15:02:15 +00:00
Jerry Chang
e63ae2f84f Mark more directory getter APIs @TestApi
To have a way to verify behavior of more directories, mark more
directory getter APIs @TestApi.

Bug: 148664742
Test: atest SysConfigTest#testStageWhitelist
Change-Id: I2d22412935b24ec4c33d8d1b3a7fbb7df4a08841
2020-04-17 14:50:48 +08:00
TreeHugger Robot
a93686c403 Merge "bypass anti-malware verification" into rvc-dev 2020-04-15 20:13:43 +00:00
Todd Kennedy
75dd0e649a bypass anti-malware verification
For incremental installations only, we skip the verification
request broadcast and instead always send a verified broadcast
with the root hash.

Bug: 151240337
Test: Manual. Install APK normally and see the verifier request broadcast is sent
Test: Manual. Install APK incrementally and see verifier request broadcast is not sent, and verified broadcast is sent with root hash
Change-Id: I2599472818b63ea172d2d412741e5540c8a52176
2020-04-15 10:33:19 -07:00
Varun Shah
acb5634dc4 Add new atoms to track user journeys, such as user switches.
Define new atoms to better log and understand various user journeys,
such as user switches, user starts, and user creation.

The UserLifecycleJourneyReported atom defines a user's journey and
holds a user's information such as their user id, user type, and flags
associated with the user. This atom includes a session-id which is used
to link to the UserLifecycleEventOccurred atom which keeps track of
lifycycle events that occur throughout a user's journey. As more user
journeys are defined, there could be more Events added in the future.

Note: the JourneyReported atom can currently be logged more than once
per user journey since there is no record of the user's ongoing journey.
This will be updated in a future CL.

Bug: 146505521
Bug: 150788910
Test: statsd_testdrive 264 265
Change-Id: Iff3847be64d718fb2ec17e58c33d47f7fa4b627a
2020-04-14 11:25:07 -07:00
Yurii Zubrytskyi
da208016d6 [incfs] Make native library extraction async
IncrementalService can create the library files beforehand, but
delay filling in their data. As it takes quite a while in
general (over a second in cases when the phone is busy), it's
better to run the unzipping and filling in a separate thread
and only make sure it finishes before the whole installation
process is complete.
This speeds up the megacity.apk installation by ~250-300ms,
1000-1100ms -> 750-800ms

Bug: 153513507
Test: adb install megacity.apk

Change-Id: Ia44f7e45b9e0abaebdfb6fe5352f9dcf29ab4ece
2020-04-10 12:30:49 -07:00
Nikita Ioffe
57300d9057 Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()
This method consolidates logic of testing whenever rebooting userspace
is supported in a place that can be used both from
PowerMager.isRebootingUserspaceSupported() API and from
PowerManagerService.reboot() implementation.

Consequently, this makes `adb shell svc power reboot userspace` also
benefit from that check, and fail userspace reboot on devices that don't
support it.

Also tweaked logic of ignoring RemoteException to take into account
userspace reboot.

Test: adb root
Test: adb shell setprop init.userspace_reboot.is_supported 0
Test: adb shell svc power reboot userspace & verified error message
Test: adb shell setprop init.userspace_reboot.is_supported 1
Test: adb shell svc power reboot userspace & verified no error message
Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
2020-04-09 14:07:22 +01:00
TreeHugger Robot
afef06a0f6 Merge "Revert "Revert "Do not mount whitelisted package in storage data and obb dirs""" into rvc-dev 2020-04-08 14:48:39 +00:00
Alex Buynytskyy
f415679228 Change the way how we call setStorageParams.
Now it's unified with callback FS connector - we are passing the
callback pointer directly to dataloader. This restricts access only
to methods we want and only by someone we want.

Bug: b/153468113
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: Ib557ebbe7c6c5ce92140eb20534a3626b3ac96d3
2020-04-07 14:42:50 -07:00
Fiona Campbell
adbe11f6ac Merge "Make PowerManagerService use float for brightness" into rvc-dev 2020-04-07 09:36:09 +00:00
Fiona Campbell
29dce0f0a9 Make PowerManagerService use float for brightness
Change the override brightness values to use float instead of an int in
PowerManagerService.

Bug: 150671605

Test: WmTests:RootWindowContainerTests
FrameworksServicesTests:PowerManagerServiceTest
CtsOsTestCases:android.os.cts.PowerManagerTest
FrameworksCoreTests:android.os.PowerManagerTest

Change-Id: I97e97e1500dac7f8beb112812d1347fa420afbf7
2020-04-06 19:28:55 +01:00
Abhijeet Kaur
a32954ec22 Merge "Remove a TODO as no work needs to be done" into rvc-dev 2020-04-06 12:36:11 +00:00
Abhijeet Kaur
fd83d9dbb7 Remove a TODO as no work needs to be done
Bug: 150672994
Test: builds
Change-Id: I90fcbfb8d52e6883c12c7a76765767eaed370afe
2020-04-06 10:34:28 +01:00
TreeHugger Robot
2c1f53ad6f Merge "Disable the freezer while we're collecting binder interface descriptors." into rvc-dev 2020-04-03 22:41:52 +00:00
Nikita Ioffe
d8c1e77cf8 Merge "Make init.userspace_reboot.is_supported a rw property" into rvc-dev 2020-04-02 15:20:34 +00:00
Ricky Wai
af8bcbd46f Revert "Revert "Do not mount whitelisted package in storage data and obb dirs""
This reverts commit 7929c5dced.

Reason for revert: DeviceBootTest works now.
Fixed a bug in ProcessList to handle inode==0 case.

Test: atest DeviceBootTest
Bug: 151218156

Change-Id: I9c0066471e613ac7550cd55205653d84486af062
2020-04-02 13:10:33 +00:00
Alex Buynytskyy
50e0244012 Merge changes from topic "LOADER_USAGE_STATS" into rvc-dev
* changes:
  Checking LOADER_USAGE_STATS before enabling read logs.
  Revert "Update the current API dump"
2020-04-02 00:36:26 +00:00
Alex Buynytskyy
5e860ba105 Checking LOADER_USAGE_STATS before enabling read logs.
Bug: b/152633648
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: Ic747a51b97b785c627c95bddecc6834ef602ff30
2020-04-02 00:31:41 +00:00
Nikita Ioffe
5c99905f44 Make init.userspace_reboot.is_supported a rw property
General recommendation is to avoid read-only properties, and instead control
"read-onlines" by only allowing init/vendor_init to set the property.

Since ro.init.userspace_reboot.is_supported was added in this release, and
nobody outside of the platform is querying it directly, it should be fine to
simply rename it.

Test: adb shell getprop init.userspace_reboot.is_supported
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I31b9ac7f2c92ce82664a0266aea62faa2bdd365f
Merged-In: I31b9ac7f2c92ce82664a0266aea62faa2bdd365f
(cherry picked from commit 24e2259e5d)
2020-04-01 18:26:19 +01:00
Martijn Coenen
956c1333a4 Disable the freezer while we're collecting binder interface descriptors.
These are synchronous calls out from system_server to many processes;
make sure we don't get hung up on them.

Bug: 152294322
Test: N/A
Change-Id: Ie6f9da6c7f5df346cc28e0968f70a898bcd52adf
2020-04-01 16:37:51 +02:00
TreeHugger Robot
63ff5bb6f1 Merge "PMS: Add shell command to toggle FIXED_PERFORMANCE" into rvc-dev 2020-03-31 20:38:47 +00:00
Mike Ma
1b75683d4f Remove registerSection API with optional Executor
This patch addresses an issue from API review:
registerSection cannot have an optional Executor

registerSection is an unreleased API in R, therefore can be hard
removed.

Fixes: 148867197
Test: Build
Change-Id: Icdb8b97f7fa3f1880aa3039dbbe82f8331a45202
2020-03-30 17:13:39 -07:00
Nikita Ioffe
810c90c70e Merge "pm install-commit supports waiting for staged session to be ready" into rvc-dev 2020-03-28 18:35:50 +00:00
Nikita Ioffe
13973e1d89 pm install-commit supports waiting for staged session to be ready
This change allows callers of adb install-multi-package to benefit from
--wait flag which will wait for the pre-installed verification of staged
sessions.

Test: atest PackageManagerShellCommandTest
Test: adb install-multi-package tzdata.apex shim.apex
Bug: 147694315
Change-Id: Ia356c4dff635ec230eb505fb400913c76ec84042
2020-03-28 12:39:29 +00:00
Ram Muthiah
40383b0f2b Merge "Revert "Do not mount whitelisted package in storage data and obb dirs"" into rvc-dev 2020-03-28 02:47:38 +00:00
Ram Muthiah
7929c5dced Revert "Do not mount whitelisted package in storage data and obb dirs"
This reverts commit 2cd955e79d.

Reason for revert: Bisect indicates this change causes b/152550025

Bug: 152550025
Bug: 151218156
Change-Id: I350bfc44d2137416bd23591fffbe4284e1462a91
2020-03-28 02:39:58 +00:00
Michael Wright
f51b6aa53a Merge "Make vibrator effect queries an @IntDef." into rvc-dev 2020-03-27 13:29:18 +00:00
Michael Wright
6d2c6f0255 Merge "Address API Council feedback." into rvc-dev 2020-03-27 12:22:39 +00:00
Michael Wright
8d761db1e4 Make vibrator effect queries an @IntDef.
Rather than tri-state enums, which aren't as clear and easy to
mis-interpret, switch the return values to an explicit tri-state
@IntDef.

Bug: 150958120
Test: atest VibratorTest
Change-Id: I3a5daa4078a21008664ea14d45a5c5284c1224ed
2020-03-26 21:39:17 +00:00
Michael Wright
f7eb2d82a7 Address API Council feedback.
- Make VibrationEffect.Composition final
- Hide the VibrationEffect.Composition default constructor
- Fix doc and nullability annotation bugs on
  VibrationEffect.Composition#addPrimiritive
- Make Vibrator#areAllEffectsSupported and
  Vibrator#areAllPrimitivesSupported

Fixes: 150958120
Test: build
Change-Id: I0d9a782fd4130639ad99179d7770dcde1a2afba5
2020-03-26 19:29:54 +00:00
Kenny Root
625bcd2eeb Resume-on-Reboot: change SystemApi calls slightly
In response to feedback, remove boolean returns and rely on exceptions
to provide detail descriptions.

Test: make # using a test app that calls the API using old signature
Test: atest FrameworksServicesTests:RecoverySystemServiceTest
Bug: 150205125
Change-Id: I95930078df9c88194f21b38ff7d96b425db47d56
2020-03-26 12:23:11 -07:00
TreeHugger Robot
e5d60ed552 Merge "Do not mount whitelisted package in storage data and obb dirs" into rvc-dev 2020-03-26 11:01:12 +00:00
TreeHugger Robot
d60a2bd945 Merge "Make OP_LEGACY_STORAGE stickiness configurable" into rvc-dev 2020-03-25 21:16:01 +00:00
Dan Stoza
68a220394c PMS: Add shell command to toggle FIXED_PERFORMANCE
Adds a shell command to toggle FIXED_PERFORMANCE mode if the AIDL
version of the Power HAL is available:

  cmd power set-fixed-performance-mode-enabled [true|false]

Bug: 152342542
Bug: 22408132
Test: Manual, observe with ALOG that call makes it to PMS JNI
Change-Id: Id0106c87f3ab3dcef8e81553d4ebc93cd0b2c56f
2020-03-25 11:00:27 -07:00
Ricky Wai
2cd955e79d Do not mount whitelisted package in storage data and obb dirs
We now pass 2 booleans from AM to zygote about:
- If CE and DE data dirs need to be mounted
- If storage data and obb dirs need to be mounted

And also, separate whitelisted package from same uid packages, as same
uid packages do not need to be mounted in storage data and obb dir case,
it's needed to be mounted for CE and DE data dirs only. Otherwise
whtelisted packages will also be mounted in storage data and obb dirs,
which apps should not have access to it.

Bug: 151218156
Test: atest AdoptableHostTest
Change-Id: If7c20a7ed3b845d8657c937469161cb7ed3da07f
2020-03-25 16:40:46 +00:00
shafik
76735f666a Make OP_LEGACY_STORAGE stickiness configurable
OP_LEGACY_STORAGE is sticky for apps targeting <= Q.
This change makes this behaviour configurable via DeviceConfig, by
introducing a new property "legacy_storage_op_sticky" to existing
namespace "storage_native_boot". If the property is set to true, then
we get the default behaviour (app-op sticky for SDK<=Q). If it's set to
true, then the app-op is not sticky for SDK<=Q.

Apps targeting > Q remain unaffected: always not sticky.

Test: manual:
    * adb shell dumpsys appops --package com.android.vending
    * Observe LEGACY_STORAGE mode=allowed
    * adb shell device_config put storage_native_boot legacy_storage_op_sticky false
    * adb reboot
    * adb shell dumpsys appops --package com.android.vending
    * Observe LEGACY_STORAGE mode=ignored
Bug: 151735608
Change-Id: I06d115a0c85c44b5a6d1054f74a00d8fa674dfa7
2020-03-25 15:49:10 +00:00
Martijn Coenen
1152370510 Merge "Add (hidden) fixupAppDir() API." into rvc-dev 2020-03-25 12:56:47 +00:00
TreeHugger Robot
c6f4f74723 Merge "V4 uses V2 digest if V3 is not available." into rvc-dev 2020-03-25 01:36:01 +00:00
Alex Buynytskyy
6b7efbc4b9 V4 uses V2 digest if V3 is not available.
Test: atest PackageManagerShellCommandIncrementalTest
Bug: b/151240006
Change-Id: I242b599e434880ce218537574e879e9436e5d3da
2020-03-24 14:34:52 -07:00
TreeHugger Robot
da8101d270 Merge "Deprecate POWER_SAVE_MODE_CHANGING broadcast." into rvc-dev 2020-03-24 20:56:25 +00:00
TreeHugger Robot
393c9121ce Merge "Hide CellularBatteryStats#getTxTimeMillis." into rvc-dev 2020-03-24 00:09:05 +00:00
Amit Mahajan
9bfde0e1fd Hide CellularBatteryStats#getTxTimeMillis.
Will be re-exposed as SystemApi in S.

Test: TH
Bug: 152247297
Change-Id: Ifb87676fa5afd2720dd09f36f3ff67c1b215b676
2020-03-23 15:15:17 -07:00
Dan Stoza
571a08feec Merge "Add <p> tags for PowerManager#getThermalHeadroom" into rvc-dev 2020-03-23 20:04:41 +00:00
Kweku Adams
62cef43ac2 Deprecate POWER_SAVE_MODE_CHANGING broadcast.
The internal POWER_SAVE_MODE_CHANGING broadcast is sent at the same
time as the POWER_SAVE_MODE_CHANGED broadcast. Since broadcasts are
asynchronous,there's no reason to have both, especially since it can
potentially lead to inconsistency, so we should simplify down to just
one. Mark the POWER_SAVE_MODE_CHANGING broadcast as deprecated in R and
unavailable to apps targeting R. We'll remove it in a future version.

Bug: 79580230
Test: Android builds
Test: atest BatterySaverReceiverTest
Change-Id: I70e20ce53b496a3dc88a1083c230334f53032d81
2020-03-23 11:51:46 -07:00
Dan Stoza
2ee536290e Add <p> tags for PowerManager#getThermalHeadroom
Adds <p> tags to the Javadoc for PowerManager#getThermalHeadroom

Bug: 150855511
Test: m docs
Change-Id: Icf7b4eef8539ace14f466745e5bc6b6b79cc23c5
2020-03-23 10:40:30 -07:00
Martijn Coenen
0f522bfebf Add (hidden) fixupAppDir() API.
On devices without sdcardfs, filesystem permissions aren't magically
fixed up. This is problematic mostly in application-private directories,
which are owned by the application itself; if another process with
elevated permissions creates a file in these directories, the UID will
be wrong, and the owning package won't be able to access the files.

Allow processes that modify application-private directories (eg
DownloadManager) to ask the framework to fix up permissions on their
behalf.

Bug: 151986170
Test: WIP
Change-Id: Ic30f708d25d7702ec3a4569ee6ddf100732d89d1
2020-03-23 16:27:24 +01:00
Sudheer Shanka
add060f917 Merge "Add BlobStoreManager.getRemainingLeaseQuotaBytes." into rvc-dev 2020-03-22 07:21:17 +00:00
Peter Wang
23cf98eaa8 [Telephony Mainline] Hide TelephonyServiceManager and TelephonyFrameworkInitializer
Bug: 151455139
Fix: 151455139
Test: Build
Change-Id: I067c821239585d3d4e8dcf39798b1d0014ba077b
2020-03-20 17:34:49 -07:00
TreeHugger Robot
afb5aa530b Merge "Fixed doc" into rvc-dev 2020-03-21 00:28:15 +00:00