mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Adapt hotspot buttons to latest design and add a nullability annotation
This commit is contained in:
committed by
Sebastian Kürten
parent
d6f985174a
commit
cbdbd10cb3
@@ -10,6 +10,7 @@ import org.briarproject.briar.R;
|
|||||||
|
|
||||||
import androidx.activity.result.ActivityResult;
|
import androidx.activity.result.ActivityResult;
|
||||||
import androidx.activity.result.ActivityResultLauncher;
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
@@ -106,7 +107,7 @@ class ConditionManager {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void onRequestPermissionResult(Boolean granted) {
|
void onRequestPermissionResult(@Nullable Boolean granted) {
|
||||||
if (granted != null && granted) {
|
if (granted != null && granted) {
|
||||||
locationPermission = Permission.GRANTED;
|
locationPermission = Permission.GRANTED;
|
||||||
} else if (shouldShowRequestPermissionRationale(ctx,
|
} else if (shouldShowRequestPermissionRationale(ctx,
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/fallbackButton"
|
android:id="@+id/fallbackButton"
|
||||||
style="@style/BriarButton"
|
style="@style/BriarButtonFlat.Positive"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
|
|||||||
@@ -76,15 +76,15 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/stopButton"
|
android:id="@+id/stopButton"
|
||||||
style="@style/BriarButton"
|
style="@style/BriarButtonFlat.Negative"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
android:text="@string/hotspot_button_stop_sharing"
|
android:text="@string/hotspot_button_stop_sharing"
|
||||||
app:backgroundTint="@color/briar_red_500"
|
|
||||||
app:drawableLeftCompat="@drawable/ic_portable_wifi_off"
|
app:drawableLeftCompat="@drawable/ic_portable_wifi_off"
|
||||||
app:drawableStartCompat="@drawable/ic_portable_wifi_off"
|
app:drawableStartCompat="@drawable/ic_portable_wifi_off"
|
||||||
app:drawableTint="@color/button_text"
|
app:drawableTint="@color/briar_red_500"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|||||||
@@ -700,7 +700,7 @@
|
|||||||
<string name="hotspot_progress_text_start">Setting up hotspot…</string>
|
<string name="hotspot_progress_text_start">Setting up hotspot…</string>
|
||||||
<string name="hotspot_notification_channel_title">Wi-Fi hotspot</string>
|
<string name="hotspot_notification_channel_title">Wi-Fi hotspot</string>
|
||||||
<string name="hotspot_notification_title">Sharing Briar offline</string>
|
<string name="hotspot_notification_title">Sharing Briar offline</string>
|
||||||
<string name="hotspot_button_connected">Confirm connection</string>
|
<string name="hotspot_button_connected">Start app sharing</string>
|
||||||
|
|
||||||
<string name="permission_hotspot_location_request_body">To create a Wi-Fi hotspot, Briar needs permission to access your location.\n\nBriar does not store your location or share it with anyone.</string>
|
<string name="permission_hotspot_location_request_body">To create a Wi-Fi hotspot, Briar needs permission to access your location.\n\nBriar does not store your location or share it with anyone.</string>
|
||||||
<string name="permission_hotspot_location_denied_body">You have denied access to your location, but Briar needs this permission to create a Wi-Fi hotspot.\n\nPlease consider granting access.</string>
|
<string name="permission_hotspot_location_denied_body">You have denied access to your location, but Briar needs this permission to create a Wi-Fi hotspot.\n\nPlease consider granting access.</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user