Skip to content

Commit

Permalink
Move all devicelock stuff together, makes for easier reading with les…
Browse files Browse the repository at this point in the history
…s ifdefs

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Sep 13, 2013
1 parent 8909db2 commit 32a4d68
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/usb_moded.c
Expand Up @@ -179,10 +179,7 @@ void set_usb_connected_state(void)
log_debug("usb connected\n");
usb_moded_send_signal(USB_CONNECTED);
mode_to_set = get_mode_setting();
#ifdef MEEGOLOCK
/* check if we are allowed to export system contents 0 is unlocked */
export = usb_moded_get_export_permission();
#endif

if(rescue_mode)
{
log_debug("Entering rescue mode!\n");
Expand All @@ -201,6 +198,8 @@ void set_usb_connected_state(void)
return;
}
#ifdef MEEGOLOCK
/* check if we are allowed to export system contents 0 is unlocked */
export = usb_moded_get_export_permission();
/* We check also if the device is in user state or not.
If not we do not export anything. We presume ACT_DEAD charging */
if(mode_to_set && !export && is_in_user_state())
Expand Down

0 comments on commit 32a4d68

Please sign in to comment.