Skip to content

Instantly share code, notes, and snippets.

@dittos
Created July 8, 2013 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dittos/5948623 to your computer and use it in GitHub Desktop.
Save dittos/5948623 to your computer and use it in GitHub Desktop.
private void resetBitrate()
{
if (this.mWifiConnected)
{
sCurrentBitrate.set(512);
return;
}
if (this.mEthernetConnected)
{
sCurrentBitrate.set(512);
return;
}
if (this.mMobileConnected)
{
if (this.mConnectivityType == 6)
{
sCurrentBitrate.set(256);
return;
}
switch (this.mConnectedMobileDataType)
{
default:
sCurrentBitrate.set(96);
return;
case 1:
case 2:
case 11:
sCurrentBitrate.set(64);
return;
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 12:
case 14:
sCurrentBitrate.set(192);
return;
case 13:
}
sCurrentBitrate.set(256);
return;
}
sCurrentBitrate.set(96);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment