Skip to content

Commit

Permalink
Merge branch 'master' of github.com:guardianproject/orbot
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Apr 26, 2020
2 parents 2e6c9b1 + 93a0786 commit 785fa8f
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions app/src/main/java/org/torproject/android/OrbotMainActivity.java
Expand Up @@ -26,13 +26,11 @@
import android.text.Html;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnLongClickListener;
import android.view.ViewGroup;
import android.view.animation.AccelerateInterpolator;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
Expand Down Expand Up @@ -456,7 +454,6 @@ public boolean onCreateOptionsMenu(Menu menu) {

@Override
public boolean onOptionsItemSelected(MenuItem item) {

if (item.getItemId() == R.id.menu_newnym) {
requestNewTorIdentity();
} else if (item.getItemId() == R.id.menu_settings) {
Expand All @@ -469,7 +466,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
} else if (item.getItemId() == R.id.menu_about) {
showAbout();


} else if (item.getItemId() == R.id.menu_scan) {
IntentIntegrator integrator = new IntentIntegrator(OrbotMainActivity.this);
integrator.initiateScan();
Expand Down Expand Up @@ -499,10 +495,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
}

private void showAbout() {

LayoutInflater li = LayoutInflater.from(this);
View view = li.inflate(R.layout.layout_about, (ViewGroup) lblStatus.getRootView());

View view = getLayoutInflater().inflate(R.layout.layout_about, null);
String version;

try {
Expand All @@ -520,10 +513,10 @@ private void showAbout() {
String aboutText = readFromAssets(this, "LICENSE");
aboutText = aboutText.replace("\n", "<br/>");
aboutOther.setText(Html.fromHtml(aboutText));
} catch (Exception e) {
// This should not happen. Ignore.
} catch (IOException e) {
}


new AlertDialog.Builder(this)
.setTitle(getString(R.string.button_about))
.setView(view)
Expand Down Expand Up @@ -1025,8 +1018,7 @@ private synchronized void updateStatus(String torServiceMsg, String newTorStatus
if (torStatus == null || (newTorStatus != null && newTorStatus.equals(torStatus))) {
torStatus = newTorStatus;
return;
}
else {
} else {
torStatus = newTorStatus;
}

Expand Down Expand Up @@ -1071,8 +1063,7 @@ private synchronized void updateStatus(String torServiceMsg, String newTorStatus
if (torServiceMsg != null) {
if (torServiceMsg.contains(TorServiceConstants.LOG_NOTICE_BOOTSTRAPPED))
lblStatus.setText(torServiceMsg);
}
else {
} else {
lblStatus.setText(getString(R.string.status_starting_up));
}

Expand Down

0 comments on commit 785fa8f

Please sign in to comment.