Commit Graph

3944 Commits

Author SHA1 Message Date
TreeHugger Robot
30a50a02f0 Merge "BatteryManager: rename BATTERY_PROPERTY_BATTERY_STATUS" 2017-02-28 22:33:47 +00:00
Jin Qian
2e88d4b6fe BatteryManager: rename BATTERY_PROPERTY_BATTERY_STATUS
To BATTERY_PROPERTY_STATUS

Test: build
Bug: 35813122
Change-Id: Ia8308def79b79706dbdc3e47f93afa56661a47aa
2017-02-28 10:58:36 -08:00
Dianne Hackborn
a06ec6a943 Add new job scheduler constraints for "battery not low".
Clean up the implementation of boolean constraints so that
they are in a single flags value that gets propagated all of
the way from JobInfo.Builder in to the JobStatus.  Much simpler
and easier to add new constraints!

Also introduce some shell commands to make it easier to write
tests against the job scheduler (and other things tied to power).
One of the big things here is that there is a new sequence number
that propagates with battery updates, which we can look for in
the job scheduler to determine when a change the test has made
to battery state has actually gotten applied, to allow it to
safely and minimally wait until executing the condition being
tested.

Test: New BatteryConstraintTest suite added.

Change-Id: I11076d90b80ec25ee604c29b6a6dc2337fd867ce
2017-02-27 10:54:06 -08:00
TreeHugger Robot
3471880ab0 Merge "Improve service docs around user unlocking." 2017-02-24 23:17:44 +00:00
Jeff Sharkey
bb4988ad7d Improve service docs around user unlocking.
Also delete some @removed methods that never shipped to reduce
confusion.

Test: builds, boots
Bug: 30434803
Change-Id: I18773182f62f0f62bd4e36c9c3098372483a374f
2017-02-24 09:02:53 -07:00
Netta P
958d0a5036 Protobufferize PowerManager dumpsys
Bug: 34230125
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCase -t com.android.server.cts.PowerIncidentTest
Change-Id: Ib71563cfc9ca95c297111430d8bbe2ce88d7a41d
2017-02-23 15:19:11 -08:00
Jeff Sharkey
373d01766f Add queryStatsForPackage() API.
This gives developers a way to collect package-level stats, even if
it means we have to use manual calculation for sharedUserId apps.

Also round size of storage devices to nice power-of-two values so we
do a better job of matching retail packaging.

Test: builds, boots
Bug: 35294241
Change-Id: I24946c443bb9dc4b0411a8149a0656702ac1fd24
2017-02-22 15:48:51 -07:00
Jeff Sharkey
458428ea66 Split cache clearing into two phases.
Use newly defined "V2_DEFY_QUOTA" flag to split cache clearing into
two phases: clearing data for apps above their quotas, and then
pushing deeper by clearing data for apps below their quotas.

Add placeholder comments for other data types that we're planning to
add shortly.  Route all clearing behavior through this new method,
which remains guarded behind a flag for now.

Test: builds, boots
Bug: 34692014
Change-Id: I678d7b4e2bf6c837dd8a9adbc36a53015907f75f
2017-02-22 11:47:17 -07:00
Jeff Sharkey
d5d5e926eb Clear cache space when allocating bytes.
Fleshes out remainder of allocation implementation, where we offer
to clear cached data to satisfy the allocation request.  To prevent
abuse, we never let apps allocate into either the minimum cache space
or low storage space.

Clean up quota APIs to require the caller to pass in the path they're
interested in, and we resolve the underlying filesystem for them.

Defines settings that can be used to tweak the minimum cache space.

Test: builds, boots
Bug: 34690590
Change-Id: I85bc07399f91ee4aa568a8a54c615646bf748ad4
2017-02-21 11:50:55 -07:00
Todd Kennedy
8094e09089 Revert "Revert "remove app-ephemeral""
This reverts commit c2f0d886f4.

Test: Manual
2017-02-15 14:43:17 -08:00
Guang Zhu
d80ba8abc8 Merge "Revert "remove app-ephemeral"" 2017-02-15 21:47:34 +00:00
Guang Zhu
c2f0d886f4 Revert "remove app-ephemeral"
Bug: 35390781

This reverts commit 4eb7cea562.

