Revert D16543433: [Fabric][JS] Use SoundManager in Pressability and Touchable

Differential Revision:
D16543433

Original commit changeset: a2ba060bc480

fbshipit-source-id: 0ba31019fb7a9e77577e495782a3b10029575d22
This commit is contained in:
David Vacca
2019-08-14 13:32:56 -07:00
committed by Facebook Github Bot
parent 9dbe5e241e
commit 441c00abc9
+5 -2
View File
@@ -19,7 +19,6 @@ 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');
@@ -876,7 +875,7 @@ const TouchableMixin = {
this._endHighlight(e);
}
if (Platform.OS === 'android' && !this.props.touchSoundDisabled) {
SoundManager.playTouchSound();
this._playTouchSound();
}
this.touchableHandlePress(e);
}
@@ -886,6 +885,10 @@ const TouchableMixin = {
this.touchableDelayTimeout = null;
},
_playTouchSound: function() {
UIManager.playTouchSound();
},
_startHighlight: function(e: PressEvent) {
this._savePressInLocation(e);
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);