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
This commit is contained in:
Родитель
0aac4c39d9
Коммит
d0c4c5eaf9
|
@ -2498,10 +2498,6 @@ namespace facebook {
|
|||
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ArrayKind, "getDefaultEventTypes", @selector(getDefaultEventTypes), args, count);
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_playTouchSound(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "playTouchSound", @selector(playTouchSound), args, count);
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_lazilyLoadView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ObjectKind, "lazilyLoadView", @selector(lazilyLoadView:), args, count);
|
||||
}
|
||||
|
@ -2608,9 +2604,6 @@ namespace facebook {
|
|||
methodMap_["getDefaultEventTypes"] = MethodMetadata {0, __hostFunction_NativeUIManagerSpecJSI_getDefaultEventTypes};
|
||||
|
||||
|
||||
methodMap_["playTouchSound"] = MethodMetadata {0, __hostFunction_NativeUIManagerSpecJSI_playTouchSound};
|
||||
|
||||
|
||||
methodMap_["lazilyLoadView"] = MethodMetadata {1, __hostFunction_NativeUIManagerSpecJSI_lazilyLoadView};
|
||||
|
||||
|
||||
|
|
|
@ -2697,7 +2697,6 @@ namespace JS {
|
|||
|
||||
- (NSDictionary *)getConstantsForViewManager:(NSString *)viewManagerName;
|
||||
- (NSArray<NSString *> *)getDefaultEventTypes;
|
||||
- (void)playTouchSound;
|
||||
- (NSDictionary *)lazilyLoadView:(NSString *)name;
|
||||
- (void)createView:(NSNumber *)reactTag
|
||||
viewName:(NSString *)viewName
|
||||
|
|
|
@ -23,7 +23,6 @@ module.exports = {
|
|||
getConstants: (): {...} => ({}),
|
||||
getConstantsForViewManager: (viewManagerName: string) => {},
|
||||
getDefaultEventTypes: (): Array<$FlowFixMe> => [],
|
||||
playTouchSound: () => {},
|
||||
lazilyLoadView: (name: string) => {},
|
||||
createView: (
|
||||
reactTag: ?number,
|
||||
|
|
|
@ -17,7 +17,6 @@ export interface Spec extends TurboModule {
|
|||
+getConstants: () => Object;
|
||||
+getConstantsForViewManager: (viewManagerName: string) => Object;
|
||||
+getDefaultEventTypes: () => Array<string>;
|
||||
+playTouchSound: () => void;
|
||||
+lazilyLoadView: (name: string) => Object; // revisit return
|
||||
+createView: (
|
||||
reactTag: ?number,
|
||||
|
|
|
@ -40,7 +40,6 @@ module.exports = [
|
|||
'measureInWindow',
|
||||
'measureLayout',
|
||||
'measureLayoutRelativeToParent',
|
||||
'playTouchSound',
|
||||
'removeRootView',
|
||||
'removeSubviewsFromContainerWithID',
|
||||
'replaceExistingNonRootView',
|
||||
|
|
|
@ -42,9 +42,6 @@ public abstract class NativeUIManagerSpec extends ReactContextBaseJavaModule imp
|
|||
public abstract void configureNextLayoutAnimation(ReadableMap config, Callback callback,
|
||||
Callback errorCallback);
|
||||
|
||||
@ReactMethod
|
||||
public abstract void playTouchSound();
|
||||
|
||||
@ReactMethod
|
||||
public abstract void blur(Double reactTag);
|
||||
|
||||
|
|
|
@ -2204,10 +2204,6 @@ namespace facebook {
|
|||
return static_cast<JavaTurboModule&>(turboModule).invokeJavaMethod(rt, ArrayKind, "getDefaultEventTypes", "()Lcom/facebook/react/bridge/WritableArray;", args, count);
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_playTouchSound(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<JavaTurboModule&>(turboModule).invokeJavaMethod(rt, VoidKind, "playTouchSound", "()V", args, count);
|
||||
}
|
||||
|
||||
static facebook::jsi::Value __hostFunction_NativeUIManagerSpecJSI_lazilyLoadView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
||||
return static_cast<JavaTurboModule&>(turboModule).invokeJavaMethod(rt, ObjectKind, "lazilyLoadView", "(Ljava/lang/String;)Lcom/facebook/react/bridge/WritableMap;", args, count);
|
||||
}
|
||||
|
@ -2314,9 +2310,6 @@ namespace facebook {
|
|||
methodMap_["getDefaultEventTypes"] = MethodMetadata {0, __hostFunction_NativeUIManagerSpecJSI_getDefaultEventTypes};
|
||||
|
||||
|
||||
methodMap_["playTouchSound"] = MethodMetadata {0, __hostFunction_NativeUIManagerSpecJSI_playTouchSound};
|
||||
|
||||
|
||||
methodMap_["lazilyLoadView"] = MethodMetadata {1, __hostFunction_NativeUIManagerSpecJSI_lazilyLoadView};
|
||||
|
||||
|
||||
|
|
|
@ -13,9 +13,7 @@ import static com.facebook.react.uimanager.common.UIManagerType.DEFAULT;
|
|||
import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
|
||||
|
||||
import android.content.ComponentCallbacks2;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.media.AudioManager;
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.collection.ArrayMap;
|
||||
|
@ -717,17 +715,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
|||
mUIImplementation.dispatchViewManagerCommand(reactTag, commandId, commandArgs);
|
||||
}
|
||||
|
||||
/** @deprecated use {@link SoundManager#playTouchSound()} instead. */
|
||||
@ReactMethod
|
||||
@Deprecated
|
||||
public void playTouchSound() {
|
||||
AudioManager audioManager =
|
||||
(AudioManager) getReactApplicationContext().getSystemService(Context.AUDIO_SERVICE);
|
||||
if (audioManager != null) {
|
||||
audioManager.playSoundEffect(AudioManager.FX_KEY_CLICK);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a PopupMenu.
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче