Skip to content

Commit a793d21

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Remove NativeDialogManagerAndroid API (#57047)
Summary: Pull Request resolved: #57047 **Motivation** `NativeDialogManagerAndroid` is an internal native module used by `Alert` and `PermissionsAndroid` on Android, not an intended root React Native public API. **Notes** - `NativeDialogManagerAndroid` wasn't defined on our manual public TypeScript types — so was never discoverable via TypeScript auto-import. - Appears unused by open source consumers with public code on GitHub ([search](https://github.com/search?type=code&q=NativeDialogManagerAndroid++NOT+is%3Aarchived+NOT+is%3Afork+language%3ATypeScript&l=TypeScript⁄)). Changelog: [General][Breaking] - The `NativeDialogManagerAndroid` export is removed. Reviewed By: cortinico Differential Revision: D107250968 fbshipit-source-id: 6d44fe7a08e14f07ee6eb9274d2620760961b598
1 parent a2e042f commit a793d21

4 files changed

Lines changed: 2 additions & 42 deletions

File tree

packages/eslint-plugin-react-native/utils.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,6 @@ const publicAPIMapping = {
327327
default: 'LogBox',
328328
types: ['ExtendedExceptionData', 'IgnorePattern', 'LogData'],
329329
},
330-
'Libraries/NativeModules/specs/NativeDialogManagerAndroid': {
331-
default: 'NativeDialogManagerAndroid',
332-
types: null,
333-
},
334330
'Libraries/EventEmitter/NativeEventEmitter': {
335331
default: 'NativeEventEmitter',
336332
types: [

packages/react-native/ReactNativeApi.d.ts

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<32a24e0b95fe31cb0fd9f022f6e6d3fb>>
7+
* @generated SignedSource<<bc37189419aeaea2bfd173ec0a03df96>>
88
*
99
* This file was generated by scripts/js-api/build-types/index.js.
1010
*/
@@ -86,7 +86,6 @@ declare const $$index: {
8686
get VirtualizedSectionList(): AnyVirtualizedSectionList
8787
}
8888
declare const $$NativeDeviceInfo: typeof NativeDeviceInfo_default
89-
declare const $$NativeDialogManagerAndroid: null | Spec | undefined
9089
declare const $$ProgressBarAndroidNativeComponent: HostComponent<AndroidProgressBarNativeProps>
9190
declare const $$ReactFabric: typeof ReactFabric_default
9291
declare const $$ScrollViewContext: typeof ScrollViewContext_default
@@ -287,7 +286,6 @@ declare const NativeAppEventEmitter: typeof RCTNativeAppEventEmitter_default
287286
declare const NativeDeviceInfo_default: {
288287
getConstants(): DeviceInfoConstants
289288
}
290-
declare const NativeDialogManagerAndroid: typeof $$NativeDialogManagerAndroid
291289
declare const NativeModules: typeof NativeModules_default
292290
declare let NativeModules_default: {
293291
[moduleName: string]: any
@@ -985,7 +983,6 @@ declare type $$AnimatedView = typeof $$AnimatedView
985983
declare type $$flattenStyle = typeof $$flattenStyle
986984
declare type $$index = typeof $$index
987985
declare type $$NativeDeviceInfo = typeof $$NativeDeviceInfo
988-
declare type $$NativeDialogManagerAndroid = typeof $$NativeDialogManagerAndroid
989986
declare type $$ProgressBarAndroidNativeComponent =
990987
typeof $$ProgressBarAndroidNativeComponent
991988
declare type $$ReactFabric = typeof $$ReactFabric
@@ -1956,17 +1953,6 @@ declare type DevMenuStatic = {
19561953
show(): void
19571954
}
19581955
declare type DevSettings = typeof DevSettings
1959-
declare type DialogAction = string
1960-
declare type DialogButtonKey = number
1961-
declare type DialogOptions = {
1962-
buttonNegative?: string
1963-
buttonNeutral?: string
1964-
buttonPositive?: string
1965-
cancelable?: boolean
1966-
items?: Array<string>
1967-
message?: string
1968-
title?: string
1969-
}
19701956
declare type diffClamp = typeof diffClamp
19711957
declare class Dimensions {
19721958
static addEventListener(type: "change", handler: Function): EventSubscription
@@ -3213,7 +3199,6 @@ declare namespace NativeComponentRegistry {
32133199
export { setRuntimeConfigProvider, get, getWithFallback_DEPRECATED }
32143200
}
32153201
declare type NativeComponentType<T extends {}> = HostComponent<T>
3216-
declare type NativeDialogManagerAndroid = typeof NativeDialogManagerAndroid
32173202
declare class NativeEventEmitter<
32183203
TEventToArgsMap extends Readonly<
32193204
Record<string, ReadonlyArray<UnsafeNativeEventObject>>
@@ -4671,20 +4656,6 @@ declare type ShareOptions = {
46714656
tintColor?: ColorValue
46724657
}
46734658
declare interface Spec extends TurboModule {
4674-
readonly getConstants: () => {
4675-
readonly buttonClicked: DialogAction
4676-
readonly buttonNegative: DialogButtonKey
4677-
readonly buttonNeutral: DialogButtonKey
4678-
readonly buttonPositive: DialogButtonKey
4679-
readonly dismissed: DialogAction
4680-
}
4681-
readonly showAlert: (
4682-
config: DialogOptions,
4683-
onError: (error: string) => void,
4684-
onAction: (action: DialogAction, buttonKey?: DialogButtonKey) => void,
4685-
) => void
4686-
}
4687-
declare interface Spec_2 extends TurboModule {
46884659
readonly blur?: (reactTag: number) => void
46894660
readonly clearJSResponder: () => void
46904661
readonly configureNextLayoutAnimation: (
@@ -5600,7 +5571,7 @@ declare type TVViewPropsIOS = {
56005571
readonly tvParallaxTiltAngle?: number
56015572
}
56025573
declare type UIManager = typeof UIManager
5603-
declare interface UIManagerJSInterface extends Spec_2 {
5574+
declare interface UIManagerJSInterface extends Spec {
56045575
readonly getViewManagerConfig: (viewManagerName: string) => Object
56055576
readonly hasViewManagerConfig: (viewManagerName: string) => boolean
56065577
}
@@ -6079,7 +6050,6 @@ export {
60796050
NativeAppEventEmitter, // 08d4c47d
60806051
NativeColorValue, // d2094c29
60816052
NativeComponentRegistry, // 6497d2b6
6082-
NativeDialogManagerAndroid, // 5be8497e
60836053
NativeEventEmitter, // 27f97c1a
60846054
NativeEventSubscription, // de3942e7
60856055
NativeMethods, // ce1a8622

packages/react-native/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,6 @@ module.exports = {
275275
get NativeComponentRegistry() {
276276
return require('./Libraries/NativeComponent/NativeComponentRegistry');
277277
},
278-
get NativeDialogManagerAndroid() {
279-
return require('./Libraries/NativeModules/specs/NativeDialogManagerAndroid')
280-
.default;
281-
},
282278
get NativeEventEmitter() {
283279
return require('./Libraries/EventEmitter/NativeEventEmitter').default;
284280
},

packages/react-native/index.js.flow

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,6 @@ export {default as NativeAppEventEmitter} from './Libraries/EventEmitter/RCTNati
310310

311311
export * as NativeComponentRegistry from './Libraries/NativeComponent/NativeComponentRegistry';
312312

313-
export {default as NativeDialogManagerAndroid} from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
314-
315313
export type {
316314
EmitterSubscription,
317315
NativeEventSubscription,

0 commit comments

Comments
 (0)