mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
Compare commits
5 Commits
lock-down-
...
1821-bluet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb8333660b | ||
|
|
9925c799a1 | ||
|
|
3ee2d2112c | ||
|
|
da5b2c194a | ||
|
|
244d03a718 |
@@ -448,6 +448,12 @@
|
||||
android:label="@string/pending_contact_requests"
|
||||
android:theme="@style/BriarTheme" />
|
||||
|
||||
<activity
|
||||
android:name=".android.bluetoothsetup.BluetoothSetupActivity"
|
||||
android:label="Bluetooth Setup"
|
||||
android:theme="@style/BriarTheme"
|
||||
android:windowSoftInputMode="adjustResize|stateHidden" />
|
||||
|
||||
</application>
|
||||
|
||||
<queries>
|
||||
|
||||
@@ -30,14 +30,15 @@ import org.briarproject.bramble.util.StringUtils;
|
||||
import org.briarproject.briar.android.account.DozeHelperModule;
|
||||
import org.briarproject.briar.android.account.LockManagerImpl;
|
||||
import org.briarproject.briar.android.account.SetupModule;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupModule;
|
||||
import org.briarproject.briar.android.contact.ContactListModule;
|
||||
import org.briarproject.briar.android.forum.ForumModule;
|
||||
import org.briarproject.briar.android.keyagreement.ContactExchangeModule;
|
||||
import org.briarproject.briar.android.login.LoginModule;
|
||||
import org.briarproject.briar.android.navdrawer.NavDrawerModule;
|
||||
import org.briarproject.briar.android.settings.SettingsModule;
|
||||
import org.briarproject.briar.android.privategroup.list.GroupListModule;
|
||||
import org.briarproject.briar.android.reporting.DevReportModule;
|
||||
import org.briarproject.briar.android.settings.SettingsModule;
|
||||
import org.briarproject.briar.android.test.TestAvatarCreatorImpl;
|
||||
import org.briarproject.briar.android.viewmodel.ViewModelModule;
|
||||
import org.briarproject.briar.api.android.AndroidNotificationManager;
|
||||
@@ -78,6 +79,7 @@ import static org.briarproject.briar.android.TestingConstants.IS_DEBUG_BUILD;
|
||||
SettingsModule.class,
|
||||
DevReportModule.class,
|
||||
ContactListModule.class,
|
||||
BluetoothSetupModule.class,
|
||||
// below need to be within same scope as ViewModelProvider.Factory
|
||||
ForumModule.BindsModule.class,
|
||||
GroupListModule.class,
|
||||
|
||||
@@ -20,6 +20,10 @@ import org.briarproject.briar.android.blog.ReblogFragment;
|
||||
import org.briarproject.briar.android.blog.RssFeedImportActivity;
|
||||
import org.briarproject.briar.android.blog.RssFeedManageActivity;
|
||||
import org.briarproject.briar.android.blog.WriteBlogPostActivity;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupActivity;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupChooseFragment;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupPendingFragment;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupStartFragment;
|
||||
import org.briarproject.briar.android.contact.ContactListFragment;
|
||||
import org.briarproject.briar.android.contact.add.remote.AddContactActivity;
|
||||
import org.briarproject.briar.android.contact.add.remote.LinkExchangeFragment;
|
||||
@@ -186,6 +190,8 @@ public interface ActivityComponent {
|
||||
|
||||
void inject(CrashReportActivity crashReportActivity);
|
||||
|
||||
void inject(BluetoothSetupActivity activity);
|
||||
|
||||
// Fragments
|
||||
|
||||
void inject(AuthorNameFragment fragment);
|
||||
@@ -242,4 +248,10 @@ public interface ActivityComponent {
|
||||
|
||||
void inject(ConfirmAvatarDialogFragment fragment);
|
||||
|
||||
void inject(BluetoothSetupStartFragment fragment);
|
||||
|
||||
void inject(BluetoothSetupChooseFragment fragment);
|
||||
|
||||
void inject(BluetoothSetupPendingFragment fragment);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package org.briarproject.briar.android.bluetoothsetup;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
|
||||
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
||||
import org.briarproject.briar.R;
|
||||
import org.briarproject.briar.android.activity.ActivityComponent;
|
||||
import org.briarproject.briar.android.activity.BriarActivity;
|
||||
import org.briarproject.briar.android.fragment.BaseFragment.BaseFragmentListener;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
public class BluetoothSetupActivity extends BriarActivity implements
|
||||
BaseFragmentListener {
|
||||
|
||||
@Inject
|
||||
ViewModelProvider.Factory viewModelFactory;
|
||||
private BluetoothSetupViewModel viewModel;
|
||||
|
||||
@Override
|
||||
public void injectActivity(ActivityComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle state) {
|
||||
super.onCreate(state);
|
||||
setContentView(R.layout.activity_fragment_container);
|
||||
|
||||
ActionBar ab = getSupportActionBar();
|
||||
if (ab != null) {
|
||||
ab.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
viewModel = new ViewModelProvider(this, viewModelFactory)
|
||||
.get(BluetoothSetupViewModel.class);
|
||||
|
||||
if (state == null) {
|
||||
showInitialFragment(new BluetoothSetupStartFragment());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
onBackPressed();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package org.briarproject.briar.android.bluetoothsetup;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
||||
import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
|
||||
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
||||
import org.briarproject.briar.R;
|
||||
import org.briarproject.briar.android.activity.ActivityComponent;
|
||||
import org.briarproject.briar.android.fragment.BaseFragment;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
public class BluetoothSetupChooseFragment extends BaseFragment {
|
||||
private static final String TAG =
|
||||
BluetoothSetupChooseFragment.class.getName();
|
||||
|
||||
@Inject
|
||||
ViewModelProvider.Factory viewModelFactory;
|
||||
|
||||
private BluetoothSetupViewModel viewModel;
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectFragment(ActivityComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
if (getActivity() == null || getContext() == null) return null;
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity())
|
||||
.get(BluetoothSetupViewModel.class);
|
||||
|
||||
View v =
|
||||
inflater.inflate(R.layout.fragment_bluetooth_setup_choose,
|
||||
container, false);
|
||||
|
||||
// TODO to enable when user picks a device from list
|
||||
|
||||
Button continueButton = v.findViewById(R.id.continueButton);
|
||||
continueButton.setOnClickListener(view -> {
|
||||
showNextFragment(new BluetoothSetupPendingFragment());
|
||||
});
|
||||
continueButton.setEnabled(true);
|
||||
|
||||
// RecyclerView devices = v.findViewById(R.id.devices);
|
||||
// devices.setHasFixedSize(true);
|
||||
// final LinearLayoutManager layoutManager =
|
||||
// new LinearLayoutManager(getActivity(),
|
||||
// LinearLayoutManager.VERTICAL, false);
|
||||
// devices.setLayoutManager(layoutManager);
|
||||
|
||||
return v;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.briarproject.briar.android.bluetoothsetup;
|
||||
|
||||
import org.briarproject.briar.android.viewmodel.ViewModelKey;
|
||||
|
||||
import androidx.lifecycle.ViewModel;
|
||||
import dagger.Binds;
|
||||
import dagger.Module;
|
||||
import dagger.multibindings.IntoMap;
|
||||
|
||||
@Module
|
||||
public abstract class BluetoothSetupModule {
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@ViewModelKey(BluetoothSetupViewModel.class)
|
||||
abstract ViewModel bindBluetoothSetupViewModel(
|
||||
BluetoothSetupViewModel bluetoothSetupViewModel);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package org.briarproject.briar.android.bluetoothsetup;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
|
||||
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
||||
import org.briarproject.briar.R;
|
||||
import org.briarproject.briar.android.activity.ActivityComponent;
|
||||
import org.briarproject.briar.android.fragment.BaseFragment;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
public class BluetoothSetupPendingFragment extends BaseFragment {
|
||||
private static final String TAG =
|
||||
BluetoothSetupPendingFragment.class.getName();
|
||||
|
||||
@Inject
|
||||
ViewModelProvider.Factory viewModelFactory;
|
||||
|
||||
private BluetoothSetupViewModel viewModel;
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectFragment(ActivityComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
if (getActivity() == null || getContext() == null) return null;
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity())
|
||||
.get(BluetoothSetupViewModel.class);
|
||||
|
||||
View v = inflater.inflate(R.layout.fragment_bluetooth_setup_pending,
|
||||
container, false);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
private void onContinueButtonClicked() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package org.briarproject.briar.android.bluetoothsetup;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
||||
import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
|
||||
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
||||
import org.briarproject.briar.R;
|
||||
import org.briarproject.briar.android.activity.ActivityComponent;
|
||||
import org.briarproject.briar.android.fragment.BaseFragment;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
public class BluetoothSetupStartFragment extends BaseFragment {
|
||||
private static final String TAG =
|
||||
BluetoothSetupStartFragment.class.getName();
|
||||
|
||||
@Inject
|
||||
ViewModelProvider.Factory viewModelFactory;
|
||||
|
||||
private BluetoothSetupViewModel viewModel;
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectFragment(ActivityComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
if (getActivity() == null || getContext() == null) return null;
|
||||
|
||||
viewModel = new ViewModelProvider(requireActivity())
|
||||
.get(BluetoothSetupViewModel.class);
|
||||
|
||||
View v = inflater.inflate(R.layout.fragment_bluetooth_setup_start,
|
||||
container, false);
|
||||
|
||||
// TODO device-BT and BT-plugin needs to be enabled at this point
|
||||
|
||||
Button startButton = v.findViewById(R.id.startButton);
|
||||
startButton.setOnClickListener(view -> {
|
||||
showNextFragment(new BluetoothSetupChooseFragment());
|
||||
});
|
||||
startButton.setEnabled(true);
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.briarproject.briar.android.bluetoothsetup;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import org.briarproject.bramble.api.db.DatabaseExecutor;
|
||||
import org.briarproject.bramble.api.db.TransactionManager;
|
||||
import org.briarproject.bramble.api.lifecycle.LifecycleManager;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.system.AndroidExecutor;
|
||||
import org.briarproject.briar.android.viewmodel.DbViewModel;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static java.util.logging.Logger.getLogger;
|
||||
|
||||
@NotNullByDefault
|
||||
public class BluetoothSetupViewModel extends DbViewModel {
|
||||
|
||||
private final static Logger LOG =
|
||||
getLogger(BluetoothSetupViewModel.class.getName());
|
||||
|
||||
@Inject
|
||||
BluetoothSetupViewModel(Application application,
|
||||
@DatabaseExecutor Executor dbExecutor,
|
||||
LifecycleManager lifecycleManager,
|
||||
TransactionManager db,
|
||||
AndroidExecutor androidExecutor) {
|
||||
super(application, dbExecutor, lifecycleManager, db, androidExecutor);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
|
||||
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
||||
import org.briarproject.briar.R;
|
||||
import org.briarproject.briar.android.activity.ActivityComponent;
|
||||
import org.briarproject.briar.android.bluetoothsetup.BluetoothSetupActivity;
|
||||
import org.briarproject.briar.android.contact.BaseContactListAdapter.OnContactClickListener;
|
||||
import org.briarproject.briar.android.contact.add.remote.AddContactActivity;
|
||||
import org.briarproject.briar.android.contact.add.remote.PendingContactListActivity;
|
||||
@@ -134,6 +135,11 @@ public class ContactListFragment extends BaseFragment
|
||||
case R.id.action_add_contact_remotely:
|
||||
startActivity(
|
||||
new Intent(getContext(), AddContactActivity.class));
|
||||
return;
|
||||
case R.id.action_bluetooth_setup:
|
||||
startActivity(
|
||||
new Intent(getContext(),
|
||||
BluetoothSetupActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
151
briar-android/src/main/res/drawable/bluetooth.xml
Normal file
151
briar-android/src/main/res/drawable/bluetooth.xml
Normal file
@@ -0,0 +1,151 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="499.24373dp"
|
||||
android:height="175.49413dp"
|
||||
android:viewportWidth="499.24373"
|
||||
android:viewportHeight="175.49413">
|
||||
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M459.809,171.16 L455.482,166.826 L448.412,164.399
|
||||
C444.524,163.064,439.689,161.403,437.668,160.708 L433.994,159.445
|
||||
L437.518,159.272 C445.76,158.868,450.506,155.265,451.854,148.388
|
||||
C452.65,144.327,452.983,131.09,452.684,115.347
|
||||
C452.531,107.263,452.518,99.9306,452.656,99.0522
|
||||
C452.794,98.1738,453.191,96.6321,453.539,95.6262
|
||||
C454.761,92.0938,453.879,83.7179,451.681,77.9947
|
||||
C451.333,77.0872,449.747,73.7797,448.157,70.6447
|
||||
C443.999,62.4444,443.652,61.7028,443.264,60.1606
|
||||
C442.805,58.3392,443.052,54.7253,443.726,53.3947
|
||||
C444.392,52.0797,445.883,50.4785,446.972,49.9081
|
||||
C448.271,49.2279,449.588,50.0301,451.658,52.7632
|
||||
C455.08,57.2792,465.659,72.2041,467.39,74.9562
|
||||
C471.136,80.9126,473.346,86.1212,475.362,93.7447
|
||||
C476.017,96.2197,477.247,100.742,478.097,103.795
|
||||
C478.946,106.847,480.811,113.953,482.241,119.585 L484.841,129.825
|
||||
L489.491,135.018 C492.048,137.874,495.288,141.482,496.691,143.035
|
||||
C498.093,144.588,499.241,146.01,499.241,146.196
|
||||
C499.241,146.531,464.741,175.495,464.342,175.495
|
||||
C464.227,175.495,462.186,173.545,459.807,171.161 Z M365.944,154.772
|
||||
C364.687,154.144,363.739,153.393,363.03,152.465
|
||||
C360.941,149.729,361.08,154.834,361.166,83.9825 L361.244,19.9437
|
||||
L361.905,18.7088 C362.92,16.8111,363.897,15.7979,365.645,14.8299
|
||||
L367.245,13.9437 L405.029,13.8641
|
||||
C447.485,13.7747,444.431,13.6158,447.145,16.056
|
||||
C448.02,16.8431,448.902,18.0155,449.329,18.9598
|
||||
C450.042,20.5368,450.045,20.5982,450.135,33.1639 L450.225,45.7841
|
||||
L448.427,45.654 C447.001,45.5509,446.346,45.661,445.261,46.1861
|
||||
C443.248,47.1606,441.321,49.0848,440.146,51.2936 L439.109,53.2436
|
||||
L439.102,40.4186 L439.095,27.5936 L405.495,27.5936 L371.895,27.5936
|
||||
L371.895,78.8936 L371.895,130.194 L405.494,130.194 L439.093,130.194
|
||||
L439.169,95.769 C439.242,62.8088,439.267,61.4078,439.76,62.844
|
||||
C440.043,63.669,441.566,66.8415,443.143,69.894
|
||||
C448.636,80.5202,448.548,79.7541,448.539,117.097
|
||||
C448.532,144.718,448.415,147.048,446.877,150.206
|
||||
C445.806,152.405,444.166,153.916,441.819,154.866 L440.145,155.543
|
||||
L403.977,155.623 L367.809,155.703 L365.945,154.772 Z M408.344,149.734
|
||||
C411.215,148.425,412.802,146.056,412.774,143.117
|
||||
C412.735,139.001,409.665,135.894,405.638,135.894
|
||||
C403.518,135.894,402.071,136.503,400.474,138.066
|
||||
C398.229,140.264,397.72,143.505,399.173,146.353
|
||||
C399.886,147.751,401.694,149.362,403.135,149.883
|
||||
C404.632,150.425,406.975,150.358,408.344,149.734 Z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M39.4343,171.16 L43.7609,166.826 L50.8305,164.399
|
||||
C54.7188,163.064,59.5534,161.403,61.574,160.708 L65.248,159.445 L61.724,159.272
|
||||
C53.4822,158.868,48.7362,155.265,47.3877,148.388
|
||||
C46.5914,144.327,46.2588,131.09,46.5575,115.347
|
||||
C46.7109,107.263,46.7237,99.9306,46.5859,99.0522
|
||||
C46.4482,98.1738,46.0506,96.6321,45.7025,95.6262
|
||||
C44.48,92.0938,45.3625,83.7179,47.5602,77.9947
|
||||
C47.9087,77.0872,49.4945,73.7797,51.0844,70.6447
|
||||
C55.2429,62.4444,55.589,61.7028,55.9773,60.1606
|
||||
C56.4359,58.3392,56.1889,54.7253,55.5148,53.3947
|
||||
C54.8486,52.0797,53.3578,50.4785,52.2686,49.9081
|
||||
C50.9697,49.2279,49.6529,50.0301,47.5822,52.7632
|
||||
C44.1607,57.2792,33.5808,72.2041,31.8503,74.9562
|
||||
C28.1048,80.9126,25.8947,86.1212,23.8781,93.7447
|
||||
C23.2234,96.2197,21.9929,100.742,21.1435,103.795
|
||||
C20.2942,106.847,18.4295,113.953,16.9996,119.585 L14.4,129.824 L9.75,135.017
|
||||
C7.1925,137.873,3.9525,141.481,2.55,143.034 C1.1475,144.587,0,146.009,0,146.195
|
||||
C0,146.53,34.4996,175.494,34.8991,175.494
|
||||
C35.0138,175.494,37.0547,173.544,39.4343,171.16 Z M133.299,154.772
|
||||
C134.557,154.144,135.505,153.393,136.213,152.465
|
||||
C138.302,149.729,138.163,154.834,138.077,83.9825 L137.999,19.9437
|
||||
L137.338,18.7088 C136.323,16.8111,135.346,15.7979,133.598,14.8299
|
||||
L131.998,13.9437 L94.2141,13.8641
|
||||
C51.7582,13.7747,54.8117,13.6158,52.0976,16.056
|
||||
C51.2222,16.8431,50.3404,18.0155,49.9137,18.9598
|
||||
C49.2011,20.5368,49.1976,20.5982,49.1081,33.1639 L49.0182,45.7841
|
||||
L50.8164,45.654 C52.2422,45.5509,52.8978,45.661,53.9824,46.1861
|
||||
C55.9953,47.1606,57.9223,49.0848,59.0972,51.2936 L60.1344,53.2436
|
||||
L60.1414,40.4186 L60.1484,27.5936 L93.7484,27.5936 L127.348,27.5936
|
||||
L127.348,78.8936 L127.348,130.194 L93.7493,130.194 L60.1506,130.194
|
||||
L60.0743,95.769 C60.0013,62.8088,59.9761,61.4078,59.4833,62.844
|
||||
C59.2002,63.669,57.6777,66.8415,56.0999,69.894
|
||||
C50.6074,80.5202,50.695,79.7541,50.7039,117.097
|
||||
C50.7109,144.718,50.8275,147.048,52.3659,150.206
|
||||
C53.4373,152.405,55.0773,153.916,57.4241,154.866 L59.0979,155.543
|
||||
L95.2656,155.623 L131.433,155.703 L133.297,154.772 Z M90.8996,149.734
|
||||
C88.0284,148.425,86.4419,146.056,86.4696,143.117
|
||||
C86.5084,139.001,89.5784,135.894,93.606,135.894
|
||||
C95.7256,135.894,97.1733,136.503,98.7696,138.066
|
||||
C101.015,140.264,101.524,143.505,100.071,146.353
|
||||
C99.3579,147.751,97.5496,149.362,96.1089,149.883
|
||||
C94.6118,150.425,92.2689,150.358,90.9,149.734 Z" />
|
||||
<path
|
||||
android:fillColor="#0a3d91"
|
||||
android:pathData="M247.254,75.9792 L251.99,75.9792
|
||||
C265.155,75.9792,275.753,86.5777,275.753,99.7427 L275.753,131.917
|
||||
C275.753,145.082,265.154,155.68,251.99,155.68 L247.254,155.68
|
||||
C234.089,155.68,223.491,145.081,223.491,131.917 L223.491,99.7424
|
||||
C223.491,86.5774,234.09,75.9789,247.254,75.9789 Z" />
|
||||
<path
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeWidth="4.32805729"
|
||||
android:pathData="M236.311,102.927 L261.218,127.997 L249.214,142.533 L249.214,90.5963
|
||||
L261.218,104.479 L236.311,128.896" />
|
||||
<path
|
||||
android:fillColor="#0a3d91"
|
||||
android:strokeWidth="7.55000019"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="M143.679,27.5571 C142.089,30.1809,143.861,33.1318,146.464,34.1998
|
||||
C149.159,35.7722,152.635,39.187,155.612,36.432
|
||||
C157.845,34.3925,156.213,30.7041,153.571,29.7617
|
||||
C150.507,28.085,147.019,24.2469,143.68,27.5572 Z M351.705,27.1294
|
||||
C348.937,29.09,344.636,29.8244,343.327,33.1721
|
||||
C342.685,35.9031,345.263,38.1647,347.911,37.5986
|
||||
C351.113,35.9607,354.968,34.7562,357.089,31.6509
|
||||
C357.658,29.0465,355.596,26.3002,352.821,26.9052
|
||||
C352.405,26.7975,352.061,26.9402,351.704,27.1294 Z M324.943,40.3012
|
||||
C322.009,42.0092,317.623,42.224,316.012,45.4542
|
||||
C315.104,48.1085,317.444,50.6134,320.136,50.3152
|
||||
C323.492,49.0109,327.456,48.2025,329.873,45.3129
|
||||
C330.687,42.7752,328.896,39.8433,326.077,40.184
|
||||
C325.673,40.0383,325.317,40.1458,324.944,40.3011 Z M169.707,42.7641
|
||||
C168.488,45.476,170.464,48.2246,173.151,48.9095
|
||||
C176.009,49.9903,179.82,53.0273,182.463,50.1434
|
||||
C184.778,48.1069,182.802,44.308,180.053,43.7252
|
||||
C176.725,42.5494,172.668,39.0116,169.707,42.7641 Z M296.98,50.3813
|
||||
C293.857,51.6905,289.488,51.352,287.488,54.3514
|
||||
C286.256,56.8701,288.261,59.6497,290.968,59.6911
|
||||
C294.455,58.7838,298.535,58.5783,301.271,55.952
|
||||
C302.385,53.5298,300.959,50.4059,298.119,50.401
|
||||
C297.736,50.2053,297.369,50.274,296.98,50.3813 Z M199.49,51.9262
|
||||
C197.261,53.388,196.81,56.7921,199.214,58.3031
|
||||
C201.801,59.7737,205.129,60.258,208.054,60.7984
|
||||
C210.839,61.1306,212.8,58.3192,211.945,55.7497
|
||||
C209.902,52.47,205.473,53.0161,202.228,51.6605
|
||||
C201.315,51.749,200.402,51.8376,199.49,51.9261 Z M268.004,56.434
|
||||
C264.728,57.2229,260.543,56.2461,258.068,58.816
|
||||
C256.418,61.0841,257.911,64.1697,260.572,64.6779
|
||||
C264.184,64.3855,268.29,64.7686,271.412,62.5839
|
||||
C272.874,60.3563,271.935,57.0522,269.127,56.6245
|
||||
C268.778,56.3753,268.405,56.3852,268.004,56.434 Z M228.555,57.852
|
||||
C226.622,59.6879,226.79,63.1186,229.426,64.1735
|
||||
C232.235,65.1623,235.597,65.0202,238.57,65.0349
|
||||
C241.369,64.8621,242.796,61.7451,241.494,59.3702
|
||||
C238.89,56.5186,234.647,57.8284,231.201,57.1003
|
||||
C230.319,57.3509,229.437,57.6015,228.555,57.8521 Z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/margin_large">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stepOne"
|
||||
style="@style/StepBubble"
|
||||
android:text="@string/step_1"
|
||||
app:layout_constraintBottom_toTopOf="@+id/stepOneText"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stepOneText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Pick contact"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stepOne" />
|
||||
|
||||
<View
|
||||
android:id="@+id/stepConnector"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="16dp"
|
||||
android:alpha="0.5"
|
||||
android:background="@color/briar_accent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/stepOne"
|
||||
app:layout_constraintEnd_toStartOf="@+id/stepTwo"
|
||||
app:layout_constraintStart_toEndOf="@+id/stepOne"
|
||||
app:layout_constraintTop_toTopOf="@+id/stepOne" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stepTwo"
|
||||
style="@style/StepBubble.Upcoming"
|
||||
android:text="@string/step_2"
|
||||
app:layout_constraintBottom_toTopOf="@+id/stepTwoText"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline"
|
||||
app:layout_constraintTop_toTopOf="@+id/stepOne"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stepTwoText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:alpha="0.5"
|
||||
android:text="Wait for setup"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stepTwo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/discoveryText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:text="Pick the nearby contact to perform the setup with."
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/contacts"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/stepOneText" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/contacts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginVertical="32dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/continueButton"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/discoveryText" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/continueButton"
|
||||
style="@style/BriarButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:enabled="false"
|
||||
android:text="@string/continue_button"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:enabled="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/commentTextView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="148dp"
|
||||
android:layout_marginLeft="148dp"
|
||||
android:layout_marginTop="124dp"
|
||||
android:text="list of all [contact-name-and-avatar]"
|
||||
android:textColor="@color/briar_red_500"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/margin_large">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/stepOne"
|
||||
style="@style/StepBubble.Completed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/stepOneText"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stepOneText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Pick contact"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideline"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stepOne" />
|
||||
|
||||
<View
|
||||
android:id="@+id/stepConnector"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@color/briar_accent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/stepOne"
|
||||
app:layout_constraintEnd_toStartOf="@+id/stepTwo"
|
||||
app:layout_constraintStart_toEndOf="@+id/stepOne"
|
||||
app:layout_constraintTop_toTopOf="@+id/stepOne" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stepTwo"
|
||||
style="@style/StepBubble"
|
||||
android:text="@string/step_2"
|
||||
app:layout_constraintBottom_toTopOf="@+id/stepTwoText"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline"
|
||||
app:layout_constraintTop_toTopOf="@+id/stepOne"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stepTwoText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:text="Wait for setup"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stepTwo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pendingText"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:textSize="16sp"
|
||||
android:text="Waiting for a connection to be established with:\n\n[chosen contact-name-and-avatar]"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/stepOneText" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/doneButton"
|
||||
style="@style/BriarButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Done"
|
||||
android:enabled="false"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView 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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/margin_large">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/diagram"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:paddingBottom="@dimen/margin_large"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/bluetooth"
|
||||
app:layout_constraintBottom_toTopOf="@id/explanationText"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/explanationText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left|start"
|
||||
android:text="To be able to communicate over Bluetooth with contacts that were previously added at a distance, Briar needs to learn the Bluetooth address of your device. This only needs to be done once.\n\nTo accomplish this, you need to have one of your contacts nearby to perform the Bluetooth Setup.\n\nBefore you start the setup, your contact also needs bring up the Bluetooth Setup screen by navigating [here-and-here].\n\nNote: Bluetooth Pairing is not a required part of the setup."
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/startButton"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/diagram" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/startButton"
|
||||
style="@style/BriarButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:enabled="false"
|
||||
android:text="Start"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
tools:enabled="true" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
@@ -8,13 +7,20 @@
|
||||
android:icon="@drawable/ic_nearby"
|
||||
android:orderInCategory="3"
|
||||
android:title="@string/add_contact_nearby_title"
|
||||
app:showAsAction="never"/>
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_contact_remotely"
|
||||
android:icon="@drawable/ic_link_menu"
|
||||
android:orderInCategory="2"
|
||||
android:title="@string/add_contact_remotely_title"
|
||||
app:showAsAction="never"/>
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_bluetooth_setup"
|
||||
android:icon="@drawable/ic_link_menu"
|
||||
android:orderInCategory="4"
|
||||
android:title="Bluetooth setup"
|
||||
app:showAsAction="never" />
|
||||
|
||||
</menu>
|
||||
|
||||
Reference in New Issue
Block a user