OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "Always log new user state to event log" into oc-dev
Fyodor Kupolov [Fri, 16 Jun 2017 20:05:38 +0000 (20:05 +0000)]
Merge "Always log new user state to event log" into oc-dev
am: 6db4406fbd

Change-Id: I44a69dc7d32a5895f404d9e55c21bd3caf7fb426

7 years agoMerge "Always log new user state to event log" into oc-dev
Fyodor Kupolov [Fri, 16 Jun 2017 19:51:00 +0000 (19:51 +0000)]
Merge "Always log new user state to event log" into oc-dev

7 years agoMerge "Throw IAE when service add null AutofillIds on SaveInfo methods." into oc-dev
Felipe Leme [Fri, 16 Jun 2017 19:34:00 +0000 (19:34 +0000)]
Merge "Throw IAE when service add null AutofillIds on SaveInfo methods." into oc-dev
am: 6cde68752c

Change-Id: Ie0d331a0f82e0826e6b22bf44ba2c8e9729bed71

7 years agoMerge "Throw IAE when service add null AutofillIds on SaveInfo methods." into oc-dev
TreeHugger Robot [Fri, 16 Jun 2017 19:23:37 +0000 (19:23 +0000)]
Merge "Throw IAE when service add null AutofillIds on SaveInfo methods." into oc-dev

7 years agoMerge "enable/disable dexopt for instant apps remotely" into oc-dev
Todd Kennedy [Fri, 16 Jun 2017 18:21:42 +0000 (18:21 +0000)]
Merge "enable/disable dexopt for instant apps remotely" into oc-dev
am: 5d969b9862

Change-Id: Ib15cba352157518cb5d8d9ccb8ba033096cc5649

7 years agoMerge "enable/disable dexopt for instant apps remotely" into oc-dev
TreeHugger Robot [Fri, 16 Jun 2017 18:07:46 +0000 (18:07 +0000)]
Merge "enable/disable dexopt for instant apps remotely" into oc-dev

7 years agoAlways log new user state to event log
Fyodor Kupolov [Fri, 16 Jun 2017 17:45:51 +0000 (10:45 -0700)]
Always log new user state to event log

Previously it wasn't logged for stopping users...

