Commit Graph

11558 Commits

Author SHA1 Message Date
TreeHugger Robot
053fd81b89 Merge "Don't clobber application's strict mode" 2017-07-06 20:01:21 +00:00
TreeHugger Robot
26ae3157eb Merge "Change storage migration to use quota APIs." 2017-07-06 19:33:59 +00:00
Kurt Nelson
5e154365a4 Don't clobber application's strict mode
Applications often configure strict mode in Application.onCreate. A
regression was added in I2614f8bb30203e00953b1978bbcaf24d84d0397b that
applied a strict mode override for a longer period of time than needed.

Test: Launched a few applications
Bug: 36951662
Change-Id: I30b3eafa4a833fc42d0a938da9446007ade80480
2017-07-06 18:31:43 +00:00
Jeff Sharkey
c8b29ac6f0 Change storage migration to use quota APIs.
New quota APIs are much faster than trying to measure manually, and
removing this last user of calculateDirectorySize() means we can
remove it once and for all.

Bug: 36056324
Test: builds, boots
Change-Id: Ibdf1ee4e8885680e106df6a9269b6309ddc61af8
2017-07-06 11:29:10 -06:00
Rubin Xu
c2d0119650 Merge "Add more javadoc to ConnectEvent and DnsEvent" 2017-07-06 17:00:31 +00:00
Rubin Xu
0a537bbf91 Add more javadoc to ConnectEvent and DnsEvent
Bug: 63382615
Test: make -j32 docs
Change-Id: I78c35ac2e4fee827d835e0b40b8e769bf1fa553d
2017-07-06 15:42:08 +01:00
TreeHugger Robot
969d492531 Merge changes from topic 'hackbod_completion'
* changes:
  Fix issue #63095854: adb shell cmd jobscheduler timeout reports...
  Add reporting of how jobs complete.
2017-07-06 02:02:21 +00:00
TreeHugger Robot
e97ff16f34 Merge "Log Bundle statistics when too large." 2017-07-06 00:46:25 +00:00
Jeff Sharkey
a6bfeae295 Log Bundle statistics when too large.
When we have trouble pushing a saved instance state Bundle out of
a process, log high-level statistics to help narrow down where bloat
is coming from.

Bug: 62409379
Test: builds, boots, stats logged
Change-Id: Iaff01eaf31ff0fd4d0fde3da15e9526dac559af9
2017-07-05 16:50:26 -06:00
TreeHugger Robot
8121d2542b Merge "Require READ_EXTERNAL_STORAGE to read wallpaper imagery" 2017-07-05 20:31:26 +00:00
TreeHugger Robot
80350e22cf Merge "Avoid stale caching of print and companion system services" 2017-07-05 19:58:04 +00:00
Christopher Tate
93252de33e Require READ_EXTERNAL_STORAGE to read wallpaper imagery
We now require the READ_EXTERNAL_STORAGE permission for an app to
be allowed to read the system's wallpaper imagery.  This is a
logged-but-benign no-op failure for apps targeting API levels up
through Android O, but a crashing failure (SecurityException) for
apps that target API levels newer than O.

Also, marked the permission-requiring parts of the formal API
with appropriate @RequiresPermission annotations.

Bug 30770233
Test: bit CtsPermissionTestCases:.NoWallpaperPermissionsTest

Change-Id: Id75181f05d05e5ca32f5fefcbe15dc81de264dff
2017-07-05 18:29:53 +00:00
Neil Fuller
c523f4dc0c Merge "Add dumpsys support to RulesManagerService" am: 348a1d635d am: 06c2f8e346 am: 61ea5e6c8f
am: 78526c3341

Change-Id: I2e4e2d5291d59933f2c6225384b2fb7464fb0e57
2017-07-03 10:02:45 +00:00
Neil Fuller
78526c3341 Merge "Add dumpsys support to RulesManagerService" am: 348a1d635d am: 06c2f8e346
am: 61ea5e6c8f

