Commit Graph

8195 Commits

Author SHA1 Message Date
Adam Lesinski
f02523bf4b Fix regression with defaultDisplay adjustments
ag/1542219 introduced a regression where if the display was the default
display, the configuration would still be adjusted as if it were
a non-default display. This fixes that logic to only adjust the
configuration if the display is non-default.

Bug:32133693
Test: cts-tradefed run cts --module CtsServicesHostTestCases --test android.server.cts.ActivityManagerAppConfigurationTests#testConfigurationUpdatesWhenRotatingToSideFromDocked
Change-Id: Ib2fda8c1651609efa9d20b3e2dace8a122864916
2016-10-18 20:13:57 +00:00
Adam Lesinski
4309721843 Update DisplayMetrics even on default display
Fix a bug where the DisplayMetrics wouldn't be updated for a Resources
object on the default display. Since multi-window, we want to update
all Resources.

This didn't always manifest itself due to recreation of assets, which
would force an update of DisplayMetrics. Re-use of an AssetManager from
the cache would expose the bug.

Bug:32133693
Bug:31998629
Test: cts-tradefed run cts --module CtsServicesHostTestCases
Change-Id: Ic51ab82710517b87eb995ccf982085dba876ad58
2016-10-14 18:16:18 +00:00
TreeHugger Robot
a6b3caf58e Merge "Don't expose default strong auth timeout as constant" into nyc-mr1-dev 2016-10-13 22:47:30 +00:00
Christopher Tate
da2018efeb Only full-data back up regular files + directories
Ignore every filesystem entity that is not a regular file or directory.
In particular, we now ignore not only symlinks but also sockets, pipes,
et cetera.

Bug 32143362

Change-Id: If51b54df1f7a643af145eb15bf12d389d19f8780
2016-10-13 12:19:45 -07:00
Adrian Roos
7af5362571 Fix Notification.Action.Builder copy constructor
The copy constructor of Notification.Action.Builder did not copy
the mAllowGeneratedReplies field.

Change-Id: I40fbe8950ee2232e2589ab3930a32bfbebe9fc89
Fixes: 31766718
Test: runtest --path $T/cts/tests/app/src/android/app/cts/NotificationTest.java
2016-10-12 15:19:55 -07:00
Michal Karpinski
6dbf67fc48 Don't expose default strong auth timeout as constant
The admin can instead use the value of 0 to reset to default.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java

Bug: 31430135
Change-Id: I0d6b29ca4eca65d7ca72a8975a0c28c9050a946c
(cherry picked from commit 943aabd11c)
2016-10-12 09:34:12 +00:00
TreeHugger Robot
67c70a263c Merge "Updates documentation for MessagingStyle constructor" into nyc-mr1-dev 2016-10-07 20:34:50 +00:00
Rob Carr
93becf5148 Merge "When adding dialog window but not creating update the configuration." into nyc-mr1-dev 2016-10-07 19:16:02 +00:00
Alex Hills
fd590441c1 Updates documentation for MessagingStyle constructor
MessagingStyle expects the field userReplyName to be non-null, but the
documentation doesn't describe it as such. This updates the documentation
to say the field is required, and adds a NonNull annotation.

This has no behavior changes.

BUG:31747744
Change-Id: If832d059c276e856fba366dabfa8a5821bb63054
2016-10-07 15:44:23 +00:00
Robert Carr
d7dbec7e4c When adding dialog window but not creating update the configuration.
When we dismiss the dialog as opposed to hide it, it is removed
from the local WindowManagerGlobal's list of ViewRoots. Thus it stops
receiving configuration changes. When first adding a ViewRoot it will
pull the configuration from the context, but in this case
we are reusing one which has already been added and removed
and no such action will occur.

Bug: 31004614
Change-Id: Ie247bcf1a14caf4a42413c6813e337aa4c88e3e4
2016-10-05 13:44:36 -07:00
Chris Tate
ee28c8c22c Merge "Explicitly close FD binder parameters in backup/restore API calls" into nyc-mr1-dev 2016-10-03 21:06:22 +00:00
Hemal Patel
63b5e3ddd1 Docs: Fixed the Service link am: 1918214589
am: eb21088b67

