Skip to content

Commit 0c9467e

Browse files
committed
The given administrator component is currently not active and disabled on the system.
The given administrator component is currently not active and disabled on the system.
1 parent 4de1671 commit 0c9467e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

app/src/main/java/com/prey/backwardcompatibility/FroyoSupport.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.prey.PreyConfig;
1818
import com.prey.PreyLogger;
1919
import com.prey.PreyUtils;
20+
import com.prey.R;
2021
import com.prey.exceptions.PreyException;
2122
import com.prey.json.actions.Lock;
2223
import com.prey.receivers.PreyDeviceAdmin;
@@ -122,9 +123,11 @@ public Intent getAskForAdminPrivilegesIntent() {
122123
return intent;
123124
}
124125

125-
public void wipe() {
126+
public void wipe() throws Exception {
126127
if (isAdminActive())
127128
policyManager.wipeData(0);
129+
else
130+
throw new Exception(ctx.getString(R.string.administrator_disabled));
128131
}
129132

130133
public static boolean supportSMS(Context ctx) {

app/src/main/res/values-es/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,4 +377,5 @@
377377

378378
<string name="restriction_title_setup_key">Clave de configuración</string>
379379
<string name="restriction_description_setup_key">Clave de cuenta</string>
380+
<string name="administrator_disabled">El componente de administrador dado no está actualmente activo y deshabilitado en el sistema.</string>
380381
</resources>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,4 +383,5 @@
383383

384384
<string name="restriction_title_setup_key">Setup key</string>
385385
<string name="restriction_description_setup_key">Account key</string>
386+
<string name="administrator_disabled">The given administrator component is not currently active disabled in the system.</string>
386387
</resources>

0 commit comments

Comments
 (0)