Tag-Archive for » google «

Monday, May 10th, 2010 | Author: Tim

Much similar to a previous post I had, “Brutal” Google coding humor…, I was perusing over some code in the AOSP and found an interesting comment:

// XXX: PROTECT FROM VIKING KILLER

Below is the full snippet from the file, logwrapper.c.

void child(int argc, char* argv[]) {
    // create null terminated argv_child array
    char* argv_child[argc + 1];
    memcpy(argv_child, argv, argc * sizeof(char *));
    argv_child[argc] = NULL;

    // XXX: PROTECT FROM VIKING KILLER
    if (execvp(argv_child[0], argv_child)) {
        LOG(LOG_ERROR, "logwrapper",
            "executing %s failed: %s", argv_child[0], strerror(errno));
        exit(-1);
    }
}

I’m not sure if “Viking Killer” is an inside joke, an actual good comment or what. Though read allowed - it sounds like a badly named european adult film…

Monday, March 22nd, 2010 | Author: Tim

Today I was skimming over a few pieces of the AOSP and found the following comment to be hilarious:

Determine whether it is a good time to kill, crash, or otherwise plunder the current situation for the overall long-term benefit of the world.

Below is the full snippet from the file, Watchdog.java.

    /**
     * Load the current Gservices settings for when
     * {@link #shouldWeBeBrutalLocked} will allow the brutality to happen.
     * Must not be called with the lock held.
     */
    void retrieveBrutalityAmount() {
        mMinScreenOff = (mReqMinScreenOff >= 0 ? mReqMinScreenOff
                : Settings.Gservices.getInt(
                mResolver, Settings.Gservices.MEMCHECK_MIN_SCREEN_OFF,
                MEMCHECK_DEFAULT_MIN_SCREEN_OFF)) * 1000;
        mMinAlarm = (mReqMinNextAlarm >= 0 ? mReqMinNextAlarm
                : Settings.Gservices.getInt(
                mResolver, Settings.Gservices.MEMCHECK_MIN_ALARM,
                MEMCHECK_DEFAULT_MIN_ALARM)) * 1000;
    }

    /**
     * Determine whether it is a good time to kill, crash, or otherwise
     * plunder the current situation for the overall long-term benefit of
     * the world.
     *
     * @param curTime The current system time.
     * @return Returns null if this is a good time, else a String with the
     * text of why it is not a good time.
     */
    String shouldWeBeBrutalLocked(long curTime) {
        if (mBattery == null || !mBattery.isPowered()) {
            return "battery";
        }

        if (mMinScreenOff >= 0 && (mPower == null ||
                mPower.timeSinceScreenOn() < mMinScreenOff)) {
            return "screen";
        }

        if (mMinAlarm >= 0 && (mAlarm == null ||
                mAlarm.timeToNextAlarm() < mMinAlarm)) {
            return "alarm";
        }

        return null;
    }

Just some mild humor to lighten up the day is always nice :)

Saturday, May 02nd, 2009 | Author: Tim

Mmmmm... Market Data...

Mmmmm... Market Data...


Your Ad Here
Success! After many, many man hours - finally it’s been completed. Strangely enough, it’s actually much simpler that I ever thought it would be. Sort of makes me feel silly for not thinking about the easy solutions first. Though, that wouldn’t be fun if we always did the easy steps before the grunt work…

Anyway, my friend Andrea of at Androidiani.com and I have been trying to do some research into purchasing of applications on the market. Since Andrea is in Italy, he can’t purchase apps, so we’ve been trying to resolve this for him!

To wet your lips, we’ve figured out a way to make it work and Andrea has wiped up a program to easy the process. Below is a quick image to show it off :)

Market Enabler

Market Enabler


Here is a quick screen shot of his Italian G1 looking at paid apps (you’ll have to take our word on this for now)
Paid apps on an italian G1

Paid apps on an italian G1


Andrea plans to release this application tomorrow on his site, Androidiani.com. After his posting, I will be posting an english version here, with the source and hopefully around the same time a paper explaining what we did, how we did it and how the program actually works.

Until then, ciao!

Original source of images and post located at Androidiani.com, english translation via google-translate here.