Commit Graph

11686 Commits

Author SHA1 Message Date
Jeff Sharkey
c2e09129e0 Merge "Remove a bunch of deprecated @SystemApi." into oc-mr1-dev 2017-08-12 03:21:01 +00:00
Jeff Sharkey
8478911f5e Remove a bunch of deprecated @SystemApi.
Verified that nobody should be using these APIs, and they've been
deprecated long enough that we can remove them.

Bug: 62341924, 62263907, 62264550
Test: make -j32 update-api && make
Change-Id: I9a2333ca13e4984b71374aa7ffed081e5106c67e
2017-08-11 14:45:47 -06:00
Michal Karpinski
6aa05b82d8 Add "Threading" section to BackupAgent's class level javadoc
Test: make -j40 docs
Bug: 34326112
Change-Id: I3038de3f7159b92c72fa714f9ed55159fe3bb66b
2017-08-09 17:25:03 +01:00
Calin Juravle
284b584499 Merge "Change the location of current profiles for secondary dex files" into oc-mr1-dev 2017-08-08 00:17:44 +00:00
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
Calin Juravle
eec18f41e2 Change the location of current profiles for secondary dex files
Move the secondary dex profiles inside the oat folder. This makes it
easier to clean them up and "protects" them against apps which may delete
unknown files from their directories (e.g. search).

Bug: 62336157
Test: Manual: boot the device, use the app, check the profiles are
collected in the new location.

Change-Id: I2fbce7591589d162775e4652b12e4698083adcff
2017-08-04 17:14:22 -07:00
TreeHugger Robot
4204f1658c Merge "Use normal API for legacy wallpaper restore" into oc-mr1-dev 2017-08-03 23:07:53 +00:00
Christopher Tate
9f22443b4e Use normal API for legacy wallpaper restore
No longer do we play crazy rename-into-place tricks!  Just take
the restored image and treat it as an ordinary new system wallpaper,
and let the system machinery do all its proper work.  While we're at
it, we get rid of the now-spurious shenanigans about backing up the
wallpaper under the 'android' package, an overdue and welcome bit
of thinning.

In addition, we now fully migrate a legacy wallpaper image to have
both a source and a display crop in place.  We were previously
not generating the equivalent source image, which made N+ backups
unable to store the image properly.

Fix 64269208
Fix 62809439
Test: manual (set wallpaper under M, backup, flash to ToT,
      force restore)

Change-Id: If9b26b777f0fda95cf37c3c790a3fa4e82ff0340
2017-08-03 11:10:41 -07:00
Lucas Dupin
22b418448b Merge "Multi-user and WallpaperColors" into oc-mr1-dev 2017-08-03 16:23:41 +00:00
TreeHugger Robot
e002f44005 Merge "Version guard Application.onCreate strict mode fix" into oc-mr1-dev 2017-08-03 04:04:13 +00:00
Lucas Dupin
50ba991655 Multi-user and WallpaperColors
Test: set different wallpapers for different users and switch between them.
Test: re-ran cts tests at cts/tests/app/src/android/app/cts/WallpaperManagerTest.java
Change-Id: Ic06d1dc6db26869a2948590863ca9b8ac81c630e
Fixes: 63513694
2017-08-02 18:34:00 -07:00
TreeHugger Robot
530cfc1db3 Merge "Add documentation for MIN notification interaction with fg services." into oc-mr1-dev 2017-08-03 00:29:25 +00:00
Kurt Nelson
571c3f6e35 Version guard Application.onCreate strict mode fix
In I30b3eafa4a833fc42d0a938da9446007ade80480 we fixed an outstanding bug
around clobbering strict mode in Application.onCreate and allowing disk
writes to go unreported.

This guards that fix to only take effect once an app targets > SDK 26
and applies a ThreadPolicy inside Application.onCreate.

Bug: 63436909
Test: Ran apps with violations
Change-Id: Ib0ac1626e2ef322c4e61bbdf493d1f724b08652d
2017-08-02 15:31:41 +00:00
Todd Kennedy
5e049eb884 Merge "Add new API to retrieve app names in a batch" into oc-mr1-dev 2017-08-02 14:23:16 +00:00
Andrew Solovay
6ff61dbc51 Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev am: d71cc3b72e
am: 9e1b7759dc

Change-Id: I9b6e9c02f2237c48fdac4fd6f0c4afc4eb8b03cd
2017-08-01 21:31:59 +00:00
Andrew Solovay
9e1b7759dc Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev
am: d71cc3b72e

Change-Id: I8130d71136078d17196e198db6ff36f7f8489a5c
2017-08-01 21:21:58 +00:00
Calin Juravle
565cab11ff Merge changes from topic 'class-loaders-mr1' into oc-mr1-dev
* changes:
  Use the class loader context when optimizing secondary dex files
  Add DexClassLoader to the list of supported class loaders
2017-08-01 18:38:05 +00:00
Andrew Solovay
494f1a4dfa docs: Noted that JobIntentService is usually a better choice
Since IntentService is subject to the O background restrictions,
most devs are better off switching to the new JobIntentService.
(I assume IntentService is not actually deprecated; if it is, tell
me and I'll change this to a @deprecated tag!)

See first comment for doc stage location.

Test: make ds-docs
Bug: 64159987
Change-Id: I83a53d1e6336c2134bf4c61bedd2ae42cd80493a
2017-07-31 19:41:01 -07:00
Adam Lesinski
80454c2c88 Merge "Remove extraneous invalidate call that unregisters AssetManagers" into oc-dr1-dev
am: defdb1fd70

Change-Id: I6878ca92b2bd8b2e9569147dde007ae657adc87c
2017-07-31 22:17:27 +00:00
Adam Lesinski
defdb1fd70 Merge "Remove extraneous invalidate call that unregisters AssetManagers" into oc-dr1-dev 2017-07-31 22:08:30 +00:00
Dianne Hackborn
6e5bd3f9f8 Add documentation for MIN notification interaction with fg services.
Don't do this, you won't get what you want.

Test: built

Change-Id: I57ae93ced2b9ad563197c00ad8d94f7b492dff0c
2017-07-31 14:25:39 -07:00
Bryce Lee
69aac0a7b6 Merge "Do not call onConfigurationChanged for appBound position changes." into oc-dr1-dev
am: 33d4702a12

Change-Id: Id6748aab9ee83844303324ea397d4ac699fb5839
2017-07-31 18:45:19 +00:00
Todd Kennedy
9da8b8a7fc Add new API to retrieve app names in a batch
Change-Id: I57e5c132bc58a32d70007a7a105775b526ff7bb9
Fixes: 62805090
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_null
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_empty
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.PackageManagerTest#testGetNamesForUids_valid
2017-07-31 11:29:37 -07:00
Bryce Lee
658d984f04 Do not call onConfigurationChanged for appBound position changes.
Since appBounds encodes both dimensions and positions, movement will
cause a diff change. This happens in situations where the dimensions
stay constant, such as dragging a PiP window around.

To avoid flooding the client side with configuration changes, this CL
checks whether the new configuration is equivalent to the existing
configuration with the exception of the position of the appBounds
before sending to the registered callbacks.

Change-Id: I8fbc94458fd9ed3b39494c3587f25e704ec02a7d
Fixes: 63927944
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
Test: go/wm-smoke
2017-07-31 08:46:00 -07:00
Adam Lesinski
662153740d Remove extraneous invalidate call that unregisters AssetManagers
We are already taking care of updating AssetManagers affected by
path changes to a running app's ApplicationInfo. There is no need
to invalidate ALL AssetManagers, thereby unregistering them
from ResourcesManager and preventing configuration changes from
reaching them.

Bug: 64004601
Test: manual
Change-Id: I39311ec9b1dfd34eb7025836f75c92e0516bc36b
2017-07-28 16:33:11 -07:00
Svetoslav Ganov
899f54da72 Report permission flags for all protections based on SDK am: adb8c522a8
am: 436b901dbb

Change-Id: Ibe7cecd60242f1895434d586af30c2081d451f0b
2017-07-28 16:59:55 +00:00
Svetoslav Ganov
436b901dbb Report permission flags for all protections based on SDK
am: adb8c522a8

Change-Id: Ia30269ec2097d5978ae3e0b3930a38b3f4441ea4
2017-07-28 16:42:59 +00:00
Svetoslav Ganov
adb8c522a8 Report permission flags for all protections based on SDK
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.

Test: All permission tests pass
      Added a new test to ensure no protection flags reported
      for normal and dangerous permissions

Change-Id: I87b10a7695d8ecfa7156525d6f3d101fc0639513
bug:62755026
2017-07-28 05:46:53 +00:00
Bart Sears
076d6f7669 Revert "Report permission flags for all protections based on SDK"
am: 784b56e1e6

Change-Id: Ice7dde53c5613f48d013424a7e99203fd854e532
2017-07-28 05:17:52 +00:00
Bart Sears
784b56e1e6 Revert "Report permission flags for all protections based on SDK"
This reverts commit 852cf98cb8.

Change-Id: I62763bf85ec95a02a245c6b503aa34bb0e9d997a
2017-07-28 05:05:38 +00:00
Svetoslav Ganov
3cf283558a Report permission flags for all protections based on SDK
am: 852cf98cb8

Change-Id: I6e87c8f40fa466f2a50f41549be41ea4fb598824
2017-07-28 02:49:30 +00:00
Svetoslav Ganov
852cf98cb8 Report permission flags for all protections based on SDK
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.

Test: All permission tests pass
      Added a new test to ensure no protection flags reproted
      for normal and dangerous permissions

bug:62755026

Change-Id: I72547b0146e6b6919803e33ff64b7208c4a255ad
2017-07-28 01:46:04 +00:00
Geoffrey Pitsch
76a3aa06dc Revert "Merge "Remove ability to downgrade importance of existing channel." into oc-dr1-dev"
This reverts commit d691f1a200, reversing
changes made to d6a2ed194c.

Test: runtest systemui-notification
Fixes: 63920384
2017-07-26 15:07:34 -04:00
Geoffrey Pitsch
d691f1a200 Merge "Remove ability to downgrade importance of existing channel." into oc-dr1-dev
am: 0d5c1490ce

Change-Id: I130816097bc68d1978b035cb2cfb0a3c678f9291
2017-07-26 16:29:01 +00:00
Geoffrey Pitsch
0d5c1490ce Merge "Remove ability to downgrade importance of existing channel." into oc-dr1-dev 2017-07-26 14:31:23 +00:00
Geoffrey Pitsch
1556495e28 Remove ability to downgrade importance of existing channel.
Test: runtest systemui-notification
Bug: 63920384
Change-Id: Ic9f5c50c3d2a36ccd4ba9686dad1eb415b559215
2017-07-26 10:27:02 -04:00
Christine Franks
e9e9fb257f Remove RetailDemoModeServiceInternal
Bug: 62712426
Test: make -j100
Change-Id: I0b852aef30a8cadcda08fcff1dcf861aac2a4d7e
2017-07-26 00:40:53 +00:00
Christine Franks
4ac942f140 Merge "DO NOT MERGE - Remove RetailDemoModeServiceInternal" into oc-dr1-dev 2017-07-26 00:07:14 +00:00
Calin Juravle
f1ff36f0f9 Use the class loader context when optimizing secondary dex files
Record the class loader context for secondary dex loads and pass it to
dexopt during compilation.

The class loader context is passed from libcore every time a
BaseDexClassLoader is created and its recorded in the package dex usage
file.

Note that the context may be:
- unknown: if the dex file was not use after the the upgrade and its
context was not yet updated
- unsupported: if any of the class loaders from the loading context is
unsupported (only PathClassLoader and DelegateLastClassLoader are
supported).
- variable: if it changes over time, form one run to another.

In all the above cases the old compilation behavior is preserved for
now.(i.e. the dex file with be compiled with SKIP_SHARED_LIBRARY_CHECK)

Bug: 38138251
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/
      adb shell cmd package compile -f -m quicken ^Csecondary-dex
com.google.android.gms

(cherry picked from commit 3bec94d78b)

Change-Id: Ie8b78c7c0d5de43733b3d116f8dcb3a65324cca8
2017-07-25 14:21:49 -07:00
Christine Franks
f66a377785 DO NOT MERGE - Remove RetailDemoModeServiceInternal
Bug: 62712426
Test: make -j100
Change-Id: I0b852aef30a8cadcda08fcff1dcf861aac2a4d7e
2017-07-25 21:16:29 +00:00
TreeHugger Robot
70c72263ac Merge "Don't create WindowNode on windows with dettached view." into oc-mr1-dev 2017-07-24 20:21:15 +00:00
Selim Cinek
3a82a4a0f2 Merge "Removing contents hidden string for public notifications" into oc-dr1-dev
am: 8650c7c0f1

Change-Id: I10d7ab191f47bf167a5be5e0d11d7698aae58cd1
2017-07-23 12:57:19 +00:00
TreeHugger Robot
8650c7c0f1 Merge "Removing contents hidden string for public notifications" into oc-dr1-dev 2017-07-23 12:51:43 +00:00
Andrii Kulian
d313469e28 DO NOT MERGE VirtualDisplay wrapper with input forwarding
New version of ActivityView that doesn't use expensive
ActivityContainer, but utilizes VirtualDisplays instead.

Creation of this view is only allowed for callers who have
android.Manifest.permission.INJECT_EVENTS permission.

Launching activities into this container is restricted by
the same rules that apply to launching on VirtualDisplays:
- Owner is allowed to launch its own activities.
- If activity that's being launched is not from the same
  app, then it must be embeddable and launcher must have
  permission to embed.

Bug: 63338670
Test: go/wm-smoke
Change-Id: Id9a25752367ebe8e59d2fc21c5d9de5cf597ea01
2017-07-21 13:14:37 -07:00
Andrii Kulian
94e82d9b0e DO NOT MERGE ActivityView be gone!
This hidden functionality is no longer support/needed since
we now have multi-window/display. A new view group class
will be added later that uses multi-window to support remaining
functionality of this class.

Test: go/wm-smoke
Change-Id: Ie2fa2de92841d33199da9988741905060dd1ddf4
2017-07-21 13:14:19 -07:00
Felipe Leme
5cfcb5cc94 Don't create WindowNode on windows with dettached view.
Test: manual verification
Fixes: 63788161

Change-Id: I1c193495753fc6f8b23bab602463d3b1234e325f
2017-07-20 15:06:56 -07:00
Selim Cinek
499c20f25d Removing contents hidden string for public notifications
We're now only showing the notification header instead of the
repetitive contents hidden string. On Aod, we're still showing
a string however, since without it, it looked too empty.

Test: manual, set sensitive setting on lockscreen, observe notifications
Change-Id: If2bb66b9b3b366715aa68087e5c35cf1cdff3693
Fixes: 63741232
2017-07-20 14:16:13 -07:00
Geoffrey Pitsch
07532c3f79 Allow apps to downgrade importance in createNotificationChannel
Only takes effect if the user has not changed any fields.
Some tangential cleanup of the test file:
 - Rename member variable "uid" to "mUid"
 - Use correct PKG instead of "test_pkg"
 - Some character limit fixes

Test: runtest systemui-notification
Fixes: 63755460
Change-Id: I3c2df0c03ec333f320ac7a0fe90792f1b0ef02ce
2017-07-20 12:45:30 -04:00
Geoffrey Pitsch
3ca605e28c Merge "Allow apps to downgrade importance in createNotificationChannel" into oc-dr1-dev 2017-07-20 15:33:41 +00:00
Selim Cinek
8ffa981686 Merge "Reducing bitmap sizes in notifications" into oc-dr1-dev 2017-07-19 23:41:44 +00:00