Change-Id: I94567d333b40f99f7a2573125259f4ab575a0519
2017-02-15 21:43:38 +00:00
Todd Kennedy
93a8e2c7d1 Merge "remove app-ephemeral" 2017-02-15 19:48:22 +00:00
Todd Kennedy
4eb7cea562 remove app-ephemeral
instant apps are no longer stored in a separate folder. they
are now stored along side other full apps in the apps directory.

Bug: 25119046
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: I6669be797987169a0b9cca78f80539c908812f9e
2017-02-15 07:06:02 -08:00
Narayan Kamath
669afcc9d0 Zygote: Add support for explicit preloading of resources.
Add a --preload-default command that instructs the zygote to preload
resources. The command is a no-op if resources have already been
preloaded.

Test: manual.
Change-Id: I4a846a7d911fa929af472d9071ffbff6df424176
2017-02-15 10:25:48 +00:00
TreeHugger Robot
33a119c94f Merge "Fix typo on DISALLOW_UNMUTE_DEVICE" 2017-02-13 18:48:28 +00:00
TreeHugger Robot
324deac37b Merge "Specify limitations of DISALLOW_UNINSTALL_APPS in documentation" 2017-02-13 15:15:08 +00:00
Esteban Talavera
492b4724fb Fix typo on DISALLOW_UNMUTE_DEVICE
Test: Builds sucessfully. Cannot find other usages in code search
Change-Id: I83f85b4715b11630b0ce0b471be536aef46a2936
2017-02-13 14:59:45 +00:00
Esteban Talavera
8bd7c52fb0 Specify limitations of DISALLOW_UNINSTALL_APPS in documentation
Bug: 24928722
Fix: 29871221
Bug: 31344846

Test: Builds successfully

Change-Id: I870c71d537da79b9dd50f81ba5394eb8afc8d839
2017-02-13 12:59:02 +00:00
Jeff Sharkey
500ce9ea58 Explicit API for allocating disk space.
Now that we're giving apps better guidance around how much cached
disk space they can use, we also need to provide a way to help clear
some of those cached files.  The final logic is coming in a future
CL, but it will be designed to prevent abuse.

Test: newly added CTS tests
Bug: 34690590
Change-Id: I1e46ade0cdabbc33162fc7bfa76abec711992f92
2017-02-12 04:02:28 -07:00
TreeHugger Robot
f98c2f2aa3 Merge "Clarified requirements for cross-user calls" 2017-02-11 02:40:04 +00:00
Fyodor Kupolov
cdb3c2fd04 Clarified requirements for cross-user calls
Test: make
Bug: 35199390
Change-Id: Ie997c690dd24439cc0e8d7fedfc58bd26b2c067f
2017-02-10 16:53:29 -08:00
Mikhail Naganov
7b79b6313b Merge "SchedulingPolicyService: specify the beneficiary of priority boost" 2017-02-10 16:19:46 +00:00
Mikhail Naganov
a0cb18dbfb SchedulingPolicyService: specify the beneficiary of priority boost
audioflinger needs to request priority boost on behalf of hal.
This way, a new use case is introduced for requestPriority call.

Bug: 34131400
Change-Id: I6cd0e509da2b0166ca4fce181287584179abe391
Test: check priority match between audioflinger's and hal's threads
2017-02-09 09:17:00 -08:00
songjinshi
bf99f78a38 Merge "[Debug]: Add timeout for dumpNativeBacktraceToFile." am: b6f7a85b85 am: ec69bd0aa3 am: 36bcc913f7
am: 78a3d9dab4

Change-Id: I421bf706b51fb657855dbc71a13919982e70fd44
2017-02-08 20:42:42 +00:00
songjinshi
78a3d9dab4 Merge "[Debug]: Add timeout for dumpNativeBacktraceToFile." am: b6f7a85b85 am: ec69bd0aa3
am: 36bcc913f7

Change-Id: Icf40ff98196d885e6974eb679532064b30bc68cd
2017-02-08 20:28:48 +00:00
Jin Qian
edf0a3715d BatteryManager: Add battery status to getProperty
Bug: 34198239
Change-Id: I65cef6864b1074445342e18f49c7cecd0706b938
2017-02-07 21:41:39 +00:00
songjinshi
e02e3ea7f9 [Debug]: Add timeout for dumpNativeBacktraceToFile.
If the debuggerd be blocked, the watchdog and
activitymanager thread will be blocked when the
ANR or watchdog occurs,so we needed to add
timeout for dumpNativeBacktraceToFile.

