rename SwapAppsView things to "Swap Success"

This commit is contained in:
Hans-Christoph Steiner 2019-05-06 14:10:36 +02:00
parent 568abe9f3b
commit 6a8f5fb4a7
5 changed files with 14 additions and 14 deletions

View File

@ -140,7 +140,7 @@ public class SwapService extends Service {
public static final int STEP_SHOW_NFC = 4; public static final int STEP_SHOW_NFC = 4;
public static final int STEP_WIFI_QR = 5; public static final int STEP_WIFI_QR = 5;
public static final int STEP_CONNECTING = 6; 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; 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)} * 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, @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) @Retention(RetentionPolicy.SOURCE)
public @interface SwapStep { public @interface SwapStep {
} }

View File

@ -146,7 +146,7 @@ public class ConnectingView extends LinearLayout implements SwapWorkflowActivity
@Override @Override
protected void onComplete() { protected void onComplete() {
getActivity().showSwapConnected(); getActivity().showSwapSuccess();
} }
} }

View File

@ -55,25 +55,25 @@ import java.util.List;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
public class SwapAppsView extends ListView implements public class SwapSuccessView extends ListView implements
SwapWorkflowActivity.InnerView, SwapWorkflowActivity.InnerView,
LoaderManager.LoaderCallbacks<Cursor>, LoaderManager.LoaderCallbacks<Cursor>,
SearchView.OnQueryTextListener { SearchView.OnQueryTextListener {
public SwapAppsView(Context context) { public SwapSuccessView(Context context) {
super(context); super(context);
} }
public SwapAppsView(Context context, AttributeSet attrs) { public SwapSuccessView(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
} }
public SwapAppsView(Context context, AttributeSet attrs, int defStyleAttr) { public SwapSuccessView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr); super(context, attrs, defStyleAttr);
} }
@TargetApi(21) @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); super(context, attrs, defStyleAttr, defStyleRes);
} }
@ -165,7 +165,7 @@ public class SwapAppsView extends ListView implements
@Override @Override
public int getStep() { public int getStep() {
return SwapService.STEP_SUCCESS; return SwapService.STEP_SWAP_SUCCESS;
} }
@Override @Override

View File

@ -344,8 +344,8 @@ public class SwapWorkflowActivity extends AppCompatActivity {
case SwapService.STEP_WIFI_QR: case SwapService.STEP_WIFI_QR:
showWifiQr(); showWifiQr();
break; break;
case SwapService.STEP_SUCCESS: case SwapService.STEP_SWAP_SUCCESS:
showSwapConnected(); showSwapSuccess();
break; break;
case SwapService.STEP_CONNECTING: case SwapService.STEP_CONNECTING:
// TODO: Properly decide what to do here (i.e. returning to the activity after it was 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); inflateInnerView(R.layout.swap_send_fdroid);
} }
public void showSwapConnected() { public void showSwapSuccess() {
inflateInnerView(R.layout.swap_success); inflateInnerView(R.layout.swap_success);
} }

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.views.swap.SwapAppsView <org.fdroid.fdroid.views.swap.SwapSuccessView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
</org.fdroid.fdroid.views.swap.SwapAppsView> </org.fdroid.fdroid.views.swap.SwapSuccessView>