From 6a8f5fb4a7c756b993c9f320ced71a9ea38a6b32 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 6 May 2019 14:10:36 +0200 Subject: [PATCH] rename SwapAppsView things to "Swap Success" --- .../org/fdroid/fdroid/localrepo/SwapService.java | 4 ++-- .../org/fdroid/fdroid/views/swap/ConnectingView.java | 2 +- .../swap/{SwapAppsView.java => SwapSuccessView.java} | 12 ++++++------ .../fdroid/views/swap/SwapWorkflowActivity.java | 6 +++--- app/src/full/res/layout/swap_success.xml | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) rename app/src/full/java/org/fdroid/fdroid/views/swap/{SwapAppsView.java => SwapSuccessView.java} (97%) diff --git a/app/src/full/java/org/fdroid/fdroid/localrepo/SwapService.java b/app/src/full/java/org/fdroid/fdroid/localrepo/SwapService.java index a205ab066..db2206166 100644 --- a/app/src/full/java/org/fdroid/fdroid/localrepo/SwapService.java +++ b/app/src/full/java/org/fdroid/fdroid/localrepo/SwapService.java @@ -140,7 +140,7 @@ public class SwapService extends Service { public static final int STEP_SHOW_NFC = 4; public static final int STEP_WIFI_QR = 5; public static final int STEP_CONNECTING = 6; - public static final int STEP_SUCCESS = 7; + public static final int STEP_SWAP_SUCCESS = 7; public static final int STEP_CONFIRM_SWAP = 8; /** @@ -276,7 +276,7 @@ public class SwapService extends Service { * This is the same as, e.g. {@link Context#getSystemService(String)} */ @IntDef({STEP_INTRO, STEP_SELECT_APPS, STEP_JOIN_WIFI, STEP_SHOW_NFC, STEP_WIFI_QR, - STEP_CONNECTING, STEP_SUCCESS, STEP_CONFIRM_SWAP, STEP_INITIAL_LOADING}) + STEP_CONNECTING, STEP_SWAP_SUCCESS, STEP_CONFIRM_SWAP, STEP_INITIAL_LOADING}) @Retention(RetentionPolicy.SOURCE) public @interface SwapStep { } diff --git a/app/src/full/java/org/fdroid/fdroid/views/swap/ConnectingView.java b/app/src/full/java/org/fdroid/fdroid/views/swap/ConnectingView.java index 1ec235d24..bd71098dc 100644 --- a/app/src/full/java/org/fdroid/fdroid/views/swap/ConnectingView.java +++ b/app/src/full/java/org/fdroid/fdroid/views/swap/ConnectingView.java @@ -146,7 +146,7 @@ public class ConnectingView extends LinearLayout implements SwapWorkflowActivity @Override protected void onComplete() { - getActivity().showSwapConnected(); + getActivity().showSwapSuccess(); } } diff --git a/app/src/full/java/org/fdroid/fdroid/views/swap/SwapAppsView.java b/app/src/full/java/org/fdroid/fdroid/views/swap/SwapSuccessView.java similarity index 97% rename from app/src/full/java/org/fdroid/fdroid/views/swap/SwapAppsView.java rename to app/src/full/java/org/fdroid/fdroid/views/swap/SwapSuccessView.java index 88ad58021..a0de37a5e 100644 --- a/app/src/full/java/org/fdroid/fdroid/views/swap/SwapAppsView.java +++ b/app/src/full/java/org/fdroid/fdroid/views/swap/SwapSuccessView.java @@ -55,25 +55,25 @@ import java.util.List; import java.util.Timer; import java.util.TimerTask; -public class SwapAppsView extends ListView implements +public class SwapSuccessView extends ListView implements SwapWorkflowActivity.InnerView, LoaderManager.LoaderCallbacks, SearchView.OnQueryTextListener { - public SwapAppsView(Context context) { + public SwapSuccessView(Context context) { super(context); } - public SwapAppsView(Context context, AttributeSet attrs) { + public SwapSuccessView(Context context, AttributeSet attrs) { super(context, attrs); } - public SwapAppsView(Context context, AttributeSet attrs, int defStyleAttr) { + public SwapSuccessView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @TargetApi(21) - public SwapAppsView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + public SwapSuccessView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); } @@ -165,7 +165,7 @@ public class SwapAppsView extends ListView implements @Override public int getStep() { - return SwapService.STEP_SUCCESS; + return SwapService.STEP_SWAP_SUCCESS; } @Override diff --git a/app/src/full/java/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java b/app/src/full/java/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java index 99000ac0d..5c3beb660 100644 --- a/app/src/full/java/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java +++ b/app/src/full/java/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java @@ -344,8 +344,8 @@ public class SwapWorkflowActivity extends AppCompatActivity { case SwapService.STEP_WIFI_QR: showWifiQr(); break; - case SwapService.STEP_SUCCESS: - showSwapConnected(); + case SwapService.STEP_SWAP_SUCCESS: + showSwapSuccess(); break; case SwapService.STEP_CONNECTING: // TODO: Properly decide what to do here (i.e. returning to the activity after it was connecting)... @@ -545,7 +545,7 @@ public class SwapWorkflowActivity extends AppCompatActivity { inflateInnerView(R.layout.swap_send_fdroid); } - public void showSwapConnected() { + public void showSwapSuccess() { inflateInnerView(R.layout.swap_success); } diff --git a/app/src/full/res/layout/swap_success.xml b/app/src/full/res/layout/swap_success.xml index dce3336f6..e00d3c09c 100644 --- a/app/src/full/res/layout/swap_success.xml +++ b/app/src/full/res/layout/swap_success.xml @@ -1,9 +1,9 @@ - - \ No newline at end of file + \ No newline at end of file