intent api: restore key
This commit is contained in:
parent
5d3b171e21
commit
bb7ffd9692
File diff suppressed because it is too large
Load Diff
|
@ -58,7 +58,7 @@ public class BackupUtils {
|
|||
|
||||
JSONObject config = new JSONObject();
|
||||
try {
|
||||
if (portData.getCount() != 1)
|
||||
if (portData == null || portData.getCount() != 1)
|
||||
return null;
|
||||
|
||||
portData.moveToNext();
|
||||
|
@ -184,7 +184,7 @@ public class BackupUtils {
|
|||
null
|
||||
);
|
||||
|
||||
if (service.getCount() == 0) {
|
||||
if (service == null || service.getCount() == 0) {
|
||||
mResolver.insert(HSContentProvider.CONTENT_URI, fields);
|
||||
} else {
|
||||
mResolver.update(
|
||||
|
@ -193,9 +193,9 @@ public class BackupUtils {
|
|||
HSContentProvider.HiddenService.PORT + "=" + port,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
service.close();
|
||||
service.close();
|
||||
}
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue