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