Change-Id: If516a2daeeb38490add4570bbd937801906b356d
2017-07-03 09:53:28 +00:00
Neil Fuller
61ea5e6c8f Merge "Add dumpsys support to RulesManagerService" am: 348a1d635d
am: 06c2f8e346

Change-Id: I23f60a0c235780afd551cbe5f546918317bfe098
2017-07-03 09:47:03 +00:00
Neil Fuller
06c2f8e346 Merge "Add dumpsys support to RulesManagerService"
am: 348a1d635d

Change-Id: Ib1b44ce174b625f2223dff72081ccfc7b2a9b390
2017-07-03 09:41:47 +00:00
Svet Ganov
ec7daa59be Avoid stale caching of print and companion system services
Test: manual

bug:62297669

Change-Id: I2029ec292a80aefcaf9f0aab27a0564c68486fe9
2017-06-30 12:03:02 -07:00
Neil Fuller
87b1128ddc Add dumpsys support to RulesManagerService
Override the dump method so RuleManagerService can dump its state
into logs. Crude argument support has been added for dumping
specific fields in an easy to process way (for test scripts to use).

Tested with:
make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above.
Test: Manual; adb shell dumpsys timezone [-format_state piscotz]
Bug: 31008728
Change-Id: I0ad83aa245232ed0b983ceacd8accfb876824d6f
2017-06-30 18:18:07 +01:00
Andreas Gampe
83085bb3dd Frameworks: Add agent to ProfilerInfo
Add an agent option to ProfilerInfo. If set, on bindApplication
attempt to attach the given agent to the app before loading the
app itself.

Bug: 62445317
Test: m
Test: Device boots
Test: Manual profiling tests
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAmProfileTests
Test: Manual agent test
Test: cts-tradefed run commandAndExit cts-dev --module CtsJvmtiAttachingHostTestCases
Change-Id: I1f0c4121e22351fd3a964dd0a915100a620d4f84
2017-06-29 20:42:32 -07:00
Andreas Gampe
2b073a0e89 Frameworks: Clean up ProfilerInfo
Use a ProfilerInfo object in ActivityManagerService to reduce the
number of exposed fields. In preparation for adding an agent during
startup.

Bug: 62445317
Test: m
Test: Device boots
Test: Manual test for profiling
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAmProfileTests
Change-Id: I5fa347ded760c263a8ce3754bb2631205ea7b4b8
2017-06-29 20:42:25 -07:00
Christopher Tate
2f4953a9b7 Merge "Don't synchronize inside getWallpaperColors()" into oc-dr1-dev am: 2de66f7be1
am: 0d95a0eefa

Change-Id: I9b5f7e4b60534d42728d54f5dd40320dbc518885
2017-06-29 22:44:38 +00:00
Chavi Weingarten
a46b76fd50 Merge "Added Activity flags to show on lock screen." 2017-06-29 22:41:05 +00:00
Christopher Tate
0d95a0eefa Merge "Don't synchronize inside getWallpaperColors()" into oc-dr1-dev
am: 2de66f7be1

Change-Id: Id453b9477272c8d10738a06626411dfda58cea74
2017-06-29 22:34:22 +00:00
TreeHugger Robot
2de66f7be1 Merge "Don't synchronize inside getWallpaperColors()" into oc-dr1-dev 2017-06-29 22:26:34 +00:00
Santos Cordon
266bd0d6ca Merge "Add ability to turn off VR virtual display functionality." into oc-dr1-dev am: 67143a8cfc
am: 99eac47966

Change-Id: I5fb247a2291ee4fdc96b25e297cb7f7e0ec49d5a
2017-06-29 21:38:42 +00:00
Santos Cordon
99eac47966 Merge "Add ability to turn off VR virtual display functionality." into oc-dr1-dev
am: 67143a8cfc

Change-Id: I9a65c8a9c33ffe4a982d090966654f4e93690c3b
2017-06-29 21:31:53 +00:00
chaviw
59b9885bc8 Added Activity flags to show on lock screen.
Added two new flags to the Activity to turn the screen on and
show on the lock screen. These can be used instead of the Window flags
LayouParams.FLAG_TURN_SCREEN_ON and LayoutParams.FLAG_SHOW_WHEN_LOCKED
to prevent the double onStart/onResume lifecycle events.

