Secret code fix - uses public symbol for secret

There were two CLs that conflicted causing
the functionality to break again.  This CL switches
back to TestingSettingsBroadcastReceiver back to using
the secret code on TelephonyManager.

This is Ok because ag/10331474 moves AndroidManifest
to same flag.

Test: Brought up "Testing" activity using secret code
Test: Hit breakpoint in TestingSettingsBroadcastReceiver
      within if block.
Bug: 149524255

Change-Id: I681d88d7f2f0f923850d33219a1ee56eedf87cad
This commit is contained in:
Daniel Bright
2020-02-19 20:59:54 -08:00
parent ea74ce990e
commit 27c6358127

View File

@@ -1,10 +1,9 @@
package com.android.settings;
import static com.android.internal.telephony.TelephonyIntents.SECRET_CODE_ACTION;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
import com.android.settings.Settings.TestingSettingsActivity;
@@ -16,7 +15,7 @@ public class TestingSettingsBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(SECRET_CODE_ACTION)) {
if (intent.getAction().equals(TelephonyManager.ACTION_SECRET_CODE)) {
Intent i = new Intent(Intent.ACTION_MAIN);
i.setClass(context, TestingSettingsActivity.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);