Remix.run Logo
NooneAtAll3 4 days ago

How can one hide from git blame?

TheDong 4 days ago | parent [-]

You can't hide from the pickaxe

    $ git log --oneline -SKEY_INFLATE_SIGNAL_STRENGTH_BOOL | tail
gets us the commit [0] from 2020 where config_inflateSignalStrength was renamed to KEY_INFLATE_SIGNAL_STRENGTH_BOOL

    $ git log --oneline -Sconfig_inflateSignalStrength | tail
gets us this commit [1] from 2017 where it was originally added:

    43c14d198479 Add config to artificially inflate number of bars

[0]: https://android.googlesource.com/platform//frameworks/base/+...

[1]: https://android.googlesource.com/platform//frameworks/base/+...

lovelearning 4 days ago | parent | next [-]

The 2017 commit has these code changes:

     private int getNumLevels() {
        if (mConfig.inflateSignalStrengths) {
            return SignalStrength.NUM_SIGNAL_STRENGTH_BINS + 1;
        }
         return SignalStrength.NUM_SIGNAL_STRENGTH_BINS;
     }
  
  ...
  
         } else if (mCurrentState.connected) {
            int level = mCurrentState.level;
            if (mConfig.inflateSignalStrengths) {
                level++;
            }
            return SignalDrawable.getState(level, getNumLevels(),
                     mCurrentState.inetCondition == 0);  
      
If the flag is true, bump up BOTH the reported level as well as the total number of bins.

If the flag is false, use reported level and default number of bins.

Since both numerator and denominator are bumped up, is it really malicious?

Based on this commit at least, personally, I feel such logic could be due to a decision to shift from levels starting from 0 to levels starting from 1 at the UI level.

Or perhaps to make levels consistent between different operators, some of whom were using 0-based while others used 1-based.

I haven't gone through later commits or latest versions. So my opinion's limited just to this original 2017 change.

iso1631 4 days ago | parent | next [-]

> Since both numerator and denominator are bumped up, is it really malicious?

2 bins out of 4 suggests 25%-50%

3 bins out of 5 suggests 40%-60%

Towaway69 4 days ago | parent | prev [-]

`KEY_INFLATE_SIGNAL_STRENGTH_BOOL`

Hm - what is the word 'INFLATE' doing there?

I would like to believe your opinion but that word INFLATE makes it hard ...

If it is a UI correction, then surely it would have had a different name: ENSURE_SIGNAL_IS_ONE_BASED ... ;)

userbinator 4 days ago | parent | prev | next [-]

I'm surprised they even display the name and email of the person responsible for doing it. If I were forced to make such a change that I knew would be publicly displayed, I'd do everything possible to disclaim it (such as mentioning the one who actually requested it.)

saagarjha 4 days ago | parent | next [-]

This has happened before: https://android.googlesource.com/platform/packages/apps/Glob...

integralid 4 days ago | parent | prev | next [-]

"I only added the configuration option, I'm not the one enabling it"

lifestyleguru 4 days ago | parent | prev [-]

"I was only following the orders and it made me famous."

NooneAtAll3 4 days ago | parent | prev [-]

I applaud your inventiveness

(but I still would love to know how does one hide from git blame)

(file renaming?)