Change-Id: Iab1a64328e70257025d860638d93a4fb8eaaeea2
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2017-02-07 19:17:45 +00:00
Justin Klaassen
46d3d6d313 Remove experimental twilight-based automatic brightness
am: 614f40ea01

Change-Id: I1b0ec1645f38892adb894900b3b3725fc0b23452
2017-02-06 23:28:27 +00:00
Justin Klaassen
5483cea67a Remove experimental twilight-based automatic brightness
Bug: 31602449
Test: verified adaptive brightness no longer varies with twilight with
"brightness_use_twilight" set to "1".

Change-Id: I6b5f7310020b2128c2b292414a205b6052270a0a
2017-02-06 07:36:55 -08:00
Svet Ganov
0f4928f1f7 Refactoring of auto fill - lifecycle, auth, improvements
1. Move management of the remote fill service in a dedicated
   class that abstracts away the async and ephemeral nature
   of the binding.

2. Update auth to move fingerprint out of the platform and
   allow response and dataset auth.

3. Cleaned up the fill and save callback classes.

4. The UI is now shared among all sessions and cleaned up.

5. Reshuffled the remote callbacks to have cleaner separation.

6. Cleaned up and tightened the reponse and dataset classes.

7. Added API to support communicationn with intent based auth.

Test: CTS + manually

bug:31001899

Change-Id: Idc924a01d1aea82807e0397ff7293d2b8470d4d6
2017-02-06 04:02:35 +00:00
Paul Lawrence
46e48b9aa4 resolve merge conflicts of fde0a41065 to master
Test: Make sure builds, boots
Change-Id: Idf86dc5d888c09e8a65ada51fc2f32aae6d5570d
2017-02-02 13:28:45 -08:00
Paul Lawrence
fde0a41065 Install seccomp into zygote not init am: ef85477470 am: 521d25294b
am: e6e8c7a1dd

Change-Id: I97d2843a2c2940b558f216cf550891a80963be54
2017-02-02 18:37:22 +00:00
Paul Lawrence
ef85477470 Install seccomp into zygote not init
Bug: 34710876
Test: Boots, correct size filter installed, blocks unallowed calls

Change-Id: I3e66e8724ace37f7d30451b98a5e574766252ea0
2017-02-02 17:45:11 +00:00
Justin Klaassen
614f40ea01 Remove experimental twilight-based automatic brightness
Bug: 31602449
Test: verified adaptive brightness no longer varies with twilight with
"brightness_use_twilight" set to "1".

Merged-In: I6b5f7310020b2128c2b292414a205b6052270a0a
Change-Id: Ife9bf6d0f76df791cb7e6a22505d9f551da19731
2017-02-02 09:23:49 -08:00
Wale Ogunwale
5cd907d3d6 Alert Windows behavioral changes
- Introduced TYPE_APPLICATION_OVERLAY window type. Can be used by apps
to display windows on top of other app windows, but below critical
system windows.
- Deprecate alert window types TYPE_PHONE, TYPE_SYSTEM_ALERT,
TYPE_SYSTEM_OVERLAY, TYPE_PRIORITY_PHONE, and TYPE_SYSTEM_ERROR.
Apps should now use TYPE_APP_OVERLAY for this.
- Apps targetting O or greater are not allowed to add the old alert
window types.
Apps targetting less than O can still add the old types.
Apps with permission INTERNAL_SYSTEM_WINDOW (system signature apps) can
still add the old types.
- Z-order old alert windows types below TYPE_APPLICATION_OVERLAY if
they are added by an app without the INTERNAL_SYSTEM_WINDOW permission.

Test: android.server.cts.AlertWindowsTests
Bug: 33256752
Change-Id: I12170955a7a333151d3387c169b51c53c32164fc
2017-02-02 08:20:49 -08:00
TreeHugger Robot
97fe63bb53 Merge "Revert "Push mapping from file extension to GID."" 2017-02-01 08:56:55 +00:00
Christopher Tate
2d6c945b03 Make sure MASTER_CLEAR_NOTIFICATION goes to manifest receivers
It sometimes needs to launch OEM-supplied apps for processing, so make sure
it continues to do so.

