Commit Graph

344 Commits

Author SHA1 Message Date
android-build-team Robot
739aec86d2 Snap for 4507345 from 85fb9ddccc to pi-release
Change-Id: I0428292b2ec44253f65f80114cd63b2876193911
2017-12-17 08:21:33 +00:00
TreeHugger Robot
85fb9ddccc Merge "Add android.test.base/stubs dependency" 2017-12-15 14:00:38 +00:00
Philip P. Moltmann
dab728b9cd Switch to modern ArgumentMatchers am: 13ade30481 am: 4825219c58
am: aac55283be

Change-Id: I2d60912d3e54cfb69c57c2bba17ef4c594835507
2017-12-15 11:37:41 +00:00
Philip P. Moltmann
aac55283be Switch to modern ArgumentMatchers am: 13ade30481
am: 4825219c58

Change-Id: I36cc4d4c4a21024cf85f407426d4cbe09eaeaca7
2017-12-15 11:16:30 +00:00
Philip P. Moltmann
4825219c58 Switch to modern ArgumentMatchers
am: 13ade30481

Change-Id: I179e84cc63294062f158813685a03dfa326431fb
2017-12-15 10:55:57 +00:00
Paul Duffin
3a14dd0aa8 Add android.test.base/stubs dependency
In preparation for the removal of the non-junit classes in the
android.test.base library from the android.jar this adds a dependency
on android.test.base/stubs to ensure this code will continue to
compile.

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.

* tests/Android.mk
    Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
    messagingtests's will need them in order to compile once its
    classes are removed from the current SDK on which it currently
    depends.

Bug: 30188076
Test: make dist
Change-Id: Iabfb3c655897781ab3aee2b0dbf574d6048954a9
2017-12-15 07:22:38 +00:00
Philip P. Moltmann
13ade30481 Switch to modern ArgumentMatchers
Test: - adb shell am instrument -w -e class com.android.messaging.ui.attachmentchooser.AttachmentChooserFragmentTest com.android.messaging.test/android.test.InstrumentationTestRunner
      - adb shell am instrument -w -e class com.android.messaging.ui.conversation.ComposeMessageViewTest com.android.messaging.test/android.test.InstrumentationTestRunner
      - adb shell am instrument -w -e class com.android.messaging.ui.conversationlist.ConversationListItemViewTest com.android.messaging.test/android.test.InstrumentationTestRunner
Change-Id: Ic3f29ed0e13b392d5687934f25d99c2a0e8c4dac
2017-12-14 09:48:05 -08:00
android-build-team Robot
613144092f Snap for 4502278 from f6aa0ff80e to pi-release
Change-Id: Iff6e3d39f3b2c29fd9a04a9206c4b4f03cc397bc
2017-12-14 08:33:18 +00:00
Philip P. Moltmann
f6aa0ff80e Merge "Switch to modern ArgumentMatchers" 2017-12-13 23:40:20 +00:00
android-build-team Robot
2bbefa816b Snap for 4500033 from dc6414be65 to pi-release
Change-Id: I7b2e7c6aaec549c1106da289f89b4bc19aec1f8a
2017-12-13 08:33:07 +00:00
Paul Duffin
dc6414be65 Use a.t.mock.stubs instead of a.t.mock.sdk am: 13c0cbe2c6 am: 79fbe99445
am: f18ac489da  -s ours

Change-Id: I771681a6d2479b44034a377d4f6bc2cd27c698f3
2017-12-13 01:57:22 +00:00
Paul Duffin
f18ac489da Use a.t.mock.stubs instead of a.t.mock.sdk am: 13c0cbe2c6
am: 79fbe99445

Change-Id: Ic556f9fccca1051830d428985d36cc4126602b63
2017-12-13 01:43:58 +00:00
Paul Duffin
79fbe99445 Use a.t.mock.stubs instead of a.t.mock.sdk
am: 13c0cbe2c6

Change-Id: I41c4cf94c3aba9c259a55d2fc3a6b207069944ee
2017-12-13 01:11:53 +00:00
Philip P. Moltmann
ea5d77fa38 Switch to modern ArgumentMatchers
Test: - adb shell am instrument -w -e class com.android.messaging.ui.attachmentchooser.AttachmentChooserFragmentTest com.android.messaging.test/android.test.InstrumentationTestRunner
      - adb shell am instrument -w -e class com.android.messaging.ui.conversation.ComposeMessageViewTest com.android.messaging.test/android.test.InstrumentationTestRunner
      - adb shell am instrument -w -e class com.android.messaging.ui.conversationlist.ConversationListItemViewTest com.android.messaging.test/android.test.InstrumentationTestRunner
Change-Id: Ic3f29ed0e13b392d5687934f25d99c2a0e8c4dac
2017-12-12 13:07:12 -08:00
Paul Duffin
13c0cbe2c6 Use a.t.mock.stubs instead of a.t.mock.sdk
Remove dependencies on android.test.mock.sdk as it is a duplicate of
android.test.mock.stubs and will be removed.

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.

* tests/Android.mk
    Replaced 'android.test.mock.sdk' with 'android.test.mock.stubs' in
    LOCAL_JAVA_LIBRARIES because android.test.mock.sdk has been
    deprecated.

Bug: 30188076
Test: make checkbuild
Change-Id: I40d388f5e07293f7d958b563bc8ab94f89ff9f8d
Merged-In: I40d388f5e07293f7d958b563bc8ab94f89ff9f8d
(cherry picked from commit ea59fb8c73)
2017-12-07 13:33:09 -08:00
android-build-team Robot
559aa3cd3f Snap for 4489599 from 2e86be170a to pi-release
Change-Id: I9531c95031542fdc87efc5e3ee310381d3094d2b
2017-12-07 08:21:05 +00:00
Paul Duffin
2e86be170a Flatten dependency hierarchy of legacy-android-test
Previous changes statically included legacy-android-test in preparation
for removing android.test.* and junit.* classes from the android.jar.
Unfortunately, that lead to duplicate classes between APKs and the
bootclasspath which caused build problems (Proguard) and also runtime
problems (when targeting and running on older releases).

Switching from statically including the classes to using the runtime
libraries cannot be done in one step because legacy-android-test is
statically included in libraries which are used in many APKs and so
removing it from those libraries requires that all APKs be updated at
once. Doing that atomically across dozens of projects is not practical.

This change modifies APKS that statically include the
legacy-android-test library indirectly.

* If the APK manifest uses the android.test.runner library then the APK
  is modified to stop statically including legacy-android-test and
  instead build against android.test.base/mock/runner libraries instead.

* Otherwise, the APK statically includes legacy-android-test.

Also, any libraries that statically include are modified to stop
statically including it and if it has source dependencies on the classes
is changed to build against the android.test.base/mock/runner libraries.

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.

* tests/Android.mk
    Replaced 'legacy-android-test' with 'android.test.runner.stubs' in
    LOCAL_JAVA_LIBRARIES because messagingtests's source depends on its
    classes. The classes do not need to be statically included because
    the classes will be provided by the runtime, either from the
    default bootclasspath or from the android.test.runner library that
    messagingtests specifies in its manifest.

Bug: 30188076
Test: make checkbuild
Change-Id: I7fa5bcf37c3b003c84ba5e493c6d675a619b6bcd
2017-12-05 18:36:57 +00:00
android-build-team Robot
4b7000782f Snap for 4464948 from 9812a75c01 to pi-release
Change-Id: I4a62afa0e2d265869bd2fbcd4b83e4f1480a0aa8
2017-11-22 08:20:59 +00:00
Aurimas Liutikas
9812a75c01 Migrate messaging to aapt2.
Test: make messaging
Change-Id: I460554bc92244feeca6e28081daf66d0dc2e6281
2017-11-21 12:50:18 -08:00
android-build-team Robot
29fe83ef12 Snap for 4459973 from ea59fb8c73 to pi-release
Change-Id: Ie36d26f6daa3c1b184a3f53f5cb7efe3ab06848b
2017-11-19 08:22:08 +00:00
Paul Duffin
ea59fb8c73 Use a.t.mock.stubs instead of a.t.mock.sdk
Remove dependencies on android.test.mock.sdk as it is a duplicate of
android.test.mock.stubs and will be removed.

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.

* tests/Android.mk
    Replaced 'android.test.mock.sdk' with 'android.test.mock.stubs' in
    LOCAL_JAVA_LIBRARIES because android.test.mock.sdk has been
    deprecated.

Bug: 30188076
Test: make checkbuild
Change-Id: I40d388f5e07293f7d958b563bc8ab94f89ff9f8d
2017-11-16 12:57:30 +00:00
android-build-team Robot
4f38e34ada Snap for 4453288 from 6337883a56 to pi-release
Change-Id: I00d44138129a1fa95a9f4fb30886c4e0c34cb055
2017-11-15 08:27:46 +00:00
Xin Li
6337883a56 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
am: cd9ba9e128

Change-Id: I1d26b974d483b727ff1f023838cd3ac121ffa86c
2017-11-15 02:36:20 +00:00
Xin Li
cd9ba9e128 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Change-Id: Ieafa1d7163c3b586f9daa34a8b8239ea57db6636
2017-11-14 16:38:23 -08:00
Xin Li
8f6c644d6f Merge commit 'b2dd6a8ef54b233843b463204ec4e3b67148a7e8' into HEAD
Change-Id: Id7e29d1428552414abd16ac7cd17d86b51e61658
2017-11-13 14:35:43 -08:00
android-build-team Robot
3a2068bf17 Snap for 4434599 from 14dbcbcee7 to pi-release
Change-Id: Ide5619a4961070f04b24a9b949d4141f019bc15d
2017-11-05 07:32:42 +00:00
Chih-Hung Hsieh
14dbcbcee7 Use -Werror in packages/apps/Messaging/jni am: cd6efe25a4 am: dfd8a9187f
am: ea2d2ad395

Change-Id: I20efed71a86dbee07b0f7edf2831393e1147ed89
2017-11-02 19:48:29 +00:00
Chih-Hung Hsieh
ea2d2ad395 Use -Werror in packages/apps/Messaging/jni am: cd6efe25a4
am: dfd8a9187f

Change-Id: Ic4f431bbe8c918b7f15f26d06553917e2a8ddfbc
2017-11-02 19:17:18 +00:00
Chih-Hung Hsieh
dfd8a9187f Use -Werror in packages/apps/Messaging/jni
am: cd6efe25a4

Change-Id: I56f5bee51ab4a56b11fc4e639b063728735f31e0
2017-11-02 19:03:25 +00:00
Chih-Hung Hsieh
cd6efe25a4 Use -Werror in packages/apps/Messaging/jni
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I3d7f5b98523c9fee08f2d1c29178ae050923617c
2017-11-01 15:56:01 -07:00
android-build-team Robot
1b629c6833 Snap for 4399706 from 467361dbcf to pi-release
Change-Id: Ibd977e2cf7a6628e298f3c02714f9fb8dcc171a7
2017-10-17 08:08:28 +00:00
Tom Taylor
467361dbcf 37742976 - Catch bad gifs
* A security researcher crafted a gif that would cause the Android
Bitmap code to throw an NPE. That would cause messaging to crash when
decoding the NPE. The frameworks team is changing the underlying code to
throw an OutOfMemoryError instead of a NullPointerException.
In order to catch both errors, the code needs to catch Throwable.

Test: I added code to GifImageResource.getDrawable to throw a new
OutOfMemoryError and then used the debugger to verify it was caught by the
new catch Throwable statement. I did the same test with NullPointerException.
I tested attaching gif images and sending them to verify the gif path still
worked.

BUG=37742976

Change-Id: If71a7e65f8c0b083fe6c4b79f78358666338d59d
2017-10-05 11:27:21 -07:00
Tom Taylor
b2dd6a8ef5 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4 am: 93d52cb5e2 am: cbed68f73b am: f9b9dc3d2f am: c12af8d012 am: 3f22a4820c
am: 443a8888f2

Change-Id: I85c47a8571a609321e2c3e0dd4f2a2b57015e839
2017-07-12 19:33:47 +00:00
Tom Taylor
9a643d5c1c 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4 am: 93d52cb5e2 am: cbed68f73b am: f9b9dc3d2f am: c12af8d012 am: 7ace2d5308
am: cb822ae902

Change-Id: I0b28ce9619853b280cd93af783b93d6aff92bc4f
2017-07-12 19:33:39 +00:00
Tom Taylor
443a8888f2 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4 am: 93d52cb5e2 am: cbed68f73b am: f9b9dc3d2f am: c12af8d012
am: 3f22a4820c

Change-Id: I3007cf14803262bbb6f28db602b16252ebc4a62c
2017-07-12 19:29:21 +00:00
Tom Taylor
cb822ae902 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4 am: 93d52cb5e2 am: cbed68f73b am: f9b9dc3d2f am: c12af8d012
am: 7ace2d5308

