diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 35d497aedbc533e9046de663d2b709ccda1f9871..8fe587bbd8bac81eb007bbee4d389404807ff43b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -308,6 +308,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/setup_find_my_device.xml b/res/layout/setup_find_my_device.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6532057271480f792c053cce6e3f82ec4b037886
--- /dev/null
+++ b/res/layout/setup_find_my_device.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/raw/lineage_wizard_script.xml b/res/raw/lineage_wizard_script.xml
index 40d99a439830bbf4666ff07979b8af6c4cd08c3d..679bd659faeaaf6094901a18c81c7e0e89a28c9f 100644
--- a/res/raw/lineage_wizard_script.xml
+++ b/res/raw/lineage_wizard_script.xml
@@ -79,6 +79,12 @@
+
+
+
+
diff --git a/res/values-de/e_strings.xml b/res/values-de/e_strings.xml
index 4bf83e2ae7f610ff5097f06831b5f5a9ea1f82aa..246c145e2331c36c84518bfa756b13f5463e9fee 100644
--- a/res/values-de/e_strings.xml
+++ b/res/values-de/e_strings.xml
@@ -27,4 +27,9 @@
Elternaufsicht aktivierenElternaufsicht einstellenDiese App bietet einen Schutz gegen unangemessene Inhalte für Ihre Kinder und Jugendliche. Sie können diese Funktion aktivieren, wenn Sie Ihr Gerät den Kindern leihen oder wenn das Gerät für sie bestimmt ist. Für mehr Informationen besuchen Sie bitte
+
+ Find my Device aktivieren
+ Find my Device einrichten
+ Find my Device hilft Ihnen, den Standort dieses Telefons zu ermitteln, falls Sie es verlegt haben.
+ Erstellen Sie einen Geheimcode und senden Sie ihn einfach per SMS an dieses Gerät. Es antwortet automatisch mit den Koordinaten Ihres Telefons.
\ No newline at end of file
diff --git a/res/values-es/e_strings.xml b/res/values-es/e_strings.xml
index a93ffd2d8a3e0b09b500e267eac84d7c0962de5e..d36b92bfc7f9aa19cc3f9b0aa2eb4bd64546348e 100644
--- a/res/values-es/e_strings.xml
+++ b/res/values-es/e_strings.xml
@@ -24,4 +24,9 @@
Iniciar sesiónInicia sesión con tu ID de e.email o murena.io para conectar tu cuenta personal con este teléfono. Esto te permitirá sincronizar tus correos electrónicos, contactos, calendario, imágenes, vídeos, notas y tareas entre este teléfono y tu nube personal.Sincroniza tu cuenta en la nube
+
+ Activar Find my Device
+ Configurar Find my Device
+ Find my Device le ayudará a localizar este teléfono en caso de pérdida.
+ Genere un código secreto y envíelo simplemente por SMS a este dispositivo; responderá automáticamente con las coordenadas de su teléfono.
\ No newline at end of file
diff --git a/res/values-fr/e_strings.xml b/res/values-fr/e_strings.xml
index f6dc02dc0f4c27b94620ca4874bfa0169304dd96..c338677bc4c5c40d311f6e794627a8188a53e093 100644
--- a/res/values-fr/e_strings.xml
+++ b/res/values-fr/e_strings.xml
@@ -26,5 +26,9 @@
Mettre à jour le RecoveryCette application propose une protection contre les contenus inappropriés pour vos enfants et adolescents. Vous pouvez activer cette fonctionnalité quand vous prêtez votre téléphone à votre enfant ou si cela est leur appareil. Pour en savoir plus à ce sujet, veuillez aller surParamétrez le Contrôle Parental
- Activez le Contrôle Parental
+
+ Activer Find my Device
+ Configurer Find my Device
+ Find my Device vous aidera à retrouver l\'emplacement de ce téléphone en cas de perte.
+ Générez un code secret, envoyez-le simplement à cet appareil par SMS, et il répondra automatiquement avec les coordonnées de votre téléphone.
\ No newline at end of file
diff --git a/res/values-it/e_strings.xml b/res/values-it/e_strings.xml
index b69860cbc5bd08939fb2c2235ffcb90f5fd71ea0..73fd25e577c5355740c0735a68e63bdd22fd9fc9 100644
--- a/res/values-it/e_strings.xml
+++ b/res/values-it/e_strings.xml
@@ -24,4 +24,9 @@
\n/e/OS
AccediCrea Account
+
+ Attiva Find my Device
+ Configura Find my Device
+ Find my Device ti aiuterà a individuare la posizione di questo telefono in caso di smarrimento.
+ Genera un codice segreto e invialo semplicemente tramite SMS a questo dispositivo; risponderà automaticamente al messaggio con le coordinate del tuo telefono.
\ No newline at end of file
diff --git a/res/values/e_strings.xml b/res/values/e_strings.xml
index ba1d0434ba503f40e27e7616987dc404753272e7..479d6de358ad0960de73f53b79c9c4feca5b00f0 100644
--- a/res/values/e_strings.xml
+++ b/res/values/e_strings.xml
@@ -27,4 +27,10 @@
Set up Parental ControlThis app offers protection against inappropriate content for your children and teenagers. You can activate this feature when lending your phone to your kid or if this is their device. To know more about it please go tohttps://doc.e.foundation/support-topics/parental-control
+
+
+ Activate Find my Device
+ Set up Find my Device
+ Find my device will help you reveal this phone\'s location in case you can\'t find it.
+ Generate a secret code and simply send it to this device via SMS and it will automatically reply to your message with your phone\'s coordinates.
\ No newline at end of file
diff --git a/src/org/lineageos/setupwizard/FindMyDeviceActivity.java b/src/org/lineageos/setupwizard/FindMyDeviceActivity.java
new file mode 100644
index 0000000000000000000000000000000000000000..8317c3a6e0c2de40674e70f19f657189e1d104c4
--- /dev/null
+++ b/src/org/lineageos/setupwizard/FindMyDeviceActivity.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2024 MURENA SAS
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.lineageos.setupwizard;
+
+import static org.lineageos.setupwizard.SetupWizardApp.FIND_MY_DEVICE_COMPONENTNAME;
+import static org.lineageos.setupwizard.SetupWizardApp.REQUEST_CODE_FIND_MY_DEVICE;
+
+import android.content.Intent;
+import android.net.Uri;
+import android.view.View;
+import android.os.Bundle;
+
+import android.util.Log;
+
+import org.lineageos.setupwizard.util.SetupWizardUtils;
+
+public class FindMyDeviceActivity extends SubBaseActivity {
+
+ public static final String TAG = FindMyDeviceActivity.class.getSimpleName();
+
+ private boolean hasTelephonySupport = true;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ if (!SetupWizardUtils.hasTelephony(this)) {
+ Log.v(TAG, "Has no telephony support");
+ hasTelephonySupport = false;
+ onNavigateNext();
+ return;
+ }
+
+ setNextText(R.string.skip);
+ }
+
+ @Override
+ public void onRestart() {
+ super.onRestart();
+
+ if (!hasTelephonySupport) {
+ onNavigateNext();
+ return;
+ }
+ }
+
+
+ @Override
+ protected void onStartSubactivity() {
+ setNextAllowed(true);
+ findViewById(R.id.activate_find_my_device).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Log.v(TAG, "lauch find my device");
+ launchFindMyDevice();
+ }
+ });
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if (data != null && data.getBooleanExtra("onBackPressed", false)) {
+ onStartSubactivity();
+ return;
+ // Check for back press
+ } else if(resultCode == RESULT_OK) {
+ onNavigateNext();
+ }
+ }
+
+ @Override
+ protected int getLayoutResId() {
+ return R.layout.setup_find_my_device;
+ }
+
+ @Override
+ protected int getTitleResId() {
+ return R.string.find_my_device_setup_title;
+ }
+
+ @Override
+ protected int getIconResId() {
+ return R.drawable.ic_find_my_device;
+ }
+
+ private void launchFindMyDevice() {
+ Intent intent = new Intent();
+ intent.setComponent(FIND_MY_DEVICE_COMPONENTNAME);
+ startActivityForResult(intent, REQUEST_CODE_FIND_MY_DEVICE);
+ }
+}
diff --git a/src/org/lineageos/setupwizard/SetupWizardApp.java b/src/org/lineageos/setupwizard/SetupWizardApp.java
index ade5b3226678067078cc5800aa952dd3b19dc4ad..41968206a5119f154f56b5a5595a2a72edb9273c 100644
--- a/src/org/lineageos/setupwizard/SetupWizardApp.java
+++ b/src/org/lineageos/setupwizard/SetupWizardApp.java
@@ -82,10 +82,12 @@ public class SetupWizardApp extends Application {
public static final int REQUEST_CODE_SETUP_ACCOUNT_TYPE_E = 11;
public static final int REQUEST_CODE_CREATE_E_ACCOUNT = 1;
public static final int REQUEST_CODE_PARENTAL_CONTROL = 12;
+ public static final int REQUEST_CODE_FIND_MY_DEVICE = 13;
public static final int RADIO_READY_TIMEOUT = 10 * 1000;
public static final ComponentName PARENTAL_COMPONENTNAME = new ComponentName("foundation.e.parentalcontrol", "foundation.e.parentalcontrol.MainActivity");
+ public static final ComponentName FIND_MY_DEVICE_COMPONENTNAME = new ComponentName("foundation.e.findmydevice", "foundation.e.findmydevice.activity.FindMyDeviceActivity");
private static StatusBarManager sStatusBarManager;