PackageManagerInterface API
ts
import { FileInputInterfaceStream } from "./FileInputInterfaceStream";
import { WXApplicationInfo } from "./WXApplicationInfo";
declare var $packageManager: PackageManagerInterface; // accesspoint for webui-x
interface PackageManagerInterface {
getPackageUid(packageName: string, flags: number, userId: number): number;
/**
* Method run heavy operations
*/
getApplicationIcon(packageName: string, flags: number, userId: number): FileInputInterfaceStream | null;
getInstalledPackages(flags: number, userId: number): string;
getApplicationInfo(packageName: string, flags: number, userId: number): WXApplicationInfo;
}
ts
export interface WXApplicationInfo {
getPackageName(): string;
getName(): string | null;
getLabel(): string | null;
getVersionName(): string | null;
getVersionCode(): number;
getNonLocalizedLabel(): string | null;
getAppComponentFactory(): string | null;
getBackupAgentName(): string | null;
getCategory(): number;
getClassName(): string | null;
getCompatibleWidthLimitDp(): number;
getCompileSdkVersion(): number;
getCompileSdkVersionCodename(): string | null;
getDataDir(): string | null;
getDescription(): string | null;
getDeviceProtectedDataDir(): string | null;
getEnabled(): Boolean;
getFlags(): number;
getLargestWidthLimitDp(): number;
getManageSpaceActivityName(): string | null;
getMinSdkVersion(): number;
getNativeLibraryDir(): string | null;
getPermission(): string | null;
getProcessName(): string | null;
getPublicSourceDir(): string | null;
getRequiresSmallestWidthDp(): number;
getSharedLibraryFiles(): string | null;
getSourceDir(): string | null;
getSplitNames(): string | null;
getSplitPublicSourceDirs(): string | null;
getSplitSourceDirs(): string | null;
getStorageUuid(): string | null;
getTargetSdkVersion(): number;
getTaskAffinity(): string | null;
getTheme(): number;
getUiOptions(): number;
getUid(): number;
}
ts
/**
* This is a private interface which is not accessible in the window object.
* It is used to define the structure of a file input stream.
*/
export interface FileInputInterfaceStream {
read(): number;
readChunk(chinkSize: number): number;
close(): void;
skip(n: number): number;
}