`

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;
    }
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics