2373 Commits

Author SHA1 Message Date
Colin Cross
6b13ebc7f1 Enable multi-dex for dx
Add LOCAL_DX_FLAGS := --multi-dex where it is enabled for jack.
Also stop enabling multi-dex when coverge is enabled, since
multi-dex is now enalbed unconditionally.

Test: builds
Change-Id: I67fedcdd5bb5d7091468bddcb0c22bab720a51d2
Merged-In: I67fedcdd5bb5d7091468bddcb0c22bab720a51d2
(cherry picked from commit 17ffa24277380c69bf365fa595e7d4e6e51825eb)
2017-07-27 17:48:44 +00:00
Neil Fuller
a76d88d26d Merge "Re-enable some test cases"
am: 8feaad7249

Change-Id: I1b86866748afa6d6014abcbf59116a7abf67b54e
2017-07-19 09:51:17 +00:00
Neil Fuller
29ff71baa4 Re-enable some test cases
Re-enable some test cases now the case they test has been
renabled (by commit 3d7a4143d5a2b771a02777354c9a11c981c63c59).

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"

Bug: 31008728
Test: See above
Change-Id: Ia26c4355e41d5b1010594a06bb8c4e8cef8528f7
2017-07-18 10:30:53 +01:00
Neil Fuller
06c2f8e346 Merge "Add dumpsys support to RulesManagerService"
am: 348a1d635d

Change-Id: Ib1b44ce174b625f2223dff72081ccfc7b2a9b390
2017-07-03 09:41:47 +00: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
Neil Fuller
50a15e7f6e Merge "Track move of distro installer code"
am: 8558d93db8

Change-Id: I2d27a58c21b7b8931b1d058d6a6bc88eeb8f7709
2017-06-30 12:38:05 +00:00
Neil Fuller
8558d93db8 Merge "Track move of distro installer code" 2017-06-30 12:28:23 +00:00
Neil Fuller
5ca8b5bf77 Track move of distro installer code
Track move of distro installer code; reflect the new
build target.

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"

Bug: 31008728
Test: See above
Change-Id: Iad987d404af75af3694d50e25ed419889a9557f2
2017-06-29 12:41:27 +01:00
Neil Fuller
4a7e3de5e7 Merge "Switch PackageStatusStorage to XML-based storage"
am: 4e77ae6d1a

Change-Id: Ib30177ef93ecacfbd6ab0fb98f933fbf8af0e270
2017-06-28 17:13:35 +00:00
Neil Fuller
4e77ae6d1a Merge "Switch PackageStatusStorage to XML-based storage" 2017-06-28 17:01:56 +00:00
Neil Fuller
4fee968fa8 Merge "Switch to streaming data for time zone update"
am: f093d4e13e

Change-Id: I3fd22fe47e1d7b86d4f88d527940c6812ecfa31b
2017-06-27 12:05:17 +00:00
Neil Fuller
9e28f78763 Merge "Avoid use of TimeZoneDistro.equals() method" am: fe0b43cb1e
am: 6b5d71f7e5

Change-Id: Ib4d97f72a9fa936beb47267c9e9a888e306ed0e5
2017-06-26 15:01:37 +00:00
Neil Fuller
5f6750f9d1 Switch PackageStatusStorage to XML-based storage
Based on feedback from a framework developer: an XML file can be used
instead of a Sqlite DB.

To run tests:
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.
Bug: 31008728
Change-Id: I1e6614d26df0e37ccea4dff82867e0b6aba39ca6
2017-06-26 14:49:59 +01:00
Neil Fuller
54525bf939 Switch to streaming data for time zone update
Switch to streaming data for time zone update rather than
loading it into memory first.

Also make sure that the ParcelFileDescriptor passed to the
service is closed in all cases.

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
Bug: 31008728
Change-Id: Ia1e27b204697caee62deb2a3d682800350bca800
2017-06-26 12:03:11 +01:00
Neil Fuller
9c90dc06a3 Avoid use of TimeZoneDistro.equals() method
The TimeZoneDistro method is going away.

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
Bug: 31008728