The flags can be set as an attr for the Activity in the AndroidManifest
using android:showWhenLocked="true" and android:turnScreenOn="true".
They can also be set through methods in the Activity class using
setShowWhenLocked(true) and setTurnScreen(true).

Fixes: 36850100
Test: Created sample application, tests/ShowWhenLockedApp, that set the
      flags in the manifest and code. Tested multiple scenarios to
      launch the Activity with the flags set and unset.
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.KeyguardTransitionTests
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.ActivityManagerActivityVisibilityTests
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.KeyguardTests

Change-Id: I44f0e313df4531d49c7ac56108b6bf80e41fefc1
2017-06-29 13:33:43 -07:00
Santos Cordon
627a68f852 Add ability to turn off VR virtual display functionality.
Add flag to enable/disable virtual displays via the existing
setDisplayProperties API. This makes it possible for the VR system
to turn off virtual displays if necessary after we ship.

Bug: 62546364
Test: Run 'adb shell vr enable-virtual-display [true|false] to toggle while 2d in 3d
runs.

Change-Id: Iae029be501d61189fced981dbc554e984fa7ed4b
2017-06-29 19:01:39 +00:00
Wale Ogunwale
c981ad5af3 Remove visibleBehind functionality
The feature is no longer used by the TV team which was the only
product using it, so removing to reduce code complexity.

Test: go/wm-smoke
Change-Id: I563e30486ec4439f550b5adb94c4c617ea2a346b
2017-06-29 09:08:45 -07:00
Neil Fuller
5f06cf4690 Merge "Use sendBroadcastAsUser rather than sendBroadcast" am: d129a14647 am: 93b232db41 am: 95eab26704
am: 488469fac3

Change-Id: Ibef988b2491c32f16c806402f907db1754a22fb2
2017-06-29 12:01:44 +00:00
Neil Fuller
488469fac3 Merge "Use sendBroadcastAsUser rather than sendBroadcast" am: d129a14647 am: 93b232db41
am: 95eab26704

Change-Id: I3fee39d494d9ea041351218e72ebbe65bdb07637
2017-06-29 11:53:48 +00:00
Neil Fuller
95eab26704 Merge "Use sendBroadcastAsUser rather than sendBroadcast" am: d129a14647
am: 93b232db41

Change-Id: I749e98ea84dd8c3811d302848a14576c6aff8fb1
2017-06-29 11:45:04 +00:00
Neil Fuller
93b232db41 Merge "Use sendBroadcastAsUser rather than sendBroadcast"
am: d129a14647

Change-Id: I76324b2d983887dbdac4b26e518a68d8c4035a47
2017-06-29 11:37:13 +00:00
Robert Carr
7ac5c00246 Merge "Merge "Disable requestVisibleBehind." into oc-dev am: e33c33e38a am: 1c89591f94" into oc-dr1-dev-plus-aosp
am: 72f4e8e370

Change-Id: Ie77f01858b133233f8278e59edaa17fbc2f1a51c
2017-06-29 02:40:17 +00:00
Robert Carr
c09f11ad36 Merge "Disable requestVisibleBehind." into oc-dev am: e33c33e38a
am: 1c89591f94

Change-Id: Ife4908481549c956a23118ce5f8422161cc73d9e
2017-06-29 02:24:23 +00:00
Robert Carr
da72cb368e Merge "Disable requestVisibleBehind." into oc-dev
am: e33c33e38a

Change-Id: I29e5507d716e19060d4c0578d4b4df3bcfa30069
2017-06-29 02:15:32 +00:00
Dianne Hackborn
94326cb56a Add reporting of how jobs complete.
In both battery stats and job scheduler statistics, keep track of
the reason jobs are ending.  This can help to identify apps that
are having bad behavior with jobs (in particular, regularly timing
out their job instead of finishing it when done).

