Fix: Setting automationText to a number crashes the app on Android

Resolves #3064
This commit is contained in:
Rossen Hristov
2016-11-21 15:03:35 +02:00
parent 83dc32fc55
commit b42fc7fdae
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ var VIEW_GROUP = "_viewGroup";
function onAutomationTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
var view = <View>data.object;
view._nativeView.setContentDescription(data.newValue);
view._nativeView.setContentDescription(data.newValue + "");
}
(<proxy.PropertyMetadata>viewCommon.View.automationTextProperty.metadata).onSetNativeValue = onAutomationTextPropertyChanged;

View File

@ -13,8 +13,8 @@ global.moduleMerge(viewCommon, exports);
function onAutomationTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
var view = <View>data.object;
view._nativeView.accessibilityIdentifier = data.newValue;
view._nativeView.accessibilityLabel = data.newValue;
view._nativeView.accessibilityIdentifier = data.newValue + "";
view._nativeView.accessibilityLabel = data.newValue + "";
}
(<proxy.PropertyMetadata>viewCommon.View.automationTextProperty.metadata).onSetNativeValue = onAutomationTextPropertyChanged;