Prevent deep sleep before asking for the PIN code (fixes registration)
This commit is contained in:
parent
6dbe07ba26
commit
2686706f60
@ -90,6 +90,11 @@ static int _openmoko_event(PhonePlugin * plugin, PhoneEvent event, ...)
|
|||||||
/* restore regular audio */
|
/* restore regular audio */
|
||||||
_event_mixer_set(plugin, "stereoout.state");
|
_event_mixer_set(plugin, "stereoout.state");
|
||||||
break;
|
break;
|
||||||
|
case PHONE_EVENT_FUNCTIONAL:
|
||||||
|
/* FIXME prevent deep sleep only optionally */
|
||||||
|
plugin->helper->queue(plugin->helper->phone,
|
||||||
|
"AT%SLEEP=2");
|
||||||
|
break;
|
||||||
case PHONE_EVENT_NOTIFICATION_OFF:
|
case PHONE_EVENT_NOTIFICATION_OFF:
|
||||||
/* FIXME implement */
|
/* FIXME implement */
|
||||||
break;
|
break;
|
||||||
@ -116,11 +121,6 @@ static int _openmoko_event(PhonePlugin * plugin, PhoneEvent event, ...)
|
|||||||
case PHONE_EVENT_VIBRATOR_ON:
|
case PHONE_EVENT_VIBRATOR_ON:
|
||||||
_event_vibrator(plugin, TRUE);
|
_event_vibrator(plugin, TRUE);
|
||||||
break;
|
break;
|
||||||
case PHONE_EVENT_SIM_VALID:
|
|
||||||
/* prevent deep sleep */
|
|
||||||
plugin->helper->queue(plugin->helper->phone,
|
|
||||||
"AT%SLEEP=2");
|
|
||||||
break;
|
|
||||||
default: /* not relevant */
|
default: /* not relevant */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -170,7 +170,11 @@ static int _event_power_on(PhonePlugin * plugin, gboolean power)
|
|||||||
snprintf(buf, sizeof(buf), "%s: %s", path, strerror(errno));
|
snprintf(buf, sizeof(buf), "%s: %s", path, strerror(errno));
|
||||||
ret = plugin->helper->error(NULL, buf, 1);
|
ret = plugin->helper->error(NULL, buf, 1);
|
||||||
}
|
}
|
||||||
close(fd);
|
if(close(fd) != 0)
|
||||||
|
{
|
||||||
|
snprintf(buf, sizeof(buf), "%s: %s", path, strerror(errno));
|
||||||
|
ret = plugin->helper->error(NULL, buf, 1);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user