Friday, July 2, 2010

iPhone 4 Reception Issue Blamed on Software Algorithm Issue

Today Apple posted an open letter on their website stating that the apparent reception issues people are seeing with the "Death Grip" are caused by a bad algorithm they used for setting the number of bars.  I am sure this will fix a majority of the issues people are seeing, but who knows.

Here is the code I recommend for iOS 4.0.1 to fix the bug in the method for returning the number of bars to show.
public int getNumberOfBarsToDisplay(int signalStrengthDecibels)
{
    //if(signalStrengthDecibels < -113)
    //{
    //    return 0;
    //}
    //else if(signalStrengthDecibels < -107)
    //{
    //    return 1;
    //}

    //else if(signalStrengthDecibels < -103)
    //{
    //    return 2;
    //}
    //else if(signalStrengthDecibels < -101)
    //{
     //   return 3;
    //}
    //else if(signalStrengthDecibels < -91)
    //{
    //    return 4;
    //}
    //else
    {
        // Fix bug that was caused by the Death Grip.
        // Always return 5 bars.
        return 5;
    }
}

Here is the source for the decibel breakdown from AppleInsider, here.

No comments:

Post a Comment