Merge branch 'master' into 'master'
a couple of fixes, including enabling lint errors to fail the CI build! Three fixes, including enabling lint errors to fail the CI build! Comments in the commit message. 09eea0d40bcf6b7a5612ef719177fd4ab2d2193b should be cherry-picked into stable-v0.100 for 0.100.1. Its already in my repo as fb70aada63029e430f2b4f2fb68427e719b63753. See merge request !341
This commit is contained in:
commit
ae2def3e0d
@ -185,7 +185,7 @@ android {
|
|||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
abortOnError false
|
abortOnError true
|
||||||
|
|
||||||
htmlReport true
|
htmlReport true
|
||||||
xmlReport false
|
xmlReport false
|
||||||
@ -200,6 +200,9 @@ android {
|
|||||||
|
|
||||||
// Like supportsRtl or parentActivityName. They are on purpose.
|
// Like supportsRtl or parentActivityName. They are on purpose.
|
||||||
disable 'UnusedAttribute'
|
disable 'UnusedAttribute'
|
||||||
|
|
||||||
|
// to make CI fail on errors until this is fixed https://github.com/rtyley/spongycastle/issues/7
|
||||||
|
disable 'InvalidPackage'
|
||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
|
@ -75,8 +75,6 @@ public class UpdateService extends IntentService {
|
|||||||
|
|
||||||
private static final String STATE_LAST_UPDATED = "lastUpdateCheck";
|
private static final String STATE_LAST_UPDATED = "lastUpdateCheck";
|
||||||
|
|
||||||
private LocalBroadcastManager localBroadcastManager;
|
|
||||||
|
|
||||||
private static final int NOTIFY_ID_UPDATING = 0;
|
private static final int NOTIFY_ID_UPDATING = 0;
|
||||||
private static final int NOTIFY_ID_UPDATES_AVAILABLE = 1;
|
private static final int NOTIFY_ID_UPDATES_AVAILABLE = 1;
|
||||||
|
|
||||||
@ -133,10 +131,6 @@ public class UpdateService extends IntentService {
|
|||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
localBroadcastManager = LocalBroadcastManager.getInstance(this);
|
|
||||||
localBroadcastManager.registerReceiver(updateStatusReceiver,
|
|
||||||
new IntentFilter(LOCAL_ACTION_STATUS));
|
|
||||||
|
|
||||||
notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
|
||||||
notificationBuilder = new NotificationCompat.Builder(this)
|
notificationBuilder = new NotificationCompat.Builder(this)
|
||||||
@ -155,15 +149,13 @@ public class UpdateService extends IntentService {
|
|||||||
pendingIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
pendingIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
notificationBuilder.setContentIntent(PendingIntent.getActivity(this, 0, pendingIntent, PendingIntent.FLAG_UPDATE_CURRENT));
|
notificationBuilder.setContentIntent(PendingIntent.getActivity(this, 0, pendingIntent, PendingIntent.FLAG_UPDATE_CURRENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
notificationManager.notify(NOTIFY_ID_UPDATING, notificationBuilder.build());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
notificationManager.cancel(NOTIFY_ID_UPDATING);
|
notificationManager.cancel(NOTIFY_ID_UPDATING);
|
||||||
localBroadcastManager.unregisterReceiver(updateStatusReceiver);
|
LocalBroadcastManager.getInstance(this).unregisterReceiver(updateStatusReceiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void sendStatus(Context context, int statusCode) {
|
protected static void sendStatus(Context context, int statusCode) {
|
||||||
@ -328,11 +320,14 @@ public class UpdateService extends IntentService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notificationManager.notify(NOTIFY_ID_UPDATING, notificationBuilder.build());
|
||||||
|
LocalBroadcastManager.getInstance(this).registerReceiver(updateStatusReceiver,
|
||||||
|
new IntentFilter(LOCAL_ACTION_STATUS));
|
||||||
|
|
||||||
// Grab some preliminary information, then we can release the
|
// Grab some preliminary information, then we can release the
|
||||||
// database while we do all the downloading, etc...
|
// database while we do all the downloading, etc...
|
||||||
List<Repo> repos = RepoProvider.Helper.all(this);
|
List<Repo> repos = RepoProvider.Helper.all(this);
|
||||||
|
|
||||||
//List<Repo> swapRepos = new ArrayList<>();
|
|
||||||
int unchangedRepos = 0;
|
int unchangedRepos = 0;
|
||||||
int updatedRepos = 0;
|
int updatedRepos = 0;
|
||||||
int errorRepos = 0;
|
int errorRepos = 0;
|
||||||
@ -349,7 +344,6 @@ public class UpdateService extends IntentService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!singleRepoUpdate && repo.isSwap) {
|
if (!singleRepoUpdate && repo.isSwap) {
|
||||||
//swapRepos.add(repo);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,12 @@ public class WifiStateChangeService extends IntentService {
|
|||||||
if (dhcpInfo != null) {
|
if (dhcpInfo != null) {
|
||||||
String netmask = formatIpAddress(dhcpInfo.netmask);
|
String netmask = formatIpAddress(dhcpInfo.netmask);
|
||||||
if (!TextUtils.isEmpty(FDroidApp.ipAddressString) && netmask != null) {
|
if (!TextUtils.isEmpty(FDroidApp.ipAddressString) && netmask != null) {
|
||||||
FDroidApp.subnetInfo = new SubnetUtils(FDroidApp.ipAddressString, netmask).getInfo();
|
try {
|
||||||
|
FDroidApp.subnetInfo = new SubnetUtils(FDroidApp.ipAddressString, netmask).getInfo();
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
// catch this mystery error: "java.lang.IllegalArgumentException: Could not parse [null/24]"
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (wifiState == WifiManager.WIFI_STATE_DISABLED
|
} else if (wifiState == WifiManager.WIFI_STATE_DISABLED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user