Change-Id: Ia687d1ba27eee87abe412e8a8dd11e49e5f02100
2016-10-01 01:54:45 +00:00
Hemal Patel
eb21088b67 Docs: Fixed the Service link
am: 1918214589

Change-Id: Icfd4e033b7ef9bd915f106abc789f11fb4ede301
2016-10-01 01:45:58 +00:00
Christopher Tate
91bb0e5cca Explicitly close FD binder parameters in backup/restore API calls
CloseGuard is grateful.

Bug 30893100

Change-Id: Ia6bd4d88204839add59d9d245aad673d67b11bea
2016-09-30 17:52:19 -07:00
Hemal Patel
1918214589 Docs: Fixed the Service link
Bug: 29086415
Change-Id: Id9505ade39c19eb817f556d72f689568148e1782
2016-09-30 14:59:23 -07:00
TreeHugger Robot
b0216412a2 Merge "Add count of WebView instances to meminfo" into nyc-mr1-dev 2016-09-26 14:33:31 +00:00
Alan Viverette
2525b0dab3 Merge "Allow developer to override Material-style modes in picker dialogs" into nyc-mr1-dev 2016-09-23 19:29:54 +00:00
Miao Wang
6b5d4723d2 Merge "Enable shader cache for applications that shared UID with multiple packages too" into nyc-mr1-dev 2016-09-23 17:28:54 +00:00
Michal Karpinski
69659cb96d Merge "Fingerprint Strong auth timeout" into nyc-mr1-dev 2016-09-23 07:01:51 +00:00
Chris Tate
bd2a00f848 Merge "Fix crash in clearWallpaper()" into nyc-mr1-dev 2016-09-22 22:10:13 +00:00
Chris Tate
0bb29a8981 Merge "Add hidden intent extra about service availability" into nyc-mr1-dev 2016-09-22 21:58:30 +00:00
Christopher Tate
a2bd512034 Fix crash in clearWallpaper()
The underlying clearWallpaper() service method demands that only a
single kind of wallpaper be specified as the target; but a recent
patch attempted to expand the client-side legacy method to apply to
all kinds of wallpaper, incorrectly.  This patch corrects that client-
side code to do things properly.

Bug 30456015

Change-Id: I0a881957b881206e5eb775c6879ba90f10f9ffb0
2016-09-22 13:18:05 -07:00
TreeHugger Robot
6b87569b4c Merge "Null check for restoring LoaderManagers" into nyc-mr1-dev 2016-09-22 19:29:25 +00:00
TreeHugger Robot
8da796d0b8 Merge "Save activity state before stopping acitivity when device sleeps" into nyc-mr1-dev 2016-09-22 19:27:27 +00:00
Adam Powell
100ba76d7a Null check for restoring LoaderManagers
Bug 31671195
Test: core/tests/coretests/src/android/app/LoaderLifecycleTest.java

Change-Id: Ib553f7611814cc6759488aec505fd126ee664a9d
2016-09-22 10:53:45 -07:00
Shuo Gao
1e6d77e836 Enable shader cache for applications that shared UID with multiple packages too
Bug: 31224514

Frameworks supported a mature mechanism for shader cache per each package already,
but as a special case such as Settings APP, if there are several packages in this
application which means that multiple packages shared the same SharedUserID with it,
it won't initialize the graphics disk caches, thereby APP like Settings have to
rebuild and relink shader every time during launch, which cause a bad launching
performance, so here to enable the GFX and RS cache initialization for multiple
shared packages case too.

Change-Id: If0f927e3399b775804abf1d9a868887951f471c5
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
(cherry picked from commit 7c69a669a5)
2016-09-22 10:46:49 -07:00
Vladislav Kuzkokov
dd6230d466 Merge "Add DevicePolicyManager.setBackupServiceEnabled as hidden API." into nyc-mr1-dev 2016-09-22 17:09:06 +00:00
Alan Viverette
8817aa9339 Allow developer to override Material-style modes in picker dialogs
A recent fix prevented developers from specifying Holo-style mode when
displaying a date or time picker dialog. This CL also cleans up unused
code in TimePickerDialog and documents how themeResId will be used.

