commit e8a509951874f8af8b2fbc95bc94fb57cd75d8fb Author: arrase arrase@gmail.com Date: Mon Nov 21 00:00:58 2016 +0100
refactor --- .../android/ui/hs/HiddenServicesActivity.java | 26 +++++++++++----------- .../android/ui/hs/dialogs/HSDataDialog.java | 6 ++--- 2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/ui/hs/HiddenServicesActivity.java b/app/src/main/java/org/torproject/android/ui/hs/HiddenServicesActivity.java index 80b7e81..0fa4f13 100644 --- a/app/src/main/java/org/torproject/android/ui/hs/HiddenServicesActivity.java +++ b/app/src/main/java/org/torproject/android/ui/hs/HiddenServicesActivity.java @@ -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 + )); + } + } } diff --git a/app/src/main/java/org/torproject/android/ui/hs/dialogs/HSDataDialog.java b/app/src/main/java/org/torproject/android/ui/hs/dialogs/HSDataDialog.java index 98a9d3f..cdd9ce4 100644 --- a/app/src/main/java/org/torproject/android/ui/hs/dialogs/HSDataDialog.java +++ b/app/src/main/java/org/torproject/android/ui/hs/dialogs/HSDataDialog.java @@ -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;
tor-commits@lists.torproject.org