Use SoundManager in Pressability and Touchable

Summary:
This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()
Previously landed and unladed: D16543433

Changelog: This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()

Reviewed By: makovkastar

Differential Revision: D17926309

fbshipit-source-id: ff7e318a4d720e489cbfe60e8d72ebb749c11c18
This commit is contained in:
David Vacca 2019-10-15 20:01:41 -07:00 коммит произвёл Facebook Github Bot
Родитель 87b94e60a6
Коммит ff03698f20
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -19,6 +19,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
const TVEventHandler = require('../AppleTV/TVEventHandler');
const UIManager = require('../../ReactNative/UIManager');
const View = require('../View/View');
const SoundManager = require('../Sound/SoundManager');
const keyMirror = require('fbjs/lib/keyMirror');
const normalizeColor = require('../../Color/normalizeColor');
@ -866,7 +867,7 @@ const TouchableMixin = {
this._endHighlight(e);
}
if (Platform.OS === 'android' && !this.props.touchSoundDisabled) {
this._playTouchSound();
SoundManager.playTouchSound();
}
this.touchableHandlePress(e);
}
@ -876,10 +877,6 @@ const TouchableMixin = {
this.touchableDelayTimeout = null;
},
_playTouchSound: function() {
UIManager.playTouchSound();
},
_startHighlight: function(e: PressEvent) {
this._savePressInLocation(e);
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);