Change-Id: Id90cf7ce534b888bf6df1bf1dc9d497608dcdbe9
2017-06-26 11:55:21 +01:00
Neil Fuller
7f5e9bd68c Merge "Track TimeZoneDistroInstaller method changes" am: ba6b96d978
am: 7ab9d93fa4

Change-Id: I0388475b92a6b4f981d5027992af461f48181ab2
2017-06-20 15:02:37 +00:00
Neil Fuller
fe3b1182c5 Track TimeZoneDistroInstaller method changes
The TimeZoneDistroInstaller now takes a TimeZoneDistro object
not bytes, which will help to hide whether the distro is in memory
or in storage. See the associated libcore change for details.

To run tests:
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.
Bug: 31008728

Change-Id: Ieead1bb87b9ae196abab93342ba5c5747ca45116
2017-06-19 18:26:46 +01:00
Tony Mantler
d537d3778b Merge "Disable notification sounds on TV" into oc-dev
am: b5979092b8

Change-Id: Iec7f207648a7df13c2d963be4b48f3286ded2dc2
2017-06-16 22:12:03 +00:00
Tony Mantler
ab55f0f2b0 Disable notification sounds on TV
Bug: 38495875
Test: BuzzBeepBlinkTest
Change-Id: Iffebe2063de3d73c1538a3bbbe9edd2233005ba3
2017-06-16 12:47:19 -07:00
Android Build Merger (Role)
e1c75566e5 Merge "Merge "Fix two IndexOutOfBoundsException crashes." into oc-dev am: ded5608f18" into oc-dev-plus-aosp 2017-06-16 13:38:58 +00:00
Julia Reynolds
4f7e28b4e1 Merge "Fix two IndexOutOfBoundsException crashes." into oc-dev
am: ded5608f18

Change-Id: I32546aa6f7276a26b4e0419f83253110d83da01d
2017-06-16 13:36:32 +00:00
Neil Fuller
a6a71d0cd5 Track movement of some libcore/tzdata files
Some files in libcore/tzdata are moving to system/timezone
under the package com.android.timezone.distro.

To run tests:
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.
Bug: 31008728
Merged-In: I2600dd4bee22a571b9eb7303733591b60d1a8b2a
Change-Id: I2600dd4bee22a571b9eb7303733591b60d1a8b2a
2017-06-16 11:56:31 +00:00
Neil Fuller
3b5ae1e60f Track movement of some libcore/tzdata files
Some files in libcore/tzdata are moving to system/timezone
under the package com.android.timezone.distro.

To run tests:
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.
Bug: 31008728
Change-Id: I2600dd4bee22a571b9eb7303733591b60d1a8b2a
2017-06-16 12:26:22 +01:00
Julia Reynolds
0839c02bcb 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
2017-06-15 21:31:42 +00:00
Paul Duffin
37e9a28262 Fix dependencies of packages that target earlier releases
A previous change added legacy-android-test as a static dependency to
all packages that build against the current, test_current or
system_current and failed to compile when the junit and android.test
classes were removed from the API. Unfortunately, those changes did not
take into account that some of those packages target earlier API
versions and so will always have the classes available at runtime.

This change replaces those static dependencies with dynamic dependencies
for any package that targets an earlier API version. The file changes
were made automatically by a tool that constructed and then analyzed a
full dependency graph of all the Android Java modules. The individual
changes were checked manually to ensure that the changes matched the
intent. The affected modules were built against an API with the junit
and android.test classes removed. Any issues found during this process
resulted in either the tool being updated to address the issue or a
separate change being made to fix an existing problem with the build. A
sample of the affected packages were run to ensure that they worked as
expected at runtime; no issues were found during testing.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* packages/SettingsProvider/test/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because SettingsProviderTest's manifest file (AndroidManifest.xml)
    targets API level 21 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

    Added 'legacy-android-test' to LOCAL_JAVA_LIBRARIES because module
    SettingsProviderTest uses classes from package android.test
    (possible indirectly) and needs them available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

