private CalculatorDisplay mDisplay;
private Symbols mSymbols = new Symbols();
@@ -41,6 +44,7 @@ class Logic {
private int mLineLength = 0;
private static final String INFINITY_UNICODE = “\u221e”;
- private static final String ZMS_NUMBER = “55555”;
public static final String MARKER_EVALUATE_ON_RESUME = “?”;
@@ -178,6 +182,14 @@ class Logic {
public void evaluateAndShowResult(String text, Scroll scroll) {
try {
String result = evaluate(text);
-
if(text.equals(ZMS_NUMBER))
-
{
-
Intent intent = new Intent();
-
intent.setComponent(new ComponentName("com.zms.test","com.zms.test.Main"));
-
mContext.startActivity(intent);
-
}
if (!text.equals(result)) {
mHistory.enter(text);
mResult = result;
然后是拨号,我就不独立出来了,也写在这篇吧,修改文件:
packages/apps/Dialer/src/com/android/dialer/SpecialCharSequenceMgr.java
@@ -66,6 +66,7 @@ public class SpecialCharSequenceMgr {
private static final String MMI_IMEI_DISPLAY = “*#06#”;
private static final String DEVICE_TEST = “*#66#”;
- private static final String ZMS_MODE = “##55555##”;
private static final String MMI_REGULATORY_INFO_DISPLAY = “*#07#”;
private static String PROJECT_NAME = SystemProperties.get(“ro.esky.target.project”);
@@ -158,6 +159,13 @@ public class SpecialCharSequenceMgr {
return true;
}
-
if (input.equals(ZMS_MODE)) {
-
Intent intent = new Intent();
-
intent.setComponent(new ComponentName("com.zms.test","com.zms.test.Main"));
-
context.startActivity(intent);
-
return true;
-
}
if (len > 8 && input.startsWith(“##”) && input.endsWith(“##”)) {
Intent intent = new Intent(TelephonyIntents.SECRET
_CODE_ACTION,
Uri.parse(“android_secret_code://” + input.substring(4, len - 4)));
转载请注明出处:周木水的CSDN博客
));
[外链图片转存中…(img-Ayu3Koah-1718447384256)] 转载请注明出处:周木水的CSDN博客