mirror of https://github.com/m2049r/xmrwallet.git
Adjusted visibility of fields and methods. (#102)
* Adjusted visibility of fields and methods. * Adjusted visibility of fields and methods after rebase
This commit is contained in:
parent
44f241f4ee
commit
4cfd166ed7
|
@ -21,7 +21,6 @@ You may lose all your Moneroj if you use this App. Be cautious when spending on
|
|||
- Monerujo means "Monero Wallet" according to https://www.reddit.com/r/Monero/comments/3exy7t/esperanto_corner/
|
||||
|
||||
### TODO
|
||||
- review visibility of methods/classes
|
||||
- more sensible error dialogs
|
||||
|
||||
### Issues / Pitfalls
|
||||
|
|
|
@ -48,16 +48,16 @@ public class GenerateFragment extends Fragment {
|
|||
static final String TYPE_SEED = "seed";
|
||||
static final String TYPE_VIEWONLY = "view";
|
||||
|
||||
TextInputLayout etWalletName;
|
||||
TextInputLayout etWalletPassword;
|
||||
TextInputLayout etWalletAddress;
|
||||
TextInputLayout etWalletMnemonic;
|
||||
TextInputLayout etWalletViewKey;
|
||||
TextInputLayout etWalletSpendKey;
|
||||
TextInputLayout etWalletRestoreHeight;
|
||||
Button bGenerate;
|
||||
private TextInputLayout etWalletName;
|
||||
private TextInputLayout etWalletPassword;
|
||||
private TextInputLayout etWalletAddress;
|
||||
private TextInputLayout etWalletMnemonic;
|
||||
private TextInputLayout etWalletViewKey;
|
||||
private TextInputLayout etWalletSpendKey;
|
||||
private TextInputLayout etWalletRestoreHeight;
|
||||
private Button bGenerate;
|
||||
|
||||
String type = null;
|
||||
private String type = null;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
|
|
|
@ -74,7 +74,7 @@ public class LoginActivity extends AppCompatActivity
|
|||
|
||||
static final int DAEMON_TIMEOUT = 500; // deamon must respond in 500ms
|
||||
|
||||
Toolbar toolbar;
|
||||
private Toolbar toolbar;
|
||||
|
||||
@Override
|
||||
public void setToolbarButton(int type) {
|
||||
|
|
|
@ -59,15 +59,15 @@ import java.util.Map;
|
|||
public class ReceiveFragment extends Fragment {
|
||||
static final String TAG = "ReceiveFragment";
|
||||
|
||||
ProgressBar pbProgress;
|
||||
TextView tvAddress;
|
||||
TextInputLayout etPaymentId;
|
||||
ExchangeView evAmount;
|
||||
Button bPaymentId;
|
||||
Button bGenerate;
|
||||
ImageView qrCode;
|
||||
EditText etDummy;
|
||||
ImageButton bCopyAddress;
|
||||
private ProgressBar pbProgress;
|
||||
private TextView tvAddress;
|
||||
private TextInputLayout etPaymentId;
|
||||
private ExchangeView evAmount;
|
||||
private Button bPaymentId;
|
||||
private Button bGenerate;
|
||||
private ImageView qrCode;
|
||||
private EditText etDummy;
|
||||
private ImageButton bCopyAddress;
|
||||
|
||||
//String name;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import me.dm7.barcodescanner.zxing.ZXingScannerView;
|
|||
public class ScannerFragment extends Fragment implements ZXingScannerView.ResultHandler {
|
||||
static final String TAG = "ScannerFragment";
|
||||
|
||||
Listener activityCallback;
|
||||
private Listener activityCallback;
|
||||
|
||||
public interface Listener {
|
||||
boolean onAddressScanned(String uri);
|
||||
|
|
|
@ -51,33 +51,33 @@ import com.m2049r.xmrwallet.util.TxData;
|
|||
public class SendFragment extends Fragment {
|
||||
static final String TAG = "SendFragment";
|
||||
|
||||
EditText etDummy;
|
||||
private EditText etDummy;
|
||||
|
||||
ScrollView scrollview;
|
||||
private ScrollView scrollview;
|
||||
|
||||
TextInputLayout etAddress;
|
||||
TextInputLayout etPaymentId;
|
||||
private TextInputLayout etAddress;
|
||||
private TextInputLayout etPaymentId;
|
||||
//TextInputLayout etAmount;
|
||||
ExchangeView evAmount;
|
||||
TextView tvAmountB;
|
||||
Spinner sCurrencyA;
|
||||
Spinner sCurrencyB;
|
||||
private ExchangeView evAmount;
|
||||
private TextView tvAmountB;
|
||||
private Spinner sCurrencyA;
|
||||
private Spinner sCurrencyB;
|
||||
|
||||
Button bScan;
|
||||
Spinner sMixin;
|
||||
Spinner sPriority;
|
||||
Button bPrepareSend;
|
||||
Button bDispose;
|
||||
Button bPaymentId;
|
||||
LinearLayout llConfirmSend;
|
||||
TextView tvTxAmount;
|
||||
TextView tvTxFee;
|
||||
private Button bScan;
|
||||
private Spinner sMixin;
|
||||
private Spinner sPriority;
|
||||
private Button bPrepareSend;
|
||||
private Button bDispose;
|
||||
private Button bPaymentId;
|
||||
private LinearLayout llConfirmSend;
|
||||
private TextView tvTxAmount;
|
||||
private TextView tvTxFee;
|
||||
//TextView tvTxDust;
|
||||
TextView tvTxTotal;
|
||||
EditText etNotes;
|
||||
Button bSend;
|
||||
Button bReallySend;
|
||||
ProgressBar pbProgress;
|
||||
private TextView tvTxTotal;
|
||||
private EditText etNotes;
|
||||
private Button bSend;
|
||||
private Button bReallySend;
|
||||
private ProgressBar pbProgress;
|
||||
|
||||
final static int Mixins[] = {4, 7, 12, 25}; // must match the layout XML
|
||||
final static PendingTransaction.Priority Priorities[] =
|
||||
|
|
|
@ -57,17 +57,17 @@ public class TxFragment extends Fragment {
|
|||
TS_FORMATTER.setTimeZone(tz);
|
||||
}
|
||||
|
||||
TextView tvTxTimestamp;
|
||||
TextView tvTxId;
|
||||
TextView tvTxKey;
|
||||
TextView tvDestination;
|
||||
TextView tvTxPaymentId;
|
||||
TextView tvTxBlockheight;
|
||||
TextView tvTxAmount;
|
||||
TextView tvTxFee;
|
||||
TextView tvTxTransfers;
|
||||
TextView etTxNotes;
|
||||
Button bTxNotes;
|
||||
private TextView tvTxTimestamp;
|
||||
private TextView tvTxId;
|
||||
private TextView tvTxKey;
|
||||
private TextView tvDestination;
|
||||
private TextView tvTxPaymentId;
|
||||
private TextView tvTxBlockheight;
|
||||
private TextView tvTxAmount;
|
||||
private TextView tvTxFee;
|
||||
private TextView tvTxTransfers;
|
||||
private TextView etTxNotes;
|
||||
private Button bTxNotes;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
|
|
|
@ -60,7 +60,7 @@ public class WalletActivity extends AppCompatActivity implements WalletFragment.
|
|||
public static final String REQUEST_ID = "id";
|
||||
public static final String REQUEST_PW = "pw";
|
||||
|
||||
Toolbar toolbar;
|
||||
private Toolbar toolbar;
|
||||
|
||||
@Override
|
||||
public void setToolbarButton(int type) {
|
||||
|
|
|
@ -53,16 +53,16 @@ public class WalletFragment extends Fragment
|
|||
private TransactionInfoAdapter adapter;
|
||||
private NumberFormat formatter = NumberFormat.getInstance();
|
||||
|
||||
FrameLayout flExchange;
|
||||
TextView tvBalance;
|
||||
TextView tvUnconfirmedAmount;
|
||||
TextView tvProgress;
|
||||
ImageView ivSynced;
|
||||
ProgressBar pbProgress;
|
||||
Button bReceive;
|
||||
Button bSend;
|
||||
private FrameLayout flExchange;
|
||||
private TextView tvBalance;
|
||||
private TextView tvUnconfirmedAmount;
|
||||
private TextView tvProgress;
|
||||
private ImageView ivSynced;
|
||||
private ProgressBar pbProgress;
|
||||
private Button bReceive;
|
||||
private Button bSend;
|
||||
|
||||
Spinner sCurrency;
|
||||
private Spinner sCurrency;
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
|
|
|
@ -47,10 +47,10 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
|
|||
//static final int TX_PENDING = Color.rgb(72, 53, 176);
|
||||
//static final int TX_FAILED = Color.rgb(208, 0, 255);
|
||||
|
||||
int outboundColour;
|
||||
int inboundColour;
|
||||
int pendingColour;
|
||||
int failedColour;
|
||||
private int outboundColour;
|
||||
private int inboundColour;
|
||||
private int pendingColour;
|
||||
private int failedColour;
|
||||
|
||||
public interface OnInteractionListener {
|
||||
void onInteraction(View view, TransactionInfo item);
|
||||
|
@ -59,7 +59,7 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
|
|||
private final List<TransactionInfo> infoItems;
|
||||
private final OnInteractionListener listener;
|
||||
|
||||
Context context;
|
||||
private Context context;
|
||||
|
||||
public TransactionInfoAdapter(Context context, OnInteractionListener listener) {
|
||||
this.context = context;
|
||||
|
|
|
@ -31,9 +31,9 @@ import android.os.Process;
|
|||
public class MoneroHandlerThread extends Thread {
|
||||
// from src/cryptonote_config.h
|
||||
static public final long THREAD_STACK_SIZE = 5 * 1024 * 1024;
|
||||
int mPriority;
|
||||
int mTid = -1;
|
||||
Looper mLooper;
|
||||
private int mPriority;
|
||||
private int mTid = -1;
|
||||
private Looper mLooper;
|
||||
|
||||
public MoneroHandlerThread(String name) {
|
||||
super(null, null, name, THREAD_STACK_SIZE);
|
||||
|
@ -47,7 +47,7 @@ public class MoneroHandlerThread extends Thread {
|
|||
* @param priority The priority to run the thread at. The value supplied must be from
|
||||
* {@link android.os.Process} and not from java.lang.Thread.
|
||||
*/
|
||||
public MoneroHandlerThread(String name, int priority) {
|
||||
MoneroHandlerThread(String name, int priority) {
|
||||
super(null, null, name, THREAD_STACK_SIZE);
|
||||
mPriority = priority;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public class MoneroHandlerThread extends Thread {
|
|||
* setup before Looper loops.
|
||||
*/
|
||||
|
||||
protected void onLooperPrepared() {
|
||||
private void onLooperPrepared() {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,7 +81,7 @@ public class MoneroHandlerThread extends Thread {
|
|||
*
|
||||
* @return The looper.
|
||||
*/
|
||||
public Looper getLooper() {
|
||||
Looper getLooper() {
|
||||
if (!isAlive()) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -254,7 +254,6 @@ public class WalletService extends Service {
|
|||
/////////////////////////////////////////////
|
||||
/////////////////////////////////////////////
|
||||
|
||||
private Looper mServiceLooper;
|
||||
private WalletService.ServiceHandler mServiceHandler;
|
||||
|
||||
private boolean errorState = false;
|
||||
|
@ -398,8 +397,8 @@ public class WalletService extends Service {
|
|||
thread.start();
|
||||
|
||||
// Get the HandlerThread's Looper and use it for our Handler
|
||||
mServiceLooper = thread.getLooper();
|
||||
mServiceHandler = new WalletService.ServiceHandler(mServiceLooper);
|
||||
final Looper serviceLooper = thread.getLooper();
|
||||
mServiceHandler = new WalletService.ServiceHandler(serviceLooper);
|
||||
|
||||
Log.d(TAG, "Service created");
|
||||
}
|
||||
|
|
|
@ -24,19 +24,19 @@ import org.json.JSONException;
|
|||
import org.json.JSONObject;
|
||||
|
||||
public class AsyncExchangeRate extends AsyncTask<String, Void, Boolean> {
|
||||
static final String TAG = "AsyncGetExchangeRate";
|
||||
private static final String TAG = "AsyncGetExchangeRate";
|
||||
|
||||
static final long TIME_REFRESH_INTERVAL = 60000; // refresh exchange rate max every minute
|
||||
private static final long TIME_REFRESH_INTERVAL = 60000; // refresh exchange rate max every minute
|
||||
|
||||
static protected long RateTime = 0;
|
||||
static protected double Rate = 0;
|
||||
static protected String Fiat = null;
|
||||
private static long RateTime = 0;
|
||||
private static double Rate = 0;
|
||||
private static String Fiat = null;
|
||||
|
||||
public interface Listener {
|
||||
void exchange(String currencyA, String currencyB, double rate);
|
||||
}
|
||||
|
||||
Listener listener;
|
||||
private Listener listener;
|
||||
|
||||
public AsyncExchangeRate(Listener listener) {
|
||||
super();
|
||||
|
@ -49,9 +49,9 @@ public class AsyncExchangeRate extends AsyncTask<String, Void, Boolean> {
|
|||
super.onPreExecute();
|
||||
}
|
||||
|
||||
boolean inverse = false;
|
||||
String currencyA = null;
|
||||
String currencyB = null;
|
||||
private boolean inverse = false;
|
||||
private String currencyA = null;
|
||||
private String currencyB = null;
|
||||
|
||||
@Override
|
||||
protected Boolean doInBackground(String... params) {
|
||||
|
@ -125,7 +125,7 @@ public class AsyncExchangeRate extends AsyncTask<String, Void, Boolean> {
|
|||
}
|
||||
}
|
||||
|
||||
String getExchangeRate(String fiat) {
|
||||
private String getExchangeRate(String fiat) {
|
||||
String jsonResponse =
|
||||
Helper.getUrl("https://api.kraken.com/0/public/Ticker?pair=XMR" + fiat);
|
||||
if (jsonResponse == null) return null;
|
||||
|
|
|
@ -118,7 +118,7 @@ public class Helper {
|
|||
}
|
||||
|
||||
/* Checks if external storage is available for read and write */
|
||||
static public boolean isExternalStorageWritable() {
|
||||
private static boolean isExternalStorageWritable() {
|
||||
String state = Environment.getExternalStorageState();
|
||||
return Environment.MEDIA_MOUNTED.equals(state);
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ public class Helper {
|
|||
}
|
||||
|
||||
// amountString must have '.' as decimal point
|
||||
static public String getDisplayAmount(String amountString, int maxDecimals) {
|
||||
private static String getDisplayAmount(String amountString, int maxDecimals) {
|
||||
int lastZero = 0;
|
||||
int decimal = 0;
|
||||
for (int i = amountString.length() - 1; i >= 0; i--) {
|
||||
|
|
|
@ -22,9 +22,9 @@ import java.util.List;
|
|||
|
||||
public class NodeList {
|
||||
static private final String TAG = "NodeList";
|
||||
static public final int MAX_SIZE = 5;
|
||||
private static final int MAX_SIZE = 5;
|
||||
|
||||
List<String> nodes = new ArrayList<>();
|
||||
private List<String> nodes = new ArrayList<>();
|
||||
|
||||
public List<String> getNodes() {
|
||||
return nodes;
|
||||
|
|
Loading…
Reference in New Issue