Merge pull request #2235 from NativeScript/travis

Trying to fix the Travis build.
This commit is contained in:
Rossen Hristov
2016-06-03 08:58:45 +03:00
2 changed files with 12 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ env:
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER - PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
- PACKAGE_NAME=tns-core-modules - PACKAGE_NAME=tns-core-modules
- NODE_VERSION=5.10.1 - NODE_VERSION=5.10.1
- EMULATOR_API_VER=22 - EMULATOR_API_VER=21
- RUNTIMEVERSION=next - RUNTIMEVERSION=next
- AVD_NAME=Arm$EMULATOR_API_VER - AVD_NAME=Arm$EMULATOR_API_VER
addons: addons:
@@ -33,10 +33,10 @@ before_script:
- npm install -g grunt-cli - npm install -g grunt-cli
- npm install - npm install
- "(cd build/platform-declarations && npm install)" - "(cd build/platform-declarations && npm install)"
- echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER -b - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi default/armeabi-v7a -c 12M
armeabi-v7a -c 12M - emulator -avd $AVD_NAME -no-audio -no-window &
- emulator -avd $AVD_NAME -skin WXGA720 -no-audio -no-window -memory 2048 &
- android-wait-for-emulator - android-wait-for-emulator
- adb shell input keyevent 82 &
script: script:
- jdk_switcher use oraclejdk8 - jdk_switcher use oraclejdk8
- grunt default && - grunt default &&

View File

@@ -376,6 +376,7 @@ export class Animation extends common.Animation implements definition.Animation
private _enableHardwareAcceleration() { private _enableHardwareAcceleration() {
for (let i = 0, length = this._propertyAnimations.length; i < length; i++) { for (let i = 0, length = this._propertyAnimations.length; i < length; i++) {
let cache = <CacheLayerType>this._propertyAnimations[i].target._nativeView; let cache = <CacheLayerType>this._propertyAnimations[i].target._nativeView;
if (cache){
let layerType = cache.getLayerType(); let layerType = cache.getLayerType();
if (layerType !== android.view.View.LAYER_TYPE_HARDWARE) { if (layerType !== android.view.View.LAYER_TYPE_HARDWARE) {
cache.layerType = layerType; cache.layerType = layerType;
@@ -383,11 +384,12 @@ export class Animation extends common.Animation implements definition.Animation
} }
} }
} }
}
private _disableHardwareAcceleration() { private _disableHardwareAcceleration() {
for (let i = 0, length = this._propertyAnimations.length; i < length; i++) { for (let i = 0, length = this._propertyAnimations.length; i < length; i++) {
let cache = <CacheLayerType>this._propertyAnimations[i].target._nativeView; let cache = <CacheLayerType>this._propertyAnimations[i].target._nativeView;
if (cache.layerType !== undefined) { if (cache && cache.layerType !== undefined) {
cache.setLayerType(cache.layerType, null); cache.setLayerType(cache.layerType, null);
cache.layerType = undefined; cache.layerType = undefined;
} }