Skip to content

Instantly share code, notes, and snippets.

@flaviocdc
Created June 15, 2011 02:46
Show Gist options
  • Save flaviocdc/1026383 to your computer and use it in GitHub Desktop.
Save flaviocdc/1026383 to your computer and use it in GitHub Desktop.
Motorola's readLidState()
void readLidState()
{
int k;
while (true)
{
try
{
int i = this.mWindowManager.getSwitchState(0);
if (mTableTopModeSupport)
continue;
if (i < 0)
return;
if (i != 0)
continue;
j = 1;
this.mLidState = j;
return;
j = 0;
continue;
k = this.mWindowManager.getSwitchState(1);
if (i != 0)
break;
if (k == 0)
{
j = 2;
this.mLidState = j;
return;
}
}
catch (RemoteException localRemoteException)
{
return;
}
j = 1;
}
if (k == 0);
for (int j = 0; ; j = this.mLidState)
{
this.mLidState = j;
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment