Trying to fix the Travis build.

This commit is contained in:
Rossen Hristov
2016-06-02 15:18:23 +03:00
parent 8ba9ec3855
commit 17cc067e25

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;
} }