final fix
This commit is contained in:
parent
7bc3aa7ea8
commit
cd456411ba
3 changed files with 6 additions and 8 deletions
|
@ -29,7 +29,7 @@
|
|||
android:summary="@string/speed_limit_exceed_message"/>
|
||||
<CheckBoxPreference android:title="@string/show_zoom_buttons_navigation" android:summary="@string/show_zoom_buttons_navigation_descr" android:key="show_zoom_buttons_navigation" />
|
||||
<ListPreference
|
||||
android:key="wake_on_voice"
|
||||
android:key="wake_on_voice_int"
|
||||
android:title="@string/wake_on_voice"
|
||||
android:summary="@string/wake_on_voice_descr" />
|
||||
</PreferenceCategory>
|
||||
|
|
|
@ -931,12 +931,12 @@ public class OsmandSettings {
|
|||
}
|
||||
|
||||
// screen power save
|
||||
public final CommonPreference<Integer> WAKE_ON_VOICE = new IntPreference("wake_on_voice_int", 0).makeProfile();
|
||||
public final CommonPreference<Integer> WAKE_ON_VOICE_INT = new IntPreference("wake_on_voice_int", 0).makeProfile();
|
||||
{
|
||||
// 0 means never
|
||||
WAKE_ON_VOICE.setModeDefaultValue(ApplicationMode.CAR, 0);
|
||||
WAKE_ON_VOICE.setModeDefaultValue(ApplicationMode.BICYCLE, 0);
|
||||
WAKE_ON_VOICE.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0);
|
||||
WAKE_ON_VOICE_INT.setModeDefaultValue(ApplicationMode.CAR, 0);
|
||||
WAKE_ON_VOICE_INT.setModeDefaultValue(ApplicationMode.BICYCLE, 0);
|
||||
WAKE_ON_VOICE_INT.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0);
|
||||
}
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
|
|
|
@ -839,9 +839,7 @@ public class MapActivity extends AccessibleActivity implements
|
|||
if (screenPowerSave > 0) {
|
||||
if (mDevicePolicyManager.isAdminActive(mDeviceAdmin)) {
|
||||
try {
|
||||
if (settings.MAP_ACTIVITY_ENABLED.get()) {
|
||||
mDevicePolicyManager.lockNow();
|
||||
}
|
||||
mDevicePolicyManager.lockNow();
|
||||
} catch (SecurityException e) {
|
||||
// Log.d(TAG,
|
||||
// "SecurityException: No device admin permission to lock the screen!");
|
||||
|
|
Loading…
Reference in a new issue