android更改暗码

在Contact应用程序下的SpecialCharSequenceMgr.java下的
static boolean handleSecretCode(Context context, String input) {
        // Secret codes are in the form *#*#<code>#*#*
        int len = input.length();
        if (len > 8 && input.startsWith("*#*#") && input.endsWith("#*#*")) {
            Intent intent = new Intent(Intents.SECRET_CODE_ACTION,
                    Uri.parse("android_secret_code://" + input.substring(4, len - 4)));
            context.sendBroadcast(intent);
            return true;
        }else if (input.equals("*998#"))
        {
        	Intent intent2 = new Intent();
        	intent2.setAction("com.android.phone.ACTION_FACTORY_MODE");
        	context.sendBroadcast(intent2);
        	return true;
        }

        return false;
    }

猜你喜欢

转载自ericchan2012.iteye.com/blog/1685699