1 package com.android.settings; 2 3 import android.content.BroadcastReceiver; 4 import android.content.Context; 5 import android.content.Intent; 6 7 import static com.android.internal.telephony.TelephonyIntents.SECRET_CODE_ACTION; 8 9 import com.android.settings.Settings.TestingSettingsActivity; 10 11 12 public class TestingSettingsBroadcastReceiver extends BroadcastReceiver { 13 TestingSettingsBroadcastReceiver()14 public TestingSettingsBroadcastReceiver() { 15 } 16 17 @Override onReceive(Context context, Intent intent)18 public void onReceive(Context context, Intent intent) { 19 if (intent.getAction().equals(SECRET_CODE_ACTION)) { 20 Intent i = new Intent(Intent.ACTION_MAIN); 21 i.setClass(context, TestingSettingsActivity.class); 22 i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 23 context.startActivity(i); 24 } 25 } 26 } 27