The Android Open Source Project | de2d9f5 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 1 | package com.android.settings; |
| 2 | |
| 3 | import android.provider.Telephony; |
| 4 | import static android.provider.Telephony.Intents.SECRET_CODE_ACTION; |
| 5 | |
| 6 | import android.content.Context; |
| 7 | import android.content.Intent; |
| 8 | import android.content.BroadcastReceiver; |
| 9 | import android.util.Config; |
| 10 | import android.util.Log; |
| 11 | import android.view.KeyEvent; |
| 12 | |
| 13 | |
| 14 | public class TestingSettingsBroadcastReceiver extends BroadcastReceiver { |
| 15 | |
| 16 | public TestingSettingsBroadcastReceiver() { |
| 17 | } |
| 18 | |
| 19 | @Override |
| 20 | public void onReceive(Context context, Intent intent) { |
| 21 | if (intent.getAction().equals(SECRET_CODE_ACTION)) { |
| 22 | Intent i = new Intent(Intent.ACTION_MAIN); |
| 23 | i.setClass(context, TestingSettings.class); |
| 24 | i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| 25 | context.startActivity(i); |
| 26 | } |
| 27 | } |
| 28 | } |