mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 15:19:53 +01:00
Delete old remote wipe setup fragment
This commit is contained in:
@@ -67,13 +67,11 @@ import org.briarproject.briar.android.remotewipe.RemoteWipeActivatedActivity;
|
|||||||
import org.briarproject.briar.android.remotewipe.RemoteWipeDisplayFragment;
|
import org.briarproject.briar.android.remotewipe.RemoteWipeDisplayFragment;
|
||||||
import org.briarproject.briar.android.remotewipe.RemoteWipeSetupActivity;
|
import org.briarproject.briar.android.remotewipe.RemoteWipeSetupActivity;
|
||||||
import org.briarproject.briar.android.remotewipe.RemoteWipeSetupExplainerFragment;
|
import org.briarproject.briar.android.remotewipe.RemoteWipeSetupExplainerFragment;
|
||||||
import org.briarproject.briar.android.remotewipe.RemoteWipeSuccessFragment;
|
|
||||||
import org.briarproject.briar.android.remotewipe.WiperSelectorFragment;
|
import org.briarproject.briar.android.remotewipe.WiperSelectorFragment;
|
||||||
import org.briarproject.briar.android.remotewipe.activate.ActivateRemoteWipeActivity;
|
import org.briarproject.briar.android.remotewipe.activate.ActivateRemoteWipeActivity;
|
||||||
import org.briarproject.briar.android.remotewipe.activate.ActivateRemoteWipeExplainerFragment;
|
import org.briarproject.briar.android.remotewipe.activate.ActivateRemoteWipeExplainerFragment;
|
||||||
import org.briarproject.briar.android.remotewipe.activate.ActivateRemoteWipeSuccessFragment;
|
import org.briarproject.briar.android.remotewipe.activate.ActivateRemoteWipeSuccessFragment;
|
||||||
import org.briarproject.briar.android.remotewipe.revoke.RevokeRemoteWipeActivity;
|
import org.briarproject.briar.android.remotewipe.revoke.RevokeRemoteWipeActivity;
|
||||||
import org.briarproject.briar.android.remotewipe.revoke.RevokeRemoteWipeState;
|
|
||||||
import org.briarproject.briar.android.remotewipe.revoke.RevokeRemoteWipeSuccessFragment;
|
import org.briarproject.briar.android.remotewipe.revoke.RevokeRemoteWipeSuccessFragment;
|
||||||
import org.briarproject.briar.android.reporting.CrashFragment;
|
import org.briarproject.briar.android.reporting.CrashFragment;
|
||||||
import org.briarproject.briar.android.reporting.CrashReportActivity;
|
import org.briarproject.briar.android.reporting.CrashReportActivity;
|
||||||
@@ -319,8 +317,6 @@ public interface ActivityComponent {
|
|||||||
|
|
||||||
void inject(RemoteWipeDisplayFragment remoteWipeDisplayFragment);
|
void inject(RemoteWipeDisplayFragment remoteWipeDisplayFragment);
|
||||||
|
|
||||||
void inject(RemoteWipeSuccessFragment remoteWipeSuccessFragment);
|
|
||||||
|
|
||||||
void inject(ActivateRemoteWipeExplainerFragment activateRemoteWipeExplainerFragment);
|
void inject(ActivateRemoteWipeExplainerFragment activateRemoteWipeExplainerFragment);
|
||||||
|
|
||||||
void inject(ActivateRemoteWipeSuccessFragment activateRemoteWipeSuccessFragment);
|
void inject(ActivateRemoteWipeSuccessFragment activateRemoteWipeSuccessFragment);
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ public class RemoteWipeSetupActivity extends BriarActivity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onStateChanged(RemoteWipeSetupState state) {
|
private void onStateChanged(RemoteWipeSetupState state) {
|
||||||
// if (state.equals(RemoteWipeSetupState.SUCCESS)) {
|
|
||||||
// showNextFragment(new RemoteWipeSuccessFragment());
|
|
||||||
if (state.equals(RemoteWipeSetupState.FAILED)) {
|
if (state.equals(RemoteWipeSetupState.FAILED)) {
|
||||||
Toast.makeText(this,
|
Toast.makeText(this,
|
||||||
R.string.remote_wipe_setup_failed,
|
R.string.remote_wipe_setup_failed,
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
package org.briarproject.briar.android.remotewipe;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
import org.briarproject.briar.R;
|
|
||||||
import org.briarproject.briar.android.activity.ActivityComponent;
|
|
||||||
import org.briarproject.briar.android.fragment.BaseFragment;
|
|
||||||
import org.briarproject.briar.android.socialbackup.recover.CustodianReturnShardViewModel;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
|
||||||
|
|
||||||
public class RemoteWipeSuccessFragment extends BaseFragment {
|
|
||||||
|
|
||||||
public static final String TAG = RemoteWipeSuccessFragment.class.getName();
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
ViewModelProvider.Factory viewModelFactory;
|
|
||||||
|
|
||||||
private RemoteWipeSetupViewModel viewModel;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void injectFragment(ActivityComponent component) {
|
|
||||||
component.inject(this);
|
|
||||||
viewModel = new ViewModelProvider(requireActivity(), viewModelFactory)
|
|
||||||
.get(RemoteWipeSetupViewModel.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater,
|
|
||||||
@Nullable ViewGroup container,
|
|
||||||
@Nullable Bundle savedInstanceState) {
|
|
||||||
View view = inflater.inflate(R.layout.fragment_remote_wipe_setup_success,
|
|
||||||
container, false);
|
|
||||||
|
|
||||||
Button button = view.findViewById(R.id.button);
|
|
||||||
button.setOnClickListener(e -> viewModel.onSuccessDismissed());
|
|
||||||
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getUniqueTag() {
|
|
||||||
return TAG;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/linearLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:paddingLeft="@dimen/margin_large"
|
|
||||||
android:paddingTop="@dimen/margin_medium"
|
|
||||||
android:paddingRight="@dimen/margin_large"
|
|
||||||
android:paddingBottom="@dimen/margin_medium">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:text="@string/button_confirm"
|
|
||||||
android:textSize="24sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView2" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/remote_wipe_setup_success"
|
|
||||||
android:textSize="30sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:layout_marginLeft="32dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginEnd="32dp"
|
|
||||||
android:layout_marginRight="32dp"
|
|
||||||
app:layout_constraintDimensionRatio="1:1"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_baseline_done_outline_24" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
Reference in New Issue
Block a user