package/app/Settings/AndroidManifest.xml
<receiver android:name="com.android.settings.CustomizeScretCodeReceiver"
android:exported="true">
<intent-filter >
<action android:name="android.provider.Telephony.SECRET_CODE" />
<data android:scheme="android_secret_code" android:host="1260"/>
</intent-filter>
</receiver>
com.android.settings.CustomizeScretCodeReceiver.java
package com.android.settings;
import android.content.Context;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
import android.widget.Checkable;
import android.widget.LinearLayout;
import android.content.Intent;
import android.util.Log;
import android.content.BroadcastReceiver;
import android.net.Uri;
public class CustomizeScretCodeReceiver extends BroadcastReceiver {
private final String TAG = "CustomizeScretCodeReceiver";
private final String SECRET_CODE = "android.provider.Telephony.SECRET_CODE";
private final Uri mInformationUri = Uri.parse("android_secret_code://1260");
//重写onReceive方法
// @SuppressLint("LongLogTag")
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if ("android.provider.Telephony.SECRET_CODE".equals(intent.getAction())) {
String host = intent.getData().getHost();
// Intent traIn = new Intent();
if (host.equals("1260")) {
android.util.Log.d("szyszy","ininininini");
try {
Intent intent1 = new Intent("com.udroid.intent.action.AGEING_DEVICE");
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
} catch (Exception e) {
Log.d(TAG, "intent start error");
}
}
}
}
}
拨号盘暗码
最新推荐文章于 2026-06-19 11:28:59 发布

2178

被折叠的 条评论
为什么被折叠?



