From 3c202928b47f92dbc078e4796b69d9d57fe44a20 Mon Sep 17 00:00:00 2001 From: agnostic-apollo Date: Wed, 20 Oct 2021 17:32:28 +0500 Subject: [PATCH] Changed: Fix typos is PackageUtils --- .../termux/shared/packages/PackageUtils.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/termux-shared/src/main/java/com/termux/shared/packages/PackageUtils.java b/termux-shared/src/main/java/com/termux/shared/packages/PackageUtils.java index cdba0fd9..20c888aa 100644 --- a/termux-shared/src/main/java/com/termux/shared/packages/PackageUtils.java +++ b/termux-shared/src/main/java/com/termux/shared/packages/PackageUtils.java @@ -254,9 +254,9 @@ public class PackageUtils { * set. * * @param context The {@link Context} for the package. - * @return Returns the {@code versionName}. This will be {@code null} if an exception is raised. + * @return Returns {@code true} if app is debuggable, otherwise {@code false}. */ - public static Boolean isAppForPackageADebuggableBuild(@NonNull final Context context) { + public static boolean isAppForPackageADebuggableBuild(@NonNull final Context context) { return isAppForPackageADebuggableBuild(context.getApplicationInfo()); } @@ -265,9 +265,9 @@ public class PackageUtils { * set. * * @param applicationInfo The {@link ApplicationInfo} for the package. - * @return Returns the {@code versionName}. This will be {@code null} if an exception is raised. + * @return Returns {@code true} if app is debuggable, otherwise {@code false}. */ - public static Boolean isAppForPackageADebuggableBuild(@NonNull final ApplicationInfo applicationInfo) { + public static boolean isAppForPackageADebuggableBuild(@NonNull final ApplicationInfo applicationInfo) { return ( 0 != ( applicationInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE ) ); } @@ -278,9 +278,9 @@ public class PackageUtils { * set. * * @param context The {@link Context} for the package. - * @return Returns the {@code versionName}. This will be {@code null} if an exception is raised. + * @return Returns {@code true} if app is installed on external storage, otherwise {@code false}. */ - public static Boolean isAppInstalledOnExternalStorage(@NonNull final Context context) { + public static boolean isAppInstalledOnExternalStorage(@NonNull final Context context) { return isAppInstalledOnExternalStorage(context.getApplicationInfo()); } @@ -289,9 +289,9 @@ public class PackageUtils { * set. * * @param applicationInfo The {@link ApplicationInfo} for the package. - * @return Returns the {@code versionName}. This will be {@code null} if an exception is raised. + * @return Returns {@code true} if app is installed on external storage, otherwise {@code false}. */ - public static Boolean isAppInstalledOnExternalStorage(@NonNull final ApplicationInfo applicationInfo) { + public static boolean isAppInstalledOnExternalStorage(@NonNull final ApplicationInfo applicationInfo) { return ( 0 != ( applicationInfo.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE ) ); } @@ -328,7 +328,7 @@ public class PackageUtils { */ @Nullable public static Integer getVersionCodeForPackage(@Nullable final PackageInfo packageInfo) { - return packageInfo != null? packageInfo.versionCode : null; + return packageInfo != null ? packageInfo.versionCode : null; } @@ -365,7 +365,7 @@ public class PackageUtils { */ @Nullable public static String getVersionNameForPackage(@Nullable final PackageInfo packageInfo) { - return packageInfo != null? packageInfo.versionName : null; + return packageInfo != null ? packageInfo.versionName : null; }