blob: 2172cd07d6006f85fc572d31479685bcb4a589f1 [file] [log] [blame]
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -08001package com.android.settings;
2
Fan Zhangc7162cd2018-06-18 15:21:41 -07003import static com.android.internal.telephony.TelephonyIntents.SECRET_CODE_ACTION;
4
Jason Monk39b46742015-09-10 15:52:51 -04005import android.content.BroadcastReceiver;
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -08006import android.content.Context;
7import android.content.Intent;
Jason Monk39b46742015-09-10 15:52:51 -04008
Jason Monkb7e43802016-06-06 16:01:58 -04009import com.android.settings.Settings.TestingSettingsActivity;
10
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080011
12public class TestingSettingsBroadcastReceiver extends BroadcastReceiver {
13
14 public TestingSettingsBroadcastReceiver() {
15 }
16
17 @Override
18 public void onReceive(Context context, Intent intent) {
19 if (intent.getAction().equals(SECRET_CODE_ACTION)) {
20 Intent i = new Intent(Intent.ACTION_MAIN);
Jason Monkb7e43802016-06-06 16:01:58 -040021 i.setClass(context, TestingSettingsActivity.class);
The Android Open Source Projectafc4ab22009-03-03 19:32:34 -080022 i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
23 context.startActivity(i);
24 }
25 }
26}