Skip to content

Commit d0c4c5e

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Delete playTouchSound from UIManagerModule
Summary: This diff deletes the deprecated PlayTouchSound method from UIManagerModules. I verified there are no callsites of this method in Facebook sourcecode changelog: [BREAKING][Android] Deletes the method PlayTouchSound method from UIManagerModule, this method was moved to the SoundManagerModule class. Motivation: I'm cleaning up my fabric backlog before lockdown Reviewed By: JoshuaGross, TheSavior Differential Revision: D21487612 fbshipit-source-id: f630e2b7f927e0b607a30b9f4904feb63a561ab9
1 parent 0aac4c3 commit d0c4c5e

File tree

8 files changed

+0
-34
lines changed

8 files changed

+0
-34
lines changed

Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm

-7
Original file line numberDiff line numberDiff line change
@@ -2498,10 +2498,6 @@ + (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerResult:(id)json
24982498
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ArrayKind, "getDefaultEventTypes", @selector(getDefaultEventTypes), args, count);
24992499
}
25002500

2501-
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_playTouchSound(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
2502-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "playTouchSound", @selector(playTouchSound), args, count);
2503-
}
2504-
25052501
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_lazilyLoadView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
25062502
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ObjectKind, "lazilyLoadView", @selector(lazilyLoadView:), args, count);
25072503
}
@@ -2608,9 +2604,6 @@ + (RCTManagedPointer *)JS_NativeTimePickerAndroid_TimePickerResult:(id)json
26082604
methodMap_["getDefaultEventTypes"] = MethodMetadata {0, __hostFunction_NativeUIManagerSpecJSI_getDefaultEventTypes};
26092605

26102606

2611-
methodMap_["playTouchSound"] = MethodMetadata {0, __hostFunction_NativeUIManagerSpecJSI_playTouchSound};
2612-
2613-
26142607
methodMap_["lazilyLoadView"] = MethodMetadata {1, __hostFunction_NativeUIManagerSpecJSI_lazilyLoadView};
26152608

26162609

Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h

-1
Original file line numberDiff line numberDiff line change
@@ -2697,7 +2697,6 @@ namespace JS {
26972697

26982698
- (NSDictionary *)getConstantsForViewManager:(NSString *)viewManagerName;
26992699
- (NSArray<NSString *> *)getDefaultEventTypes;
2700-
- (void)playTouchSound;
27012700
- (NSDictionary *)lazilyLoadView:(NSString *)name;
27022701
- (void)createView:(NSNumber *)reactTag
27032702
viewName:(NSString *)viewName

Libraries/ReactNative/DummyUIManager.js

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = {
2323
getConstants: (): {...} => ({}),
2424
getConstantsForViewManager: (viewManagerName: string) => {},
2525
getDefaultEventTypes: (): Array<$FlowFixMe> => [],
26-
playTouchSound: () => {},
2726
lazilyLoadView: (name: string) => {},
2827
createView: (
2928
reactTag: ?number,

Libraries/ReactNative/NativeUIManager.js

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export interface Spec extends TurboModule {
1717
+getConstants: () => Object;
1818
+getConstantsForViewManager: (viewManagerName: string) => Object;
1919
+getDefaultEventTypes: () => Array<string>;
20-
+playTouchSound: () => void;
2120
+lazilyLoadView: (name: string) => Object; // revisit return
2221
+createView: (
2322
reactTag: ?number,

Libraries/ReactNative/UIManagerProperties.js

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ module.exports = [
4040
'measureInWindow',
4141
'measureLayout',
4242
'measureLayoutRelativeToParent',
43-
'playTouchSound',
4443
'removeRootView',
4544
'removeSubviewsFromContainerWithID',
4645
'replaceExistingNonRootView',

ReactAndroid/src/main/java/com/facebook/fbreact/specs/NativeUIManagerSpec.java

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ public NativeUIManagerSpec(ReactApplicationContext reactContext) {
4242
public abstract void configureNextLayoutAnimation(ReadableMap config, Callback callback,
4343
Callback errorCallback);
4444

45-
@ReactMethod
46-
public abstract void playTouchSound();
47-
4845
@ReactMethod
4946
public abstract void blur(Double reactTag);
5047

ReactAndroid/src/main/java/com/facebook/fbreact/specs/jni/FBReactNativeSpec-generated.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -2204,10 +2204,6 @@ namespace facebook {
22042204
return static_cast<JavaTurboModule&>(turboModule).invokeJavaMethod(rt, ArrayKind, "getDefaultEventTypes", "()Lcom/facebook/react/bridge/WritableArray;", args, count);
22052205
}
22062206

2207-
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_playTouchSound(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
2208-
return static_cast<JavaTurboModule&>(turboModule).invokeJavaMethod(rt, VoidKind, "playTouchSound", "()V", args, count);
2209-
}
2210-
22112207
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_lazilyLoadView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
22122208
return static_cast<JavaTurboModule&>(turboModule).invokeJavaMethod(rt, ObjectKind, "lazilyLoadView", "(Ljava/lang/String;)Lcom/facebook/react/bridge/WritableMap;", args, count);
22132209
}
@@ -2314,9 +2310,6 @@ namespace facebook {
23142310
methodMap_["getDefaultEventTypes"] = MethodMetadata {0, __hostFunction_NativeUIManagerSpecJSI_getDefaultEventTypes};
23152311

23162312

2317-
methodMap_["playTouchSound"] = MethodMetadata {0, __hostFunction_NativeUIManagerSpecJSI_playTouchSound};
2318-
2319-
23202313
methodMap_["lazilyLoadView"] = MethodMetadata {1, __hostFunction_NativeUIManagerSpecJSI_lazilyLoadView};
23212314

23222315

ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java

-13
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
1414

1515
import android.content.ComponentCallbacks2;
16-
import android.content.Context;
1716
import android.content.res.Configuration;
18-
import android.media.AudioManager;
1917
import android.view.View;
2018
import androidx.annotation.Nullable;
2119
import androidx.collection.ArrayMap;
@@ -717,17 +715,6 @@ public void dispatchCommand(int reactTag, String commandId, @Nullable ReadableAr
717715
mUIImplementation.dispatchViewManagerCommand(reactTag, commandId, commandArgs);
718716
}
719717

720-
/** @deprecated use {@link SoundManager#playTouchSound()} instead. */
721-
@ReactMethod
722-
@Deprecated
723-
public void playTouchSound() {
724-
AudioManager audioManager =
725-
(AudioManager) getReactApplicationContext().getSystemService(Context.AUDIO_SERVICE);
726-
if (audioManager != null) {
727-
audioManager.playSoundEffect(AudioManager.FX_KEY_CLICK);
728-
}
729-
}
730-
731718
/**
732719
* Show a PopupMenu.
733720
*

0 commit comments

Comments
 (0)