Bug 34587823
Test: verified dispatch via logcat/dumpsys

Change-Id: Ic80e06582116cdd629492ed01a9b05b0e1b3822e
2017-01-31 20:52:39 +00:00
Jeff Sharkey
1009c08f8e Revert "Push mapping from file extension to GID."
This reverts commit f17e4cf1f9.
2017-01-31 01:09:14 -07:00
TreeHugger Robot
02f3a5f0e7 Merge "Minor updates to reflect libbinder changes." 2017-01-31 01:53:15 +00:00
Robert Quattlebaum
9cd7af310c Minor updates to reflect libbinder changes.
* Parcel: Update comment to reflect new file path
* IpPrefix: Update AIDL file to indicate appropriate C++ header

Change-Id: Ia9edccca5e8ef1f36a709b593a768003e1234dfa
2017-01-30 15:05:53 -08:00
Shukang Zhou
bb44e42de9 [Frameworks] Add an 'am' cmd option to enable streaming in profiling.
Add option '--streaming' to 'am start' and 'am profile' commands.
If the option is given, the output of method trace profiling
will be streamed into the specified file, so the output is no
longer limited by the buffer size.

Test: m -j48 test-art-host;
m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host;
I also tested manually. Tried all 8 combinations of
    sampling/instrumention
    streaming/non-streaming
    'am start --start-profiler' / 'am profile start'
The output files are all in expected shape.

Bug: 33300765

Merged-In: I8a5136a1c7330c8260b7c6c8da63f42a73aee275

Change-Id: I8a5136a1c7330c8260b7c6c8da63f42a73aee275
2017-01-30 13:07:40 -08:00
Nicolas Geoffray
628c0f1879 Merge "Introduce DEBUG_JAVA_DEBUGGABLE." am: 4df43ad959 am: 27ffe754a4 am: 1852c380e0
am: 96ea5ccef6

Change-Id: I4f8ba4240106ea84c29b6ae11dfc007af7048eb1
2017-01-30 15:32:25 +00:00
Nicolas Geoffray
96ea5ccef6 Merge "Introduce DEBUG_JAVA_DEBUGGABLE." am: 4df43ad959 am: 27ffe754a4
am: 1852c380e0

Change-Id: I8fcc8b0329269a0b21057f973b3a7dc5d8d80284
2017-01-30 15:26:29 +00:00
Nicolas Geoffray
4df43ad959 Merge "Introduce DEBUG_JAVA_DEBUGGABLE." 2017-01-30 15:09:45 +00:00
John Reck
6e4f930457 Merge "Fix a bunch of repeated reads of a ro.* property" am: 4265991701 am: e4c2e8f303
am: 3c2837e77e

Change-Id: Idbcb9dfeac57036d3621474ee65ba967cc7bc499
2017-01-27 23:05:52 +00:00
Treehugger Robot
4265991701 Merge "Fix a bunch of repeated reads of a ro.* property" 2017-01-27 22:49:04 +00:00
Nicolas Geoffray
347b1df988 Introduce DEBUG_JAVA_DEBUGGABLE.
For notifying ART it will run a debuggable app.

Also rename ENABLE_DEBUGGER to ENABLE_JDWP.

Test: builds and runs
bug: 28769520
Change-Id: Ic096a176edfd5bf0bbe92b8367fbaa687a07d284
2017-01-27 11:26:53 -08:00
John Reck
ed065024a5 Fix a bunch of repeated reads of a ro.* property
SystemProperties.get() is not particularly fast,
especially if a string is returned. Since ro.* values
are unable to be changed, there's no need to
continously re-query them. Cache the value at
static init time to trivially fix this.

Test: refactoring CL.
Change-Id: Iccb021d3cb2ba3a4a1d0048ddec6811bb7409eec
(cherry picked from commit aa67f684ff)
2017-01-27 11:04:39 -08:00
TreeHugger Robot
18c9dc53d2 Merge "StrictMode detectAll() based on target API level." 2017-01-27 01:41:35 +00:00