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