This commit is contained in:
arrase 2016-11-21 00:00:58 +01:00
parent 0fd59bc78d
commit e8a5099518
2 changed files with 16 additions and 16 deletions

View File

@ -32,19 +32,6 @@ public class HiddenServicesActivity extends AppCompatActivity {
HSContentProvider.HiddenService.PORT,
HSContentProvider.HiddenService.DOMAIN};
class HSObserver extends ContentObserver {
HSObserver(Handler handler) {
super(handler);
}
@Override
public void onChange(boolean selfChange) {
mAdapter.changeCursor(mCR.query(
HSContentProvider.CONTENT_URI, mProjection, null, null, null
));
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -106,4 +93,17 @@ public class HiddenServicesActivity extends AppCompatActivity {
private boolean hasPermission() {
return (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED);
}
class HSObserver extends ContentObserver {
HSObserver(Handler handler) {
super(handler);
}
@Override
public void onChange(boolean selfChange) {
mAdapter.changeCursor(mCR.query(
HSContentProvider.CONTENT_URI, mProjection, null, null, null
));
}
}
}

View File

@ -42,8 +42,8 @@ public class HSDataDialog extends DialogFragment {
((EditText) dialog_view.findViewById(R.id.hsOnionPort)).getText().toString()
);
if (checkInput(localPort,onionPort)) {
saveData(serverName, localPort,onionPort);
if (checkInput(localPort, onionPort)) {
saveData(serverName, localPort, onionPort);
serviceDataDialog.dismiss();
}
}
@ -59,7 +59,7 @@ public class HSDataDialog extends DialogFragment {
return serviceDataDialog;
}
private boolean checkInput(Integer local, Integer remote){
private boolean checkInput(Integer local, Integer remote) {
boolean is_ok = true;
Integer error_msg = 0;