Adds hidden @TestApi methods for use in CTS tests. These may be made
public later, but it's too late in MR1 for API changes.

Bug: 31586821
Test: Ice2e203983769f1ea1cfa93105eb97b6fa5176b9
Change-Id: I1b7512b7647ddd7ab987beac2c0aef4fe7cc16bc
2016-09-22 11:16:22 -04:00
Wale Ogunwale
b5066fe307 Save activity state before stopping acitivity when device sleeps
Makes it consistent with the regular stop code path and allows
for the activity to be relaunched with the right state if a
relaunch happens after stop due to sleep.

Bug: 30241363
Change-Id: I92edfe6e0e3f5c7ce3b56d49df31e601a798cd4f
2016-09-22 07:32:40 -07:00
TreeHugger Robot
33c9713bdd Merge "Don't hold old host callback for fragments on the back stack" into nyc-mr1-dev 2016-09-22 00:50:00 +00:00
Christopher Tate
38c9c30640 Add hidden intent extra about service availability
Backup has some subsidiary UI needs that are vendor specific,
and policy state is not readily observable from there.  We
therefore inform the sublaunched UI explicitly about the state
via an intent extra in the launch intent (rather than requiring
an API call from the launched UI).

Bug 30126678

Change-Id: I37f9530edbc00eea6c96f2c9fd67e878c07068c9
2016-09-21 17:18:10 -07:00
Adam Powell
180202f221 Don't hold old host callback for fragments on the back stack
LoaderManagers configure their host callback lazily as their
associated fragment is brought up through its lifecycle states. In the
case of fragments on the fragment back stack this could happen very
late, if at all. As a LoaderManager's host callback references the
host Activity, this means that a LoaderManager could keep a destroyed
Activity reference alive.

Update the host callbacks of all LoaderManagers eagerly during the
restore non-configuration instance phase.

Bug: 30653222
Test: core/tests/coretests/src/android/app/LoaderLifecycleTest.java
Change-Id: I5d2b81daae5e7cae429fcf4934e64b3ce281140c
2016-09-21 15:47:06 -07:00
Edward Savage-Jones
6009d9db88 Fix WallpaperManager APIs
When support for lockscreen wallpapers was added in API level 24 the
behaviour for earlier API versions changed. Calls to the old 'set' APIs
no longer affect the overall device wallpaper, and can result in an end
user not being able to change their lockscreen wallpaper.

This upload restores the original API behaviour.

Bug: 31204228
Bug: 30456015
Change-Id: Ia16d2e2e379c54d798eef8f5c653099c2c581d78
2016-09-21 15:13:39 -07:00
Julia Reynolds
d0f20c2bbd Merge "Null check action cloning." into nyc-mr1-dev 2016-09-19 20:35:34 +00:00
Dianne Hackborn
da6be5b871 A little more on issue #30766518: Document what targeting N does
(cherry picked from commit 5f1649e852)

Change-Id: Ieaad1f3ddfa7ef3444e3b513181555f87ecb8c3f
2016-09-19 20:05:07 +00:00
Dianne Hackborn
491bc2b8d6 Cherrypick so we can publish N version code description ASAP
Fix issue #30766518: Document what targeting N does

Also small documentation cleanup in a few other places.

(cherry picked from commit b34cbedb4e)

Change-Id: I9560b29faa4f2674277349272af8193122a1f95e
2016-09-19 19:31:19 +00:00
Richard Uhler
2c0361986b Add count of WebView instances to meminfo
Switch to using more efficient countInstancesOfClasses method for
counting WebView and other kinds of instances.

Test: Launch Gmail, view a message, verify some WebView objects are
      reported in dumpsys meminfo.
Bug: 31016396

Change-Id: Ib0146ee2931877399da07f854d50c2ab52092b6b
2016-09-19 08:59:23 +01:00
Jeff Sharkey
ec0933c4bf Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537 am: df42d732f8 am: afcd1135c3 am: fc1c0f9dff am: 33ada2e927 am: db901ee296
am: 6495c5ef30

