From 441c00abc99d75fd23cff9637cf3ec4f20290eb6 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 14 Aug 2019 13:28:48 -0700 Subject: [PATCH] Revert D16543433: [Fabric][JS] Use SoundManager in Pressability and Touchable Differential Revision: D16543433 Original commit changeset: a2ba060bc480 fbshipit-source-id: 0ba31019fb7a9e77577e495782a3b10029575d22 --- Libraries/Components/Touchable/Touchable.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/Touchable/Touchable.js b/Libraries/Components/Touchable/Touchable.js index 4b33c328925..a37a4fa24d4 100644 --- a/Libraries/Components/Touchable/Touchable.js +++ b/Libraries/Components/Touchable/Touchable.js @@ -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);