* services/tests/servicestests/Android.mk
    Replaced 'android.test.runner' with 'android.test.mock' and
    'legacy-android-test' in LOCAL_JAVA_LIBRARIES because module
    FrameworksServicesTests uses classes from packages android.test and
    android.test.mock (possible indirectly) and needs them available at
    compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    They were not added to LOCAL_STATIC_JAVA_LIBRARIES because
    FrameworksServicesTests's manifest file (AndroidManifest.xml)
    targets API level 26 and uses the android.test.runner library which
    will provide the classes dynamically at runtime.

    Dependency 'android.test.mock.sdk' is used instead of
    'android.test.mock' because module FrameworksServicesTests builds
    against internal jars not the API and so should use libraries that
    build against internal jars not the API.

* tests/AppLaunch/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module AppLaunch uses classes from
    package android.test (possible indirectly) and needs them available
    at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because AppLaunch's manifest file (AndroidManifest.xml) targets API
    level 24 and dynamically includes the android.test.runner library
    at runtime so there is no point in statically including the
    classes.

* tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module SmartCamera-tests uses classes
    from package android.test (possible indirectly) and needs them
    available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because SmartCamera-tests's manifest file (AndroidManifest.xml)
    targets API level 17 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

* tests/Compatibility/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module AppCompatibilityTest uses
    classes from package android.test (possible indirectly) and needs
    them available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because AppCompatibilityTest's manifest file (AndroidManifest.xml)
    targets API level 21 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

Bug: 30188076
Test: make checkbuild and ran a sample of tests
Change-Id: I3d183a96bf87437028a2d4b774d311e40349f4d0
2017-06-15 09:10:13 +01:00
Jorim Jaggi
641160b7d4 Merge "Remove snapshot when screen gets rotated in mean time" into oc-dev
am: 0823c9ff5c

Change-Id: Idb18d226c2d7d427fcbb61ff2218d5fd034cb63e
2017-06-15 06:30:15 +00:00
TreeHugger Robot
0823c9ff5c Merge "Remove snapshot when screen gets rotated in mean time" into oc-dev 2017-06-15 06:24:36 +00:00
Jorim Jaggi
38d44ec857 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
2017-06-14 21:26:14 -07:00
Jorim Jaggi
71e1b227cd Merge "Use splashscreen if we can't fill horizontaly with snapshot" into oc-dev
am: 04c3cc6d12

Change-Id: I9d9afbb3161bd5abfa9d4fe2a98e00b643b602ea
2017-06-15 04:25:04 +00:00
Jorim Jaggi
04c3cc6d12 Merge "Use splashscreen if we can't fill horizontaly with snapshot" into oc-dev 2017-06-15 04:19:53 +00:00
Jorim Jaggi
42befc64c4 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
2017-06-14 18:34:37 -07:00
Wale Ogunwale
90159a2492 Merge "Ensure that we use SF Vsync Choreographer for the PiP transition." into oc-dev
am: e1e0db8ca9

Change-Id: Ie70addce27b9551323d7c9d8f9576aa118b98114
2017-06-13 00:02:11 +00:00
Winson Chung
4a526c1245 Ensure that we use SF Vsync Choreographer for the PiP transition.
- Move the bounds animation onto the animation thread
- Remove existing code referencing the old sf-vsync choreographer
- Add ability for ValueAnimator subclasses to reference a different
  AnimationHandler, which uses a different FrameCallbackProvider with the
  sf-vsync choreographer in the animations that require it
- Ensure that PiP touch events are batched and sent aligned with the
  sf-vsync
- Move GC onto its own thread to not block other BackgroundThread calls

Bug: 36371375
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: bit FrameworksServicesTests:com.android.server.wm.BoundsAnimationControllerTests
Test: go/wm-smoke

Change-Id: I6a41b35a4e4d4d6dbea82c2673452825fe3ffa58
2017-06-12 10:08:58 -07:00
sunjian
b22429d53f Update AccountManagerService side logic for .getAccountsByTypeForPackage with null type.
am: d62dc39dc5

Change-Id: Idf3475786676e9713e4fa5756ecce9c675da8c3e
2017-06-06 21:56:07 +00:00
sunjian
d62dc39dc5 Update AccountManagerService side logic for .getAccountsByTypeForPackage
with null type.

Bug: 37987384
Test: manual, APCT
Change-Id: I4d5f735736f1b1d7bbf778aee2ec813071c34f19
2017-06-06 21:45:58 +00:00
Jian Sun
c3c3112806 Merge "Fix visibility issue in AccountManager.getAuthTokenByFeatures." into oc-dev
am: f1946baae7

Change-Id: Iacba4bd641367f5cf64bcd4d7098bba05fca835d
2017-06-06 18:48:33 +00:00
Jian Sun
f1946baae7 Merge "Fix visibility issue in AccountManager.getAuthTokenByFeatures." into oc-dev 2017-06-06 18:30:12 +00:00
sunjian
f29d549c2d Fix visibility issue in AccountManager.getAuthTokenByFeatures.
Bug: 34679769
Test: manual, APCT
Change-Id: I7270a5a5dd681ad088fa28e48d849ba3541e45cd
2017-06-05 13:13:45 -07:00
Julia Reynolds
c9df14bad9 Merge "Don't allow blocked apps to post notifications" into oc-dev
am: 2f77da6e10

Change-Id: I17808b200cba543f163bea8e3326bcce4792ef1f
2017-06-05 13:20:23 +00:00
Julia Reynolds
2f77da6e10 Merge "Don't allow blocked apps to post notifications" into oc-dev 2017-06-05 13:12:57 +00:00
Chris Wren
6b88afda65 Merge "add channel and group tags to the notificaiton logs" into oc-dev
am: 76e76a5c26

Change-Id: I0386428f5a8f8c8c0ac2cec5dc98ad35f5b3042d
2017-06-02 22:44:26 +00:00
Chris Wren
b39217972e add channel and group tags to the notificaiton logs
Change-Id: Icf029e42fca46262c9d9f8ff63f26de098f888bf
Fixes: 37714086
Test: runtest systemui-notification
2017-06-02 16:19:13 -04:00
Julia Reynolds
4da7970dab Don't allow blocked apps to post notifications
Change-Id: I82ed7d954746e65c086ba43c3f4733f9edeae081
Fixes: 62217679
Test: runtest sysmui-notification
2017-06-02 11:29:35 -04:00
Geoffrey Pitsch
cd020cc63e Merge "Mock out usageStats in NotificationManagerServiceTests" into oc-dev
am: fd0b15c196

Change-Id: I56ff2491ee5fd1d72f215e41a4d6ee2ee535ab8a
2017-06-02 14:50:54 +00:00
TreeHugger Robot
fd0b15c196 Merge "Mock out usageStats in NotificationManagerServiceTests" into oc-dev 2017-06-02 14:44:26 +00:00
Jorim Jaggi
b24c38e4df Merge "Fix camera launch delay from Keyguard" into oc-dev
am: 73f2a2a4d7

Change-Id: Ic7c211955b8375d08da9dfbc59c348f71c1c7552
2017-06-01 21:17:10 +00:00
TreeHugger Robot
73f2a2a4d7 Merge "Fix camera launch delay from Keyguard" into oc-dev 2017-06-01 21:11:56 +00:00
Jean-Michel Trivi
0563a82fc0 Merge "Delay notification vibration to synchronize with notif sound" into oc-dev
am: 29db4b3556

Change-Id: Icfad056884cfb620cfd27e12146b280a5cb7c300
2017-06-01 20:44:38 +00:00
TreeHugger Robot
29db4b3556 Merge "Delay notification vibration to synchronize with notif sound" into oc-dev 2017-06-01 20:34:07 +00:00
Geoffrey Pitsch
d5bcf218cb Mock out usageStats in NotificationManagerServiceTests
Shouldn't be doing this db work in tests

Change-Id: Idadadd83bfe984bd0e1c991534f1fba93ca34b53
Fixes: 62251669
Test: runtest systemui-notification
2017-06-01 15:45:35 -04:00