Change-Id: I0e5463ab40cbea425badf360388d316a50299dd0
2016-09-17 00:34:52 +00:00
Jeff Sharkey
6495c5ef30 Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537 am: df42d732f8 am: afcd1135c3 am: fc1c0f9dff am: 33ada2e927
am: db901ee296

Change-Id: I683e1c33b8058a597163aacfc744df339188cd37
2016-09-17 00:23:53 +00:00
Jeff Sharkey
db901ee296 Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537 am: df42d732f8 am: afcd1135c3 am: fc1c0f9dff
am: 33ada2e927

Change-Id: I9b6d2b6f9101e7e7610f191cd4927d568ae0476a
2016-09-17 00:13:26 +00:00
Jeff Sharkey
33ada2e927 Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537 am: df42d732f8 am: afcd1135c3
am: fc1c0f9dff

Change-Id: I4c197be781f981af568ae98e1c3358ce8572e39a
2016-09-16 23:40:13 +00:00
Jeff Sharkey
fc1c0f9dff Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537 am: df42d732f8
am: afcd1135c3

Change-Id: I9cbfddb282796b2425a0da76760bde0ebd8336b4
2016-09-16 23:31:45 +00:00
Jeff Sharkey
afcd1135c3 Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537
am: df42d732f8

Change-Id: Ib7efd9dacf476d8a717456d8e6fc7ee617483d17
2016-09-16 23:14:51 +00:00
Jeff Sharkey
df42d732f8 Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into manual_merge_0a9d537
Change-Id: Ib1a0bbb34edb61666ac5739f0b0eaadbe4c5fe06
2016-09-16 16:57:55 -06:00
Jeff Sharkey
0a9d537f62 Use "all_downloads" instead of "my_downloads". am: 1547194418 am: f6d7c1ed15
am: 6db572cf00

Change-Id: I687a883d528cc260aad3ee3da5600d3e0542c940
2016-09-16 22:07:27 +00:00
Jeff Sharkey
f6d7c1ed15 Use "all_downloads" instead of "my_downloads".
am: 1547194418

Change-Id: I6dabba1f82ef1989eb2a52c3c493127a174ff315
2016-09-16 21:48:24 +00:00
Julia Reynolds
53c934cb75 Null check action cloning.
Bug: 31275706
Change-Id: I7f8c14a5863d2f787b9090ef740e80ce0c4b9335
2016-09-16 18:07:36 +00:00
Jeff Sharkey
1547194418 Use "all_downloads" instead of "my_downloads".
We can no longer return the "my_downloads" paths: if those Uris were
shared beyond the app that requested the download, access would be
denied.  Instead, we need to switch to using "all_downloads" Uris so
that permission grants can be issued to third-party viewer apps.

Since an app requesting a download doesn't normally have permission
to "all_downloads" paths, DownloadProvider now issues narrow grants
toward the owner of each download, both at device boot and when new
downloads are started.

Bug: 30537115, 30945409
Change-Id: I533125b36444877f54373d88922f2acc777e250b
2016-09-16 12:04:05 -06:00
Michal Karpinski
0b72a722ed Fingerprint Strong auth timeout
Allows PO and DO configure strong auth timeout for fingerprint.

Bug: 31430135
Change-Id: Ie6451d49aa95527adc3720d9a2a0848f58940510
(cherry picked from commit 8f010dd25d)
2016-09-15 12:01:26 +00:00
Rubin Xu
89927b3cd9 Allow direct-boot aware activity to show before profile is unlocked
Work profile challenge is shown by intercepting normal activity launching and
replacing it with the confirm credential activity. For direct boot aware
activities, they should be able to be displayed when the work profile is
still locked, so add a conditional in the activity intercepting logic to bypass
work challenge in this case.

Also launching work profile activities from notification is handled specially
in order to avoid dismissing the notification if the work challenge is canceled,
so add similar logic there to allow direct boot aware activity to go through.

Bug: 30296144
Change-Id: Ib6395271cee2d4781009bb08d50351d73824de0c
2016-09-14 11:59:56 +01:00