Some style/format fixes suggested by AS
This commit is contained in:
parent
14ae58690c
commit
e367265396
@ -94,10 +94,10 @@ public class CompatibilityChecker extends Compatibility {
|
||||
|
||||
if (apk.features != null) {
|
||||
for (final String feat : apk.features) {
|
||||
if (ignoreTouchscreen
|
||||
&& feat.equals("android.hardware.touchscreen")) {
|
||||
// Don't check it!
|
||||
} else if (!features.contains(feat)) {
|
||||
if (ignoreTouchscreen && feat.equals("android.hardware.touchscreen")) {
|
||||
continue;
|
||||
}
|
||||
if (!features.contains(feat)) {
|
||||
Collections.addAll(incompatibleReasons, feat.split(","));
|
||||
if (BuildConfig.DEBUG) {
|
||||
Log.d(TAG, apk.id + " vercode " + apk.vercode
|
||||
|
@ -64,7 +64,7 @@ public class Hasher {
|
||||
return hashCache;
|
||||
else if (file != null) {
|
||||
byte[] buffer = new byte[1024];
|
||||
int read = 0;
|
||||
int read;
|
||||
InputStream input = null;
|
||||
try {
|
||||
input = new BufferedInputStream(new FileInputStream(file));
|
||||
|
@ -564,8 +564,9 @@ public class UpdateService extends IntentService implements ProgressListener {
|
||||
private List<String> getKnownAppIds(List<App> apps) {
|
||||
List<String> knownAppIds = new ArrayList<>();
|
||||
if (apps.size() == 0) {
|
||||
// Do nothing
|
||||
} else if (apps.size() > AppProvider.MAX_APPS_TO_QUERY) {
|
||||
return knownAppIds;
|
||||
}
|
||||
if (apps.size() > AppProvider.MAX_APPS_TO_QUERY) {
|
||||
int middle = apps.size() / 2;
|
||||
List<App> apps1 = apps.subList(0, middle);
|
||||
List<App> apps2 = apps.subList(middle, apps.size());
|
||||
|
@ -97,9 +97,7 @@ public class InstalledAppCacheUpdater {
|
||||
try {
|
||||
context.getContentResolver().applyBatch(InstalledAppProvider.getAuthority(), ops);
|
||||
Log.d(TAG, "Finished executing " + ops.size() + " CRUD operations on installed app cache.");
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error updating installed app cache: " + e);
|
||||
} catch (OperationApplicationException e) {
|
||||
} catch (RemoteException | OperationApplicationException e) {
|
||||
Log.e(TAG, "Error updating installed app cache: " + e);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user