Test: manual
Bug: 38121026
Change-Id: I0fc37224ce1043745dfffcc78639f003c35b402e

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 17:47:02 +0000 (17:47 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours am: 45cd809caa  -s ours am: ce4c7df6a0  -s ours am: 035e2a5c37  -s ours am: 4e5ed845c7  -s ours am: 3cd244e872  -s ours am: a9bf75f50c  -s ours am: 21caf4aee4  -s ours am: 009b3c6aec  -s ours
am: acbd7ba4aa  -s ours

Change-Id: I4f271a830305ed498090d7bc28edbf94fc7aefc0

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 17:38:19 +0000 (17:38 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours am: 45cd809caa  -s ours am: ce4c7df6a0  -s ours am: 035e2a5c37  -s ours am: 4e5ed845c7  -s ours am: 3cd244e872  -s ours am: a9bf75f50c  -s ours am: 21caf4aee4  -s ours
am: 009b3c6aec  -s ours

Change-Id: Ied441cf591abb8933a5601c6d36066e0288dfbd7

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 17:24:37 +0000 (17:24 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours am: 45cd809caa  -s ours am: ce4c7df6a0  -s ours am: 035e2a5c37  -s ours am: 4e5ed845c7  -s ours am: 3cd244e872  -s ours am: a9bf75f50c  -s ours
am: 21caf4aee4  -s ours

Change-Id: I25f1f4394b6a5a6b3708df13be41299865e76d52

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 17:12:09 +0000 (17:12 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours am: 45cd809caa  -s ours am: ce4c7df6a0  -s ours am: 035e2a5c37  -s ours am: 4e5ed845c7  -s ours am: 3cd244e872  -s ours
am: a9bf75f50c  -s ours

Change-Id: Ib75388665c3586c09e963917bc54b020aae22dce

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 16:59:57 +0000 (16:59 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours am: 45cd809caa  -s ours am: ce4c7df6a0  -s ours am: 035e2a5c37  -s ours am: 4e5ed845c7  -s ours
am: 3cd244e872  -s ours

Change-Id: I256e1413df73fd577708d5dcb84074e3a8ed61ab

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 16:51:14 +0000 (16:51 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours am: 45cd809caa  -s ours am: ce4c7df6a0  -s ours am: 035e2a5c37  -s ours
am: 4e5ed845c7  -s ours

Change-Id: Iae9f79e4b91c4ef5e844259709e3055607a781b8

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 16:41:20 +0000 (16:41 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours am: 45cd809caa  -s ours am: ce4c7df6a0  -s ours
am: 035e2a5c37  -s ours

Change-Id: Ib6f84a832e27329e0eabf000b89e93145c43a31a

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 16:26:30 +0000 (16:26 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours am: 45cd809caa  -s ours
am: ce4c7df6a0  -s ours

Change-Id: I1fb798481ca56b8c81386792b5642a544aae1c7e

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 16:19:02 +0000 (16:19 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours am: 23118a9b77  -s ours
am: 45cd809caa  -s ours

Change-Id: Idd7b2d2536d1c25072794ba228f33fc2459f2aaa

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 16:11:01 +0000 (16:11 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours am: 49fc959be3  -s ours
am: 23118a9b77  -s ours

Change-Id: Id314511cf3e6af08e0f00e84e8945ea404b85c6a

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours am: 398d50feeb ...
Marco Nelissen [Fri, 16 Jun 2017 16:02:19 +0000 (16:02 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours am: 398d50feeb  -s ours
am: 49fc959be3  -s ours

Change-Id: I0eb248911ce1a582a4939e2bd5419659c586128f

7 years agolibmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8 -s ours
Marco Nelissen [Fri, 16 Jun 2017 15:51:48 +0000 (15:51 +0000)]
libmedia_jni.so doesn't need libjhead.so am: 9a4a34afd8  -s ours
am: 398d50feeb  -s ours

Change-Id: Ide31821909dde91443cdf650216a6ada7277ce9a

7 years agolibmedia_jni.so doesn't need libjhead.so
Marco Nelissen [Fri, 16 Jun 2017 15:43:46 +0000 (15:43 +0000)]
libmedia_jni.so doesn't need libjhead.so
am: 9a4a34afd8  -s ours

Change-Id: I557d7e96401b742d916e2eef5aa03949018382c7

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
Bill Yi [Fri, 16 Jun 2017 15:21:03 +0000 (15:21 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev
am: d97c62a1da  -s ours

Change-Id: I331b2a1135b82d21211ba75d838e655213da8654

7 years agoMerge "Import translations. DO NOT MERGE" into oc-dev
TreeHugger Robot [Fri, 16 Jun 2017 15:12:30 +0000 (15:12 +0000)]
Merge "Import translations. DO NOT MERGE" into oc-dev

7 years agoMerge "Fix two IndexOutOfBoundsException crashes." into oc-dev
Julia Reynolds [Fri, 16 Jun 2017 13:36:27 +0000 (13:36 +0000)]
Merge "Fix two IndexOutOfBoundsException crashes." into oc-dev
am: ded5608f18

Change-Id: I4702d429a84151d395a5c8d4f5b3cce5a6e66215

7 years agoMerge "Fix two IndexOutOfBoundsException crashes." into oc-dev
Julia Reynolds [Fri, 16 Jun 2017 13:30:29 +0000 (13:30 +0000)]
Merge "Fix two IndexOutOfBoundsException crashes." into oc-dev

7 years agoImport translations. DO NOT MERGE
Bill Yi [Fri, 16 Jun 2017 12:16:09 +0000 (05:16 -0700)]
Import translations. DO NOT MERGE

Change-Id: Icb9547e4d5fb47bfab83f8012358047189787fda
Auto-generated-cl: translation import

7 years agoMerge "Make RankingHelper$Record.groups thread-safe" into oc-dev
Shunta Sato [Fri, 16 Jun 2017 01:56:06 +0000 (01:56 +0000)]
Merge "Make RankingHelper$Record.groups thread-safe" into oc-dev
am: 892cd3e1e6

Change-Id: I2d80f86c2ffc4784ddc39ecb99d631bfcf948b33

7 years agoMerge "Make RankingHelper$Record.groups thread-safe" into oc-dev
TreeHugger Robot [Fri, 16 Jun 2017 01:47:07 +0000 (01:47 +0000)]
Merge "Make RankingHelper$Record.groups thread-safe" into oc-dev

7 years agoMerge "Don't even think about changing keyguard transit" into oc-dev
Jorim Jaggi [Fri, 16 Jun 2017 01:13:32 +0000 (01:13 +0000)]
Merge "Don't even think about changing keyguard transit" into oc-dev
am: 3e3bb5f762

Change-Id: I6c5f301ae125f84ead1ee10a12354a700969c5bd

7 years agoMerge "Don't even think about changing keyguard transit" into oc-dev
TreeHugger Robot [Fri, 16 Jun 2017 01:04:09 +0000 (01:04 +0000)]
Merge "Don't even think about changing keyguard transit" into oc-dev

7 years agoMerge "Fix issue #62524613: Background limitation is not working as expected..."...
Dianne Hackborn [Fri, 16 Jun 2017 00:54:13 +0000 (00:54 +0000)]
Merge "Fix issue #62524613: Background limitation is not working as expected..." into oc-dev
am: 2b20d552bd

Change-Id: Ife8314e41f85fb75a597ad2a94df1cde419246fc

7 years agoMerge "Fix issue #62524613: Background limitation is not working as expected..."...
TreeHugger Robot [Fri, 16 Jun 2017 00:46:45 +0000 (00:46 +0000)]
Merge "Fix issue #62524613: Background limitation is not working as expected..." into oc-dev

7 years agoMerge "When updating a split app, copy compiled files from base.apk only." into oc-dev
Jeff Hao [Fri, 16 Jun 2017 00:01:28 +0000 (00:01 +0000)]
Merge "When updating a split app, copy compiled files from base.apk only." into oc-dev
am: 08b3fd966c

Change-Id: I83e373a61c848845465a4517ce0720a03fe97920

7 years agoMerge "When updating a split app, copy compiled files from base.apk only." into oc-dev
TreeHugger Robot [Thu, 15 Jun 2017 23:52:01 +0000 (23:52 +0000)]
Merge "When updating a split app, copy compiled files from base.apk only." into oc-dev

7 years agoThrow IAE when service add null AutofillIds on SaveInfo methods.
Felipe Leme [Thu, 15 Jun 2017 22:29:23 +0000 (15:29 -0700)]
Throw IAE when service add null AutofillIds on SaveInfo methods.

Test: existing CtsAutoFillServiceTestCases pass
Test: manual verification using Contacts app
Test: manual verification adding a CTS test case that crashes the app, but such
      test cannot be commit because once the issue is fixed, it crashes the
      service (the right way to test this fix is through unit tests against
      exceptional conditions, but we don't support those on Autofill yet).

Fixes: 62649290

Change-Id: I8fc01fa929270219cd40035ff02eaf0dda5ecbfa

7 years agoMerge "don't block uninstall of unknown packages" into oc-dev
TreeHugger Robot [Thu, 15 Jun 2017 22:05:43 +0000 (22:05 +0000)]
Merge "don't block uninstall of unknown packages" into oc-dev

7 years agoFix issue #62524613: Background limitation is not working as expected...
Dianne Hackborn [Thu, 15 Jun 2017 21:33:16 +0000 (14:33 -0700)]
Fix issue #62524613: Background limitation is not working as expected...

...for most background services.

Whoops, was only stopping the first service it found!

Test: bit CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: I42af2872afed8b49fab0f53eff36b62e55d23409

7 years agoFix two IndexOutOfBoundsException crashes.
Julia Reynolds [Thu, 15 Jun 2017 19:24:01 +0000 (15:24 -0400)]
Fix two IndexOutOfBoundsException crashes.

Do not remove (sometimes multiple) items from lists
you are iterating over.

Test: runtest systemui-notification
Change-Id: I130cc63ae2f5721e7b434006f4306e0b1eaef77d
Fixes: 62622503

7 years agoMerge "Update TV to show custom actions." into oc-dev
Winson Chung [Thu, 15 Jun 2017 21:05:44 +0000 (21:05 +0000)]
Merge "Update TV to show custom actions." into oc-dev

7 years agoMerge "Fix companion uses-permission enforcement" into oc-dev
TreeHugger Robot [Thu, 15 Jun 2017 20:57:16 +0000 (20:57 +0000)]
Merge "Fix companion uses-permission enforcement" into oc-dev

7 years agoMerge "ImageReader: Set BufferItem mGraphicBuffer to null when returning it" into...
TreeHugger Robot [Thu, 15 Jun 2017 20:56:38 +0000 (20:56 +0000)]
Merge "ImageReader: Set BufferItem mGraphicBuffer to null when returning it" into oc-dev

7 years agoDon't even think about changing keyguard transit
Jorim Jaggi [Thu, 15 Jun 2017 19:10:38 +0000 (15:10 -0400)]
Don't even think about changing keyguard transit

When camera was launched with a lockscreen wallpaper set, the
wallpaper target was launcher in that case, which was also in
mClosingApps because it was first getting shown by keyguard
exit but then immediately hidden by starting the camera,
before the transition started.

Now since lockscreen wasn't the wallpaper target, launcher was
already for some reason, and we changed the transit to
WALLPAPER_CLOSE as a window with the wallpaper target was in
mClosingApps.

Fix this by never ever changing away from keyguard transits.

Test: go/wm-smoke
Test: ActivityManagerTransitionSelectionTests
Test: Set lockscreen wallpaper, set animation duration scale to
0.5, insert a random sleep statement in SystemUI, launch
camera from screen off while in trusted state and camera
wasn't running before.
Fixes: 37677242
Change-Id: I984b66d7f117034f3d55591284dd822b5ec76cbd

7 years agoMerge "Use correct timestamps of events for logging." into oc-dev
Sudheer Shanka [Thu, 15 Jun 2017 19:25:02 +0000 (19:25 +0000)]
Merge "Use correct timestamps of events for logging." into oc-dev

7 years agoWhen updating a split app, copy compiled files from base.apk only.
Jeff Hao [Tue, 13 Jun 2017 18:09:10 +0000 (11:09 -0700)]
When updating a split app, copy compiled files from base.apk only.

This fixes issues with some splits failing to be recompiled if they
haven't changed, but the dex files they depend on have.

The real fix will be for frameworks to generate the new expected
classpath and check in DexFile.getDexOptNeeded. Then we can undo
this change and copy over all the compiled split files again.

Bug: 62269291
Test: cts-tradefed run singleCommand cts -d --module
CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests

(cherry-picked from commit d1235f54d4943a0a3a920013a5875b5193bd0490)

Change-Id: I6e640a966ef3b43054d163326878adebe2329693

7 years agoMerge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev
Dianne Hackborn [Thu, 15 Jun 2017 18:45:28 +0000 (18:45 +0000)]
Merge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev

7 years agoFix companion uses-permission enforcement
Eugene Susla [Thu, 15 Jun 2017 18:22:57 +0000 (11:22 -0700)]
Fix companion uses-permission enforcement

Fixes: b/62662686
Test: Call CompanionDeviceManager#associate from app without uses-permission
declaration
Ensure exception is thrown

Call the method from app with the declaration
Ensure no exception is thrown

In debug mode catch the #isCallerSystem call from NotificationManagerService
(which runs in the system process) and ensure it passes the check
Change-Id: I26e5d2a7f5e63a346d4ab50b9ded1ec7dbc246a5

7 years agoenable/disable dexopt for instant apps remotely
Todd Kennedy [Thu, 15 Jun 2017 16:44:34 +0000 (09:44 -0700)]
enable/disable dexopt for instant apps remotely

Change-Id: I997b8ae515f7bf2570edca4ed7ab4b46198148a5
Fixes: 62591398
Test: Manual; install instant app and see that it doesn't dexopt
Test: Manua; update gservices flag, install instant app and see that it does dexopt

7 years agoMerge "add a log for peek to shade expansion" into oc-dev
TreeHugger Robot [Thu, 15 Jun 2017 16:20:07 +0000 (16:20 +0000)]
Merge "add a log for peek to shade expansion" into oc-dev

7 years agodon't block uninstall of unknown packages
Todd Kennedy [Thu, 15 Jun 2017 13:38:09 +0000 (06:38 -0700)]
don't block uninstall of unknown packages

If a package can't be found because it's not installed or it's
been filtered due to lack of visibility, don't claim the uninstall
should be blocked.

Change-Id: I932b77cea5749e5964ca626558bef51cdfdfd17b
Fixes: 62450984
Test: Manual

7 years agoImageReader: Set BufferItem mGraphicBuffer to null when returning it
Eino-Ville Talvala [Tue, 13 Jun 2017 19:43:19 +0000 (12:43 -0700)]
ImageReader: Set BufferItem mGraphicBuffer to null when returning it

The ImageReader JNI layer needs to maintain a list of BufferItems that
back the Java Image objects. At start, we allocate maxImages of these
in a list, and acquire and release them from this list as the
application acquires and releases Images.

However, on release, the contents of the BufferItem are not adjusted,
so it can retain a reference to a GraphicBuffer until the BufferItem
is reused.

Test: Camera CTS passes, memory usage drops after camera bursts
Bug: 62652080
Change-Id: I9aade5e32cbe0af0c15a3886e16ada1a70392b74

7 years agoadd a log for peek to shade expansion
Chris Wren [Wed, 14 Jun 2017 19:59:03 +0000 (15:59 -0400)]
add a log for peek to shade expansion

Move the note_load counter into the manager, replacing
the redundant and useless notification_load counter.

Update the StatusBarTest to allow for hander side-effects.

Test: runtest systemui
Change-Id: I2551c51cc0f4627995abe4401eafc2e5adb3a8fa
Fixes: 27698560

7 years agoMerge "Remove snapshot when screen gets rotated in mean time" into oc-dev
TreeHugger Robot [Thu, 15 Jun 2017 06:24:30 +0000 (06:24 +0000)]
Merge "Remove snapshot when screen gets rotated in mean time" into oc-dev

7 years agoMerge "Actually do not hold WM lock while closing transaction" into oc-dev
Jorim Jaggi [Thu, 15 Jun 2017 06:11:10 +0000 (06:11 +0000)]
Merge "Actually do not hold WM lock while closing transaction" into oc-dev

7 years agoMerge "Create a staleScanResults bit." into oc-dev
TreeHugger Robot [Thu, 15 Jun 2017 05:19:46 +0000 (05:19 +0000)]
Merge "Create a staleScanResults bit." into oc-dev

7 years agoMerge "Use TotalTime instead of ThisTime in app launch test" into oc-dev
Gopinath Elanchezhian [Thu, 15 Jun 2017 05:05:21 +0000 (05:05 +0000)]
Merge "Use TotalTime instead of ThisTime in app launch test" into oc-dev

7 years agoRemove snapshot when screen gets rotated in mean time
Jorim Jaggi [Wed, 14 Jun 2017 23:04:59 +0000 (16:04 -0700)]
Remove snapshot when screen gets rotated in mean time

We also need to wait for windows that are not gone for layout, as
otherwise we'd unfreeze before the surface is actually created.

Test: go/wm-smoke
Test: Open Camera in landscape but home screen locked to portrait
Change-Id: I0fc7a016445e18af1eead292665702b768b4e95b
Fixes: 38261533

7 years agoMerge "Use splashscreen if we can't fill horizontaly with snapshot" into oc-dev
Jorim Jaggi [Thu, 15 Jun 2017 04:19:48 +0000 (04:19 +0000)]
Merge "Use splashscreen if we can't fill horizontaly with snapshot" into oc-dev

7 years agoMerge "Revert the time zone display name logic" into oc-dev
Lei Yu [Thu, 15 Jun 2017 02:04:39 +0000 (02:04 +0000)]
Merge "Revert the time zone display name logic" into oc-dev

7 years agoActually do not hold WM lock while closing transaction
Jorim Jaggi [Thu, 15 Jun 2017 01:09:58 +0000 (18:09 -0700)]
Actually do not hold WM lock while closing transaction

Test: go/wm-smoke
Test: Quick switch 100x, observe no delay
Change-Id: I46022a23f749c52ba7f46e105679d728277970bd
Fixes: 62444483

7 years agoUse splashscreen if we can't fill horizontaly with snapshot
Jorim Jaggi [Tue, 13 Jun 2017 18:54:04 +0000 (11:54 -0700)]
Use splashscreen if we can't fill horizontaly with snapshot

A gap at the right side of the snapshot looks pretty bad. Thus,
we use a splash screen in case there would be a gap on the right
side. However, we don't want to do this from recents as we'd
produce another flicker

Test: go/wm-smoke
Test: Open app portrait, go launcher, rotate, open app landscape
Test: Open app landscape, go launcher rotate, open app portrait
Fixes: 62094756
Change-Id: Iaf1fecced822685187477a4698fa6b67c6e485d7

7 years agoMerge "Correct errant entry in to DRAG_RESIZE_FREEFORM state." into oc-dev
Rob Carr [Thu, 15 Jun 2017 01:18:17 +0000 (01:18 +0000)]
Merge "Correct errant entry in to DRAG_RESIZE_FREEFORM state." into oc-dev

7 years agoWork on issue #36891897: Need to ensure foreground services...
Dianne Hackborn [Thu, 15 Jun 2017 00:30:15 +0000 (17:30 -0700)]
Work on issue #36891897: Need to ensure foreground services...

...can't hide themselves

Tune the policies for when we tell about apps running in the
background after their services have stopped.

- If it ran while the screen was on, the time we require for it
to be running is much shorter (a couple seconds) as well as the
time we tell about it having run (with another tunable for the
minimum time we tell about this).

- If it has only run while the screen is off and stops a sufficient
amount of time before the screen goes on (currently a second) then
we will not show anything when the screen goes on.

- If it stops when the screen turns on, we will make sure the user
sees about it for a short period of time (currently 5 seconds).

Also includes some improved debug output about handler message
queues.

Test: manual

Change-Id: Iab438410d7182b2dfe4f9c1cce7069b26b34834c

7 years agoMerge "Fix null drawable for Mobile signal data edit QS tile" into oc-dev
TreeHugger Robot [Wed, 14 Jun 2017 22:10:51 +0000 (22:10 +0000)]
Merge "Fix null drawable for Mobile signal data edit QS tile" into oc-dev

7 years agoCreate a staleScanResults bit.
Sundeep Ghuman [Thu, 8 Jun 2017 01:11:39 +0000 (18:11 -0700)]
Create a staleScanResults bit.

This bit is set to true during stop tracking and will not change until
fresh scan results come in. This bit is used to prevent
onAccessPointsChanged callbacks from being invoked until other new scan
results are processed.

This is necessary to fix a UI issue in WifiSettings during app
resumption where sticky broadcasts from other intents come in before
a new scan result is available, causing us to clear out all shown APs
since the ScanResults are stale and thus removed from the picker.

Bug: b/38212080
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I2f1fd84d1ab3461d9c8eac9511b90ba7533879c1

7 years agoCorrect errant entry in to DRAG_RESIZE_FREEFORM state.
Robert Carr [Tue, 13 Jun 2017 19:41:53 +0000 (12:41 -0700)]
Correct errant entry in to DRAG_RESIZE_FREEFORM state.

Observing the logic in computeDragResizing(), we see that whenever an
AppWindowToken has frozen bounds we will enter the drag resizing
state. Furthermore, in setDragResizing() we see that if the docked
divider is not resizing, then we set ourselves as freeform
resizing. Also observe that AppWindowToken#startRelaunching
unconditionally freezes the bounds for tasks not in the freeform
stack. This means we are almost always entering the freeform resize
state while relaunching. Within computeDragResizing, the StackId check
and the MATCH_PARENT check have prevented this from being an issue in
too many places, espescially in pinned.

Once we are in this state, calculateSurfaceBounds() will force us to
0,0 as it thinks we are using the big surface approach.

There's no need to freeze the bounds if we weren't drag resizing at
the time that the app is relaunched, and this CL enforces that.

Bug: 62430780
Test: Manual repro from bug. To verify no regressions, create app with long delay in onResume (>1s) verify no flickers when releasing the docked divider and triggering a resize.
      go/wm-smoke

Change-Id: I1d9bdfbe815ff48c884f933acd65612429d633ef

7 years agoMerge "Add a workaround for simulate secondary display" into oc-dev
TreeHugger Robot [Wed, 14 Jun 2017 20:13:59 +0000 (20:13 +0000)]
Merge "Add a workaround for simulate secondary display" into oc-dev

7 years agoMerge "Revert accidental API change to RemoteViews." into oc-dev
Daniel Sandler [Wed, 14 Jun 2017 20:12:32 +0000 (20:12 +0000)]
Merge "Revert accidental API change to RemoteViews." into oc-dev

7 years agoRevert accidental API change to RemoteViews.
Daniel Sandler [Tue, 13 Jun 2017 18:32:46 +0000 (18:32 +0000)]
Revert accidental API change to RemoteViews.

This reverts commit 7f09ce1a238ad5a647da913e275fd637ac75ab49 (but
retains the bug fix)

Change-Id: Ib4700ada5aa0b5dab7e43f895b48eb7058308869
Fixes: 62543637
Bug: 62181033

7 years agoFix null drawable for Mobile signal data edit QS tile
Evan Laird [Wed, 14 Jun 2017 19:40:02 +0000 (15:40 -0400)]
Fix null drawable for Mobile signal data edit QS tile

Currently it's a funky situation with CellTileView. There should
ultimate be a better way to handle displaying the SignalDrawable (per
the TODO comments), but this is a sensible fix to show the mobile data
icon in the edit QS screen for now.

Test: visual
Bug: 62525439
Change-Id: I95f0fb86862aa6a7b60f304053a73127907943ee

7 years agoAdd a workaround for simulate secondary display
John Reck [Wed, 14 Jun 2017 17:47:50 +0000 (10:47 -0700)]
Add a workaround for simulate secondary display

To workaround a deadlock caused by bufferqueue locks
we force RenderThread over to use async mode which
we enable via eglSwapInterval(0)

Bug: 38372997
Test: steps in the bug
Change-Id: Ia305f73abbdd64ab0c25d1f7d32792cc6295a0ce

7 years agoMerge "DayPickerView - clamp date to min/max" into oc-dev
TreeHugger Robot [Wed, 14 Jun 2017 17:38:42 +0000 (17:38 +0000)]
Merge "DayPickerView - clamp date to min/max" into oc-dev

7 years agoRevert the time zone display name logic
jackqdyulei [Mon, 12 Jun 2017 20:58:26 +0000 (13:58 -0700)]
Revert the time zone display name logic

This cl is a partial revert of ag/1490275, and only
reverts the method getTimeZoneOffsetAndName. Reverting
it because it fails the PTCRB test.

After this revert, it will consistently show the zone
long name in Date & time page (which is the behaviour
in N).

Bug: 62077986
Test: SettingsLibTests
Change-Id: I8174bd7a3de09e476bbffefa6e71d997340dc7d8

7 years agoMake RankingHelper$Record.groups thread-safe
Shunta Sato [Tue, 13 Jun 2017 07:16:13 +0000 (16:16 +0900)]
Make RankingHelper$Record.groups thread-safe

Symptom:
System crash is happened due to NPE at RankingHelper.writeXml.

Root cause:
RankingHelper$Record.groups.values() returned null. Record.groups
is an ArrayMap and this is not thread-safe. When multiple clients
call NotificationManager#createNotificationChannelGroup and
deleteNotificationChannelGroup at a same time, Record.groups is
changed by multiple threads simultaneously. As a result, this
ArrayMap object gets broken.

Solution:
Use ConcurrentHashMap instead of ArrayMap.

Test: runtest systemui-notification, test app
Bug: 62557189
Author: Tetsutoki Shiozawa <tetsutoki.shiozawa@sony.com>
Change-Id: I2261dbd1ace4915695528595b9d14d68e5bec55d

7 years agoMerge "Select the right pages to scrap" into oc-dev
Philip P. Moltmann [Wed, 14 Jun 2017 14:44:30 +0000 (14:44 +0000)]
Merge "Select the right pages to scrap" into oc-dev

7 years agoMerge "Fix footer not being hidden in detail panels" into oc-dev
Jason Monk [Wed, 14 Jun 2017 13:37:28 +0000 (13:37 +0000)]
Merge "Fix footer not being hidden in detail panels" into oc-dev

7 years agoMerge "SensorManager: attach background thread to JavaVM" into oc-dev
Peng Xu [Wed, 14 Jun 2017 06:12:37 +0000 (06:12 +0000)]
Merge "SensorManager: attach background thread to JavaVM" into oc-dev

7 years agoUse TotalTime instead of ThisTime in app launch test
gopinath [Fri, 2 Jun 2017 00:28:36 +0000 (17:28 -0700)]
Use TotalTime instead of ThisTime in app launch test

Bug: 62272543

Test: Tested with calculator and facebook messenger launch

Change-Id: Ide4e844e54428edcb7e3356cb3d0492392f6bde3
(cherry picked from commit fb9272c637f4b657d40057145e4dbce989005e67)

7 years agoSensorManager: attach background thread to JavaVM
Yifan Hong [Wed, 14 Jun 2017 01:20:09 +0000 (18:20 -0700)]
SensorManager: attach background thread to JavaVM

Test: pass
Bug: 62404135
Change-Id: Ic3c0849cd366f550cbdccbb9bb8d082c5c570c35

7 years agoApp launch test apk change
gopinath [Fri, 12 May 2017 22:37:37 +0000 (15:37 -0700)]
App launch test apk change

Support launching the app using the package name.
Remove the unused variables.

b/33226470

Change-Id: I5b3829912782a9fc0c8f09cbd6fa9ee4b5b35314
(cherry picked from commit a00259f47dc480f799a812a00f52e3c887aae4b0)

7 years agoMerge "Support associating with an already-paired device" into oc-dev
TreeHugger Robot [Wed, 14 Jun 2017 00:03:49 +0000 (00:03 +0000)]
Merge "Support associating with an already-paired device" into oc-dev

7 years agoMerge "Fix #62545908 : 'metered' network jobs run without network" into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 23:27:10 +0000 (23:27 +0000)]
Merge "Fix #62545908 : 'metered' network jobs run without network" into oc-dev

7 years agoMerge "Use UiContext with StrictMode Dialog" into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 23:16:58 +0000 (23:16 +0000)]
Merge "Use UiContext with StrictMode Dialog" into oc-dev

7 years agoMerge "Boost the anim thread priority when doing a bounds animation." into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 22:43:46 +0000 (22:43 +0000)]
Merge "Boost the anim thread priority when doing a bounds animation." into oc-dev

7 years agoMerge "Save overlay paths as user state" into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 22:31:36 +0000 (22:31 +0000)]
Merge "Save overlay paths as user state" into oc-dev

7 years agoSelect the right pages to scrap
Philip P. Moltmann [Tue, 13 Jun 2017 22:29:01 +0000 (15:29 -0700)]
Select the right pages to scrap

The code before overwrote some data the outside code expected to not be
modified which resulted in the scrapped pages to be offset.

Test: - cts-tradefed run cts-dev -m Print
      - Tried to repro case in the bug
Bug: 62296301

Change-Id: If3f250dbca43125bbbe9faadc5183a6dbaa69481

7 years agoMerge "Fix issue #62390590: SecurityException in JobIntentService$..." into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 21:51:46 +0000 (21:51 +0000)]
Merge "Fix issue #62390590:  SecurityException in JobIntentService$..." into oc-dev

7 years agoMerge "Send ACTION_SHUTDOWN broadcast to manifest receivers" into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 21:36:45 +0000 (21:36 +0000)]
Merge "Send ACTION_SHUTDOWN broadcast to manifest receivers" into oc-dev

7 years agoMerge "Fix sysui depending on slow bt calls" into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 21:32:28 +0000 (21:32 +0000)]
Merge "Fix sysui depending on slow bt calls" into oc-dev

7 years agoMerge "Remove stopship workaround for instant app targetSdkVersion" into oc-dev
Chad Brubaker [Tue, 13 Jun 2017 21:18:23 +0000 (21:18 +0000)]
Merge "Remove stopship workaround for instant app targetSdkVersion" into oc-dev

7 years agoUse UiContext with StrictMode Dialog
Adam Lesinski [Tue, 13 Jun 2017 21:15:19 +0000 (14:15 -0700)]
Use UiContext with StrictMode Dialog

Bug: 62382723
Test: manual
Change-Id: I5cb5ac5de0800b31d0dad7698f9229873ff83e27

7 years agoFix footer not being hidden in detail panels
Jason Monk [Tue, 13 Jun 2017 17:47:54 +0000 (13:47 -0400)]
Fix footer not being hidden in detail panels

Was causing incorrect accessibility focus

Test: manual
Change-Id: Id487286eb9fa931b73349b0b0dfe772566c10e6d
Fixes: 62568126

7 years agoFix #62545908 : 'metered' network jobs run without network
Christopher Tate [Tue, 13 Jun 2017 19:12:09 +0000 (12:12 -0700)]
Fix #62545908 : 'metered' network jobs run without network

Test: JobSchedulerTestApp

Change-Id: I9c15022f5542163a27c6aaa4c3ee6b677cffd699

7 years agoMerge "Binder: Add more logging on Error" into oc-dev
TreeHugger Robot [Tue, 13 Jun 2017 21:03:38 +0000 (21:03 +0000)]
Merge "Binder: Add more logging on Error" into oc-dev

7 years agoSend ACTION_SHUTDOWN broadcast to manifest receivers
Christopher Tate [Tue, 13 Jun 2017 19:11:09 +0000 (12:11 -0700)]
Send ACTION_SHUTDOWN broadcast to manifest receivers

Fix #36767224
Test: manual

Change-Id: If8f1fa986b9b8f3c426e4c0623bbca6f96b7199c

7 years agoSave overlay paths as user state
Todd Kennedy [Tue, 13 Jun 2017 15:24:32 +0000 (08:24 -0700)]
Save overlay paths as user state

Instead of maintaining a separate structure just for overlay
paths, store them as user state in the package setting. Also
centralize updating the overlay paths to avoid issues with
inconsistent updates.

Fixes: 36561125
Test: Manual
Change-Id: Iac1c987e8650074dbc564e332d5da1950fad6ac5

7 years agoMerge "Address issues surrounding freezing by display." into oc-dev
Bryce Lee [Tue, 13 Jun 2017 18:50:57 +0000 (18:50 +0000)]
Merge "Address issues surrounding freezing by display." into oc-dev

7 years agoFix issue #62390590: SecurityException in JobIntentService$...
Dianne Hackborn [Tue, 13 Jun 2017 17:33:19 +0000 (10:33 -0700)]
Fix issue #62390590:  SecurityException in JobIntentService$...

...JobServiceEngineImpl$WrapperWorkItem.complete

When a job is in the process of stopping a job, we should no
longer allow new work to be dispatched for it.

Also there was an issue with how we determine wether a caller
is valid for the current job -- this was only based on the uid
of the currently running job, but of course that context could
be re-used for a new job of the same uid.  Instead, we now create
a different callback binder for each client, so we can identify
the exact client each time it calls back.  (This also allows us
to hang information about why the job last stopped on that
client state, so we can always report it.)

Finally make a bunch of classes final that should have been.

Test: bit CtsJobSchedulerTestCases:*

Change-Id: I1b00dd2da710414dd2898c4d39a5c528d54b95ea

7 years agoUse correct timestamps of events for logging.
Sudheer Shanka [Mon, 12 Jun 2017 17:37:29 +0000 (10:37 -0700)]
Use correct timestamps of events for logging.

Currently when WM detects certain events, it will notify the logger
of these events asynchronously and logger uses the timestamp at which it
gets notified to log these events. It's possible that the delay between
when the event actually occurs and when the logger gets notified could be
large. So for better accuracy, WM should also pass on the event timestamp
to the logger.

Bug: 62375480
Test: Triggered sysui_multi_action event logs and verified that
      APP_TRANSITION_DELAY_MS is less than APP_TRANSITION_WINDOWS_DRAWN_DELAY_MS.
Test: When the system is not busy, the timestamps we used to log earlier
      and timestamps we log with this change are almost same.
Change-Id: I5f62654a6b7f179d821c0082b180246c8a569df1

7 years agoDayPickerView - clamp date to min/max
Andrei Stingaceanu [Tue, 13 Jun 2017 16:12:52 +0000 (17:12 +0100)]
DayPickerView - clamp date to min/max

Besides clamping @ setMinDate() and setMaxDate() also
clamp @ setDate().

Bug: 36636681
Bug: 62485314
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t
      android.widget.cts.CalendarViewTest#testMinMaxRangeClampingMaterial

Change-Id: I455cd43e7228e10d58b5f886dcab8332bca72de7

7 years agoFix sysui depending on slow bt calls
Jason Monk [Tue, 13 Jun 2017 16:49:55 +0000 (12:49 -0400)]
Fix sysui depending on slow bt calls

Move calls to a background thread and cache the results to avoid
slowing down sysui when there are too many bluetooth devices.

Test: runtest systemui
Change-Id: Ica10e86ca6b2783c30ed9de68f1a91dc5cfdf068
Fixes: 38118549

7 years agoBinder: Add more logging on Error
Andreas Gampe [Mon, 12 Jun 2017 17:43:05 +0000 (10:43 -0700)]
Binder: Add more logging on Error

Try to add the Error's message to the abort, so that it shows up
when the logcat is missing.

Sample message:

'jni_internal.cc:508] JNI FatalError called: java.lang.Error thrown during binder transaction: java.lang.LinkageError: This is a test.'

(cherry picked from commit 58383ba095f552a58ed416736fe049126c647ffd)

Bug: 62514767
Test: m
Change-Id: I12026bb7a8ec9438db493f135ed5d0177187f702