From 17cc067e2516439d60e47b9dc93e2e4cfa5c03ae Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Thu, 2 Jun 2016 15:18:23 +0300 Subject: [PATCH 1/4] Trying to fix the Travis build. --- tns-core-modules/ui/animation/animation.android.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tns-core-modules/ui/animation/animation.android.ts b/tns-core-modules/ui/animation/animation.android.ts index 58cc98df1..826621601 100644 --- a/tns-core-modules/ui/animation/animation.android.ts +++ b/tns-core-modules/ui/animation/animation.android.ts @@ -376,18 +376,20 @@ export class Animation extends common.Animation implements definition.Animation private _enableHardwareAcceleration() { for (let i = 0, length = this._propertyAnimations.length; i < length; i++) { let cache = this._propertyAnimations[i].target._nativeView; - let layerType = cache.getLayerType(); - if (layerType !== android.view.View.LAYER_TYPE_HARDWARE) { - cache.layerType = layerType; - cache.setLayerType(android.view.View.LAYER_TYPE_HARDWARE, null); - } + if (cache){ + let layerType = cache.getLayerType(); + if (layerType !== android.view.View.LAYER_TYPE_HARDWARE) { + cache.layerType = layerType; + cache.setLayerType(android.view.View.LAYER_TYPE_HARDWARE, null); + } + } } } private _disableHardwareAcceleration() { for (let i = 0, length = this._propertyAnimations.length; i < length; i++) { let cache = this._propertyAnimations[i].target._nativeView; - if (cache.layerType !== undefined) { + if (cache && cache.layerType !== undefined) { cache.setLayerType(cache.layerType, null); cache.layerType = undefined; } From c26e0b29f3a4a28de97874b479f83340407dc5ee Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Thu, 2 Jun 2016 16:13:50 +0300 Subject: [PATCH 2/4] Trying to fix the failing Android tests. --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60cf761a0..d4d5ac4a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ env: - PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER - PACKAGE_NAME=tns-core-modules - NODE_VERSION=5.10.1 - - EMULATOR_API_VER=22 + - EMULATOR_API_VER=21 - RUNTIMEVERSION=next - AVD_NAME=Arm$EMULATOR_API_VER addons: @@ -33,8 +33,7 @@ before_script: - npm install -g grunt-cli - npm install - "(cd build/platform-declarations && npm install)" - - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b - armeabi-v7a -c 12M + - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi default/armeabi-v7a -c 12M - emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window -memory 2048 & - android-wait-for-emulator script: From 278d36a5e2a9caf4caa2626291d19798f744e168 Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Thu, 2 Jun 2016 16:58:23 +0300 Subject: [PATCH 3/4] Trying to make Travis build work. --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d4d5ac4a7..8032f9988 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,9 @@ before_script: - npm install - "(cd build/platform-declarations && npm install)" - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi default/armeabi-v7a -c 12M - - emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window -memory 2048 & - - android-wait-for-emulator + - emulator -avd $AVD_NAME -no-audio -no-window & + - android-wait-for-emulator & + - adb shell input keyevent 82 script: - jdk_switcher use oraclejdk8 - grunt default && From 2e483aaca54cbdb434f2e771010b75135a29c7bd Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Thu, 2 Jun 2016 17:09:07 +0300 Subject: [PATCH 4/4] Trying to make Travis build work. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8032f9988..49312cf3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,8 +35,8 @@ before_script: - "(cd build/platform-declarations && npm install)" - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi default/armeabi-v7a -c 12M - emulator -avd $AVD_NAME -no-audio -no-window & - - android-wait-for-emulator & - - adb shell input keyevent 82 + - android-wait-for-emulator + - adb shell input keyevent 82 & script: - jdk_switcher use oraclejdk8 - grunt default &&