Test: manual
Change-Id: Icc12d5e0dc0df1906716e7d995c56d50a9fa148a
2017-06-28 17:44:00 -07:00
Robert Carr
1c89591f94 Merge "Disable requestVisibleBehind." into oc-dev
am: e33c33e38a

Change-Id: Ie0733cb79acbe34536c4c031f1234dac134841d3
2017-06-29 00:26:35 +00:00
TreeHugger Robot
e33c33e38a Merge "Disable requestVisibleBehind." into oc-dev 2017-06-29 00:17:19 +00:00
TreeHugger Robot
77bada7e98 Merge "Fix ACTION_PROVISIONING_SUCCESSFUL documentation" 2017-06-28 12:00:32 +00:00
Esteban Talavera
4047bae5db Fix ACTION_PROVISIONING_SUCCESSFUL documentation
The current documentation implies that the intent is sent to the
application that requested provisioning (which would be in the
primary profile for managed profile provisioning). However it is
sent to the new DO or PO only.

Test: make docs
Change-Id: I9d1f66ec6f3d6d7fbaa1617d13a7da12d4acb490
2017-06-28 11:03:09 +01:00
Christopher Tate
dbf4a9c274 Don't synchronize inside getWallpaperColors()
Reading the current wallpaper's palette doesn't involve any state
inside the WallpaperManager instance, so there's no reason to
apply synchronization in the first place.  By doing so we were
inducing a great deal of lock contention, since the system side
of the operation can sometimes take a long time to execute.

Bug 63065764
Test: manual

Change-Id: I6f5f67a0819da23245a4ad5334f0942011467f7c
2017-06-27 15:27:36 -07:00
Sudheer Shanka
ae4d5d93bd Merge "Check and block for network connectivity in onStart as well." 2017-06-27 21:24:33 +00:00
Robert Carr
8661c5e519 Disable requestVisibleBehind.
As there is no caller for the SystemAPI convertToTranslucent, there is no situation
where requestVisibleBehind will actually result in the activity becoming
visible behind. However we have bugs in the requestVisibleBehind code-path,
so rather than fix them...it seems better to just prevent ourselves from
running in to them. Full deletion of the code-path is scheduled for post-O
branches.

Change-Id: I6e7c79e036986564d2d443a603e63c341de23057
Fixes: 62512584
Test: Repro from bug. go/wm-smoke.
2017-06-27 13:46:14 -07:00
TreeHugger Robot
77198fa260 Merge "Strip extenders on android go devices." 2017-06-27 19:00:27 +00:00
Neil Fuller
23eb3a19b8 Use sendBroadcastAsUser rather than sendBroadcast
According to messages in the logcat sendBroadcastAsUser
is the better option.

Test: Manual
Bug: 31008728
Change-Id: I06bcd3c53878fc2b1b817337ea8719fcc4975501
2017-06-27 19:04:50 +01:00
Julia Reynolds
8a3b459765 Strip extenders on android go devices.
Test: runtest notification-systemui
Bug: 35219985
Change-Id: I5a2d25c4ea33510c397b351d3604bd3f23f81521
2017-06-27 13:19:15 -04:00
Bryce Lee
f9403a6fa1 Merge "Add aborted start result." into oc-dev am: 8796c20dae am: 943794bb70
am: ee289616fb

Change-Id: I1b69a9fb813e2cab1a3c8b496ea5b753cdf3abe6
2017-06-27 04:31:39 +00:00
Bryce Lee
ee289616fb Merge "Add aborted start result." into oc-dev am: 8796c20dae
am: 943794bb70

Change-Id: I9bf7aa7a5b1e8fbf7ccdea5a883c0ce98fa8f3ff
2017-06-27 04:27:08 +00:00
Bryce Lee
943794bb70 Merge "Add aborted start result." into oc-dev
am: 8796c20dae

Change-Id: I849ea5bfce87bd6a9264308e40242f6a2026713c
2017-06-27 04:20:35 +00:00