mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 14:59:05 +00:00
refactor(adb): share parsed package fields (#17036)
This commit is contained in:
1 parent
cd166fa5d0
commit
ca665ed83f
1 file changed
+12
-17
+12
-17
@@ -320,15 +320,18 @@ export const parseWindowFocusOutput = (
|
||||
};
|
||||
};
|
||||
|
||||
export interface AdbPackageDetails {
|
||||
readonly versionName: string | null;
|
||||
interface ParsedPackageFields {
|
||||
versionName: string | null;
|
||||
/** Signed 64-bit long version code exactly as Package Manager prints it. */
|
||||
readonly versionCode: string | null;
|
||||
readonly firstInstallTime: string | null;
|
||||
readonly lastUpdateTime: string | null;
|
||||
readonly installerPackageName: string | null;
|
||||
readonly userId: number | null;
|
||||
readonly pkgFlags: string | null;
|
||||
versionCode: string | null;
|
||||
firstInstallTime: string | null;
|
||||
lastUpdateTime: string | null;
|
||||
installerPackageName: string | null;
|
||||
userId: number | null;
|
||||
pkgFlags: string | null;
|
||||
}
|
||||
|
||||
export interface AdbPackageDetails extends Readonly<ParsedPackageFields> {
|
||||
readonly requestedPermissions: number | null;
|
||||
readonly numericIssues: AdbPackageNumericIssues;
|
||||
}
|
||||
@@ -354,15 +357,7 @@ const absentInstallerOrName = (value: string): string | null =>
|
||||
export const parseDumpsysPackageOutput = (
|
||||
stdout: string,
|
||||
): AdbPackageDetails => {
|
||||
const details: {
|
||||
versionName: string | null;
|
||||
versionCode: string | null;
|
||||
firstInstallTime: string | null;
|
||||
lastUpdateTime: string | null;
|
||||
installerPackageName: string | null;
|
||||
userId: number | null;
|
||||
pkgFlags: string | null;
|
||||
} = {
|
||||
const details: ParsedPackageFields = {
|
||||
versionName: null,
|
||||
versionCode: null,
|
||||
firstInstallTime: null,
|
||||
|
||||
Reference in new issue
Block a user