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();
|
JSONObject config = new JSONObject();
|
||||||
try {
|
try {
|
||||||
if (portData.getCount() != 1)
|
if (portData == null || portData.getCount() != 1)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
portData.moveToNext();
|
portData.moveToNext();
|
||||||
|
@ -184,7 +184,7 @@ public class BackupUtils {
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|
||||||
if (service.getCount() == 0) {
|
if (service == null || service.getCount() == 0) {
|
||||||
mResolver.insert(HSContentProvider.CONTENT_URI, fields);
|
mResolver.insert(HSContentProvider.CONTENT_URI, fields);
|
||||||
} else {
|
} else {
|
||||||
mResolver.update(
|
mResolver.update(
|
||||||
|
@ -193,9 +193,9 @@ public class BackupUtils {
|
||||||
HSContentProvider.HiddenService.PORT + "=" + port,
|
HSContentProvider.HiddenService.PORT + "=" + port,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
service.close();
|
service.close();
|
||||||
|
}
|
||||||
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
Loading…
Reference in New Issue