improved Apk.toString() for easier debugging
This commit is contained in:
parent
470145e611
commit
65c4087b05
@ -270,7 +270,7 @@ public class Apk extends ValueObject implements Comparable<Apk>, Parcelable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return packageName + " (version " + versionCode + ")";
|
return toContentValues().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContentValues toContentValues() {
|
public ContentValues toContentValues() {
|
||||||
|
@ -41,12 +41,12 @@ public class InstallerFactory {
|
|||||||
*/
|
*/
|
||||||
public static Installer create(Context context, Apk apk) {
|
public static Installer create(Context context, Apk apk) {
|
||||||
if (apk == null || TextUtils.isEmpty(apk.packageName)) {
|
if (apk == null || TextUtils.isEmpty(apk.packageName)) {
|
||||||
throw new IllegalArgumentException("packageName must not be empty!");
|
throw new IllegalArgumentException("Apk.packageName must not be empty: " + apk);
|
||||||
}
|
}
|
||||||
|
|
||||||
Installer installer;
|
Installer installer;
|
||||||
if (apk.packageName.equals(PrivilegedInstaller.PRIVILEGED_EXTENSION_PACKAGE_NAME)) {
|
if (apk.packageName.equals(PrivilegedInstaller.PRIVILEGED_EXTENSION_PACKAGE_NAME)) {
|
||||||
// special case for "F-Droid Privileged Extension"
|
// special case for installing "Privileged Extension" with root
|
||||||
installer = new ExtensionInstaller(context, apk);
|
installer = new ExtensionInstaller(context, apk);
|
||||||
} else if (PrivilegedInstaller.isDefault(context)) {
|
} else if (PrivilegedInstaller.isDefault(context)) {
|
||||||
Utils.debugLog(TAG, "privileged extension correctly installed -> PrivilegedInstaller");
|
Utils.debugLog(TAG, "privileged extension correctly installed -> PrivilegedInstaller");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user