refactor: Move some logic to ManagerAPI and PatcherAPI

This commit is contained in:
Alberto Ponces
2022-09-23 15:31:24 +01:00
parent 4609ed9eba
commit 6abb761724
2 changed files with 17 additions and 12 deletions

View File

@ -319,4 +319,14 @@ class ManagerAPI {
}
return newCommits;
}
Future<bool> isSplitApk(PatchedApplication patchedApp) async {
Application? app;
if (patchedApp.isFromStorage) {
app = await DeviceApps.getAppFromStorage(patchedApp.apkFilePath);
} else {
app = await DeviceApps.getApp(patchedApp.packageName);
}
return app != null && app.isSplit;
}
}