Commit Graph

11539 Commits

Author SHA1 Message Date
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
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
Bryce Lee
0259473b75 Merge "Add aborted start result." into oc-dev
am: 8796c20dae

Change-Id: I893c429db5c71747fda8e390ee7d9d786ce0c53a
2017-06-27 04:20:34 +00:00
Bryce Lee
f9d4954f30 Add aborted start result.
Previously, we were returning START_SUCCESS when ActivityStarter
aborted launching the activity. This hides this activity and makes it
harder to debug.

This CL adds a new start result type to capture this internally.

Bug: 38121026
Test: manual
Test: go/wm-smoke
Change-Id: I97699b22b1eff476724c48db0c29daa0566ad280
2017-06-26 16:27:32 -07:00
Jeff Sharkey
adcd1fe0f6 Merge "Progress towards FBE and adoptable storage." 2017-06-26 17:41:47 +00:00
Richard Uhler
a18500b508 Fix bug in reporting SwapPss in dumpsys meminfo.
am: a178205e8b

Change-Id: I49c805c6fab673008b18a5a8deb256ec2a5fb970
2017-06-26 09:01:32 +00:00
TreeHugger Robot
e59243772a Merge "Fix bug in reporting SwapPss in dumpsys meminfo." 2017-06-26 06:36:36 +00:00
Richard Uhler
a178205e8b Fix bug in reporting SwapPss in dumpsys meminfo.
Bug: 29875093
Test: Run dumpsys meminfo -a, verify SwapPss adds up and is non-zero
      for dalvik and native.

Change-Id: I79d0b6a59bf5f4e73f75f0b9540ec0fcc9e23b02
2017-06-26 06:34:04 +00:00
Jeff Sharkey
a65e6491e4 Progress towards FBE and adoptable storage.
Offer to adopt storage devices on FBE devices, but keep it guarded
behind a system property for now, since we still need to work out key
storage details.

Verify that all users are unlocked before moving apps or shared
storage.  We only need them to be unlocked; we don't need them to
be actually running.

Have PackageManager dump the set of volumes that it's finished
scanning and loading, since otherwise CTS can get excited and race
too far ahead of it.  Add a specific error code to communicate
that users are locked.

Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 37436961, 29923055, 25861755, 30230655
Change-Id: I749dc3d8148e1a95d8bc4be56665253ef826d3fe
2017-06-23 16:35:15 -06:00
Ying Xu
12148fa980 Merge "Add flag to wipe eUICC data" into oc-dr1-dev am: 05ce703c87
am: a465181691

Change-Id: I8a54d9ab00223155e473b7ea4683a48def627288
2017-06-23 21:14:22 +00:00
Ying Xu
a465181691 Merge "Add flag to wipe eUICC data" into oc-dr1-dev
am: 05ce703c87

Change-Id: I556f01f7f317e639f8a33a981154721e53a95641
2017-06-23 21:04:25 +00:00
Ying Xu
05ce703c87 Merge "Add flag to wipe eUICC data" into oc-dr1-dev 2017-06-23 20:52:56 +00:00
yinxu
f4f9cec234 Add flag to wipe eUICC data
Add a new flag in the DevicePolicyManager so that we can Use
EuiccManager#eraseSubscriptions(PendingIntent) to erase all the carrier data
from eUICC chip if the user choose to "ERASE" from the Android device manager.

Bug: 37277944
Test: E2E
Change-Id: Ia78090a00d956c645725be4fd591e02ded8ec467
2017-06-23 10:56:55 -07:00
Richard Uhler
91702eb391 Fix bug in reporting SwapPss in dumpsys meminfo.
Bug: 29875093
Test: Run dumpsys meminfo -a, verify SwapPss adds up and is non-zero
      for dalvik and native.

Change-Id: I79d0b6a59bf5f4e73f75f0b9540ec0fcc9e23b02
2017-06-23 16:54:25 +01:00
TreeHugger Robot
360eea897f Merge "Remove 'unused' import" 2017-06-23 15:10:12 +00:00
Benjamin Franz
482bb2343f Remove 'unused' import
Unused import android.provider.Settings previously caused checkstyle
script to bark on DevicePolicyManager. Remove the import and update all
usages of it in javadocs.

Bug: 37890361
Test: make docs
Change-Id: I3134d97274b2882060f5172170517ce501d5aafd
2017-06-23 13:49:36 +01:00
Seigo Nonaka
c25c3da8b6 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
(cherry picked from commit 6d6cd68660)
2017-06-23 12:27:23 +00:00
Seigo Nonaka
b7773ce875 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
(cherry picked from commit 6d6cd68660)
2017-06-23 10:02:59 +00:00
Seigo Nonaka
ba12631bba Merge "Stop loading other package's font by default." into oc-dev
am: 824d75e0e1

Change-Id: I5518dbd8b5d8a4548ea00bbfca0e3aee87880ee7
2017-06-23 04:23:44 +00:00
Seigo Nonaka
80f6a985c3 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 19:07:17 -07:00
TreeHugger Robot
abc6fd57de Merge "Stop loading other package's font by default." 2017-06-22 22:28:10 +00:00