Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5500240 authored by Danesh Mondegarian's avatar Danesh Mondegarian Committed by Michael Bestas
Browse files

CM PlatLogo: CyanogenMod version preference (2/2)

Binds the CyanogenMod version preference to launch CM easter egg
upon multiple taps.

Change-Id: I8e06642944d24581c0932c9964f2d9615bfcb832
parent a2246fbd
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -297,6 +297,20 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
            if (b.getBoolean(CarrierConfigManager.KEY_CI_ACTION_ON_SYS_UPDATE_BOOL)) {
                ciActionOnSysUpdate(b);
            }
        } else if (preference.getKey().equals(KEY_MOD_VERSION)) {
            System.arraycopy(mHits, 1, mHits, 0, mHits.length-1);
            mHits[mHits.length-1] = SystemClock.uptimeMillis();
            if (mHits[0] >= (SystemClock.uptimeMillis()-500)) {
                Intent intent = new Intent(Intent.ACTION_MAIN);
                intent.putExtra("is_cm", true);
                intent.setClassName("android",
                        com.android.internal.app.PlatLogoActivity.class.getName());
                try {
                    startActivity(intent);
                } catch (Exception e) {
                    Log.e(LOG_TAG, "Unable to start activity " + intent.toString());
                }
            }
        }
        return super.onPreferenceTreeClick(preferenceScreen, preference);
    }