I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit e271dc90 authored by str4d's avatar str4d
Browse files

Removed License button from VersionDialog

parent 77ced0bd
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
- Prevent accidental shutdown - Prevent accidental shutdown
- Add pop-up confirming router shutdown - Add pop-up confirming router shutdown
- OR: make router button long-press - OR: make router button long-press
- Remove License button from pop-up, change "OK" to "Dismiss"
- Display "No news" text for when router is first started - Display "No news" text for when router is first started
- Display release notes directly on new router version - Display release notes directly on new router version
- Text content - Text content
......
package net.i2p.android.router.dialog; package net.i2p.android.router.dialog;
import net.i2p.android.router.I2PActivityBase; import net.i2p.android.router.I2PActivityBase;
import net.i2p.android.router.LicenseActivity;
import net.i2p.android.router.MainFragment; import net.i2p.android.router.MainFragment;
import net.i2p.android.router.R; import net.i2p.android.router.R;
import net.i2p.android.router.util.Util; import net.i2p.android.router.util.Util;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.DialogFragment; import android.support.v4.app.DialogFragment;
...@@ -27,14 +25,14 @@ public class VersionDialog extends DialogFragment { ...@@ -27,14 +25,14 @@ public class VersionDialog extends DialogFragment {
case DIALOG_NEW_INSTALL: case DIALOG_NEW_INSTALL:
b.setMessage(R.string.welcome_new_install) b.setMessage(R.string.welcome_new_install)
.setCancelable(false) .setCancelable(false)
.setPositiveButton("OK", new DialogInterface.OnClickListener() { .setPositiveButton("Dismiss", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
I2PActivityBase ab = (I2PActivityBase) getActivity(); I2PActivityBase ab = (I2PActivityBase) getActivity();
ab.setPref(MainFragment.PREF_INSTALLED_VERSION, currentVersion); ab.setPref(MainFragment.PREF_INSTALLED_VERSION, currentVersion);
dialog.dismiss(); dialog.dismiss();
} }
}).setNeutralButton(R.string.label_release_notes, new DialogInterface.OnClickListener() { }).setNegativeButton(R.string.label_release_notes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
I2PActivityBase ab = (I2PActivityBase) getActivity(); I2PActivityBase ab = (I2PActivityBase) getActivity();
...@@ -50,15 +48,6 @@ public class VersionDialog extends DialogFragment { ...@@ -50,15 +48,6 @@ public class VersionDialog extends DialogFragment {
.addToBackStack(null) .addToBackStack(null)
.commit(); .commit();
} }
}).setNegativeButton(R.string.label_licenses, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
I2PActivityBase ab = (I2PActivityBase) getActivity();
ab.setPref(MainFragment.PREF_INSTALLED_VERSION, currentVersion);
dialog.dismiss();
Intent intent = new Intent(getActivity(), LicenseActivity.class);
startActivity(intent);
}
}); });
rv = b.create(); rv = b.create();
break; break;
...@@ -67,25 +56,19 @@ public class VersionDialog extends DialogFragment { ...@@ -67,25 +56,19 @@ public class VersionDialog extends DialogFragment {
b.setMessage(getResources().getString(R.string.welcome_new_version) + b.setMessage(getResources().getString(R.string.welcome_new_version) +
" " + currentVersion) " " + currentVersion)
.setCancelable(true) .setCancelable(true)
.setPositiveButton("OK", new DialogInterface.OnClickListener() { .setPositiveButton("Dismiss", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
I2PActivityBase ab = (I2PActivityBase) getActivity(); I2PActivityBase ab = (I2PActivityBase) getActivity();
ab.setPref(MainFragment.PREF_INSTALLED_VERSION, currentVersion); ab.setPref(MainFragment.PREF_INSTALLED_VERSION, currentVersion);
try { dialog.dismiss();
dialog.dismiss();
} catch(Exception e) {
}
} }
}).setNegativeButton(R.string.label_release_notes, new DialogInterface.OnClickListener() { }).setNegativeButton(R.string.label_release_notes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
I2PActivityBase ab = (I2PActivityBase) getActivity(); I2PActivityBase ab = (I2PActivityBase) getActivity();
ab.setPref(MainFragment.PREF_INSTALLED_VERSION, currentVersion); ab.setPref(MainFragment.PREF_INSTALLED_VERSION, currentVersion);
try { dialog.dismiss();
dialog.dismiss();
} catch(Exception e) {
}
TextResourceDialog f = new TextResourceDialog(); TextResourceDialog f = new TextResourceDialog();
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putInt(TextResourceDialog.TEXT_RESOURCE_ID, R.raw.releasenotes_txt); args.putInt(TextResourceDialog.TEXT_RESOURCE_ID, R.raw.releasenotes_txt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment