From 6779cdcb554f4374536a930563a7242d3364726a Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Tue, 7 Mar 2023 19:22:37 -0800 Subject: [PATCH] fix(android): native-helper utils types are now correct (#10231) --- apps/toolbox/src/main.ts | 2 +- packages/core/utils/index.d.ts | 82 ---------------------------------- 2 files changed, 1 insertion(+), 83 deletions(-) diff --git a/apps/toolbox/src/main.ts b/apps/toolbox/src/main.ts index fba0a27ac..a4c5c529a 100644 --- a/apps/toolbox/src/main.ts +++ b/apps/toolbox/src/main.ts @@ -1,3 +1,3 @@ -import { Application, Utils } from '@nativescript/core'; +import { Application } from '@nativescript/core'; Application.run({ moduleName: 'app-root' }); diff --git a/packages/core/utils/index.d.ts b/packages/core/utils/index.d.ts index 66611894c..63c785c71 100644 --- a/packages/core/utils/index.d.ts +++ b/packages/core/utils/index.d.ts @@ -21,88 +21,6 @@ interface Owned { } //@endprivate -/** - * Module with android specific utilities. - */ -export namespace ad { - /** - * Gets the native Android application instance. - */ - export function getApplication(): any; /* android.app.Application */ - - /** - * Gets the Android application context. - */ - export function getApplicationContext(): any; /* android.content.Context */ - - /** - * Gets the native Android input method manager. - */ - export function getInputMethodManager(): any; /* android.view.inputmethod.InputMethodManager */ - - /** - * Hides the soft input method, usually a soft keyboard. - */ - export function dismissSoftInput(nativeView?: any /* android.view.View */): void; - - /** - * Shows the soft input method, usually a soft keyboard. - */ - export function showSoftInput(nativeView: any /* android.view.View */): void; - - /** - * Utility module dealing with some android collections. - */ - namespace collections { - /** - * Converts string array into a String [hash set](http://developer.android.com/reference/java/util/HashSet.html). - * @param str - An array of strings to convert. - */ - export function stringArrayToStringSet(str: string[]): any; - - /** - * Converts string hash set into array of strings. - * @param stringSet - A string hash set to convert. - */ - export function stringSetToStringArray(stringSet: any): string[]; - } - - /** - * Utility module related to android resources. - */ - export namespace resources { - /** - * Gets the drawable id from a given name. - * @param name - Name of the resource. - */ - export function getDrawableId(name); - - /** - * Gets the string id from a given name. - * @param name - Name of the resource. - */ - export function getStringId(name); - - /** - * Gets the id from a given name. - * @param name - Name of the resource. - */ - export function getId(name: string): number; - - /** - * [Obsolete - please use getPaletteColor] Gets a color from current theme. - * @param name - Name of the color - */ - export function getPalleteColor(); - - /** - * Gets a color from the current theme. - * @param name - Name of the color resource. - */ - export function getPaletteColor(name: string, context: any /* android.content.Context */): number; - } -} - /** * An utility function that invokes garbage collection on the JavaScript side. */