Change-Id: I1872889b944cdffa63bafd7a125315d2fe2d7917
2017-07-12 19:28:15 +00:00
Tom Taylor
7ace2d5308 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4 am: 93d52cb5e2 am: cbed68f73b am: f9b9dc3d2f
am: c12af8d012

Change-Id: I70465c2290a2ba08d7647acab20bdfb25e8b3ecd
2017-07-12 19:24:50 +00:00
Tom Taylor
3f22a4820c 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4 am: 93d52cb5e2 am: cbed68f73b am: f9b9dc3d2f
am: c12af8d012

Change-Id: I5c9fd14d532b95caaceb8ca8b5e70feee77c34a0
2017-07-12 19:24:29 +00:00
Tom Taylor
c12af8d012 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4 am: 93d52cb5e2 am: cbed68f73b
am: f9b9dc3d2f

Change-Id: Ica8bedeb18ee6604e1382f54f0ad910b7cfa8c40
2017-07-12 19:20:09 +00:00
Tom Taylor
f9b9dc3d2f 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4 am: 93d52cb5e2
am: cbed68f73b

Change-Id: I66781d5390231f55da0ead3293010a240c632ff8
2017-07-12 19:15:11 +00:00
Tom Taylor
cbed68f73b 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1 am: a072033ce4
am: 93d52cb5e2

Change-Id: I35c5b7ee69984e1c91c63c9cf78af9d1c0e0ab43
2017-07-12 19:12:40 +00:00
Tom Taylor
93d52cb5e2 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4 am: 6ea30b87b1
am: a072033ce4

Change-Id: I2ead912804b75f6633d04259e0bdd61f2b4aad5f
2017-07-12 19:11:39 +00:00
Tom Taylor
a072033ce4 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360 am: 7a6b99a4a4
am: 6ea30b87b1

Change-Id: I28cfc0b9abbc28420feec7c690406ebe922b31e8
2017-07-12 19:09:10 +00:00
Tom Taylor
6ea30b87b1 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec am: 22bbfd7360
am: 7a6b99a4a4

Change-Id: I0817d9c8e4e30630cd0008f93ee31a728342eae1
2017-07-12 19:07:09 +00:00
Tom Taylor
7a6b99a4a4 37742976 - Catch bad gifs am: e0f247e399 am: 7c28ca34ec
am: 22bbfd7360

Change-Id: Ibe13d61b03cc6ae40d6782bf7ae045b5aeb491de
2017-07-12 19:06:10 +00:00
Tom Taylor
22bbfd7360 37742976 - Catch bad gifs am: e0f247e399
am: 7c28ca34ec

Change-Id: I0dad7e115a279290a51ee652dbd6a4f9b7ab7081
2017-07-12 19:02:38 +00:00
Tom Taylor
7c28ca34ec 37742976 - Catch bad gifs
am: e0f247e399

Change-Id: I54307fd0a08e1ecc14b2f3be5b8d52fac6ff7033
2017-07-12 19:01:08 +00:00
Tom Taylor
e0f247e399 37742976 - Catch bad gifs
* A security researcher crafted a gif that would cause the Android
Bitmap code to throw an NPE. That would cause messaging to crash when
decoding the NPE. Catch the NPE.

Test: manually tested the "crash.gif" attached to the bug. Stepped
through the debugger to verify we're catching the NPE and logging
the attempt. Verified normal gifs still work.

Bug: 37742976

Change-Id: Iab814d5b0b514bed0cecddd9a76f1fc095f90892
(cherry picked from commit 3671fd94ae)
2017-06-23 16:48:57 -07:00
TreeHugger Robot
8bd347d158 Merge "37742976 - Catch bad gifs" 2017-06-23 22:41:29 +00:00
Tom Taylor
3671fd94ae 37742976 - Catch bad gifs
* A security researcher crafted a gif that would cause the Android
Bitmap code to throw an NPE. That would cause messaging to crash when
decoding the NPE. Catch the NPE.

Test: manually tested the "crash.gif" attached to the bug. Stepped
through the debugger to verify we're catching the NPE and logging
the attempt. Verified normal gifs still work.

BUG=37742976

Change-Id: Iab814d5b0b514bed0cecddd9a76f1fc095f90892
2017-06-23 14:09:12 -07:00