diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-03-05 17:10:19 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-03-05 17:10:19 +0000 |
| commit | 91568eb50eca16beb07dfa97525b6072aa6d64bf (patch) | |
| tree | 5e3a6e285d967b2f8ba7c7303dcde191c24ac99f /core/java | |
| parent | 53107b6e79c2680e3a7146c005143121ce07da36 (diff) | |
| parent | 196bafdc64d3a4062ead108d6c871773c5ec722c (diff) | |
Merge "Clean up dead code in NetInitiatedActivity" into rvc-qpr-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/com/android/internal/app/NetInitiatedActivity.java | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/core/java/com/android/internal/app/NetInitiatedActivity.java b/core/java/com/android/internal/app/NetInitiatedActivity.java index 92e9fe492442..5efeb0fc928e 100644 --- a/core/java/com/android/internal/app/NetInitiatedActivity.java +++ b/core/java/com/android/internal/app/NetInitiatedActivity.java @@ -17,18 +17,14 @@ package com.android.internal.app; import android.app.AlertDialog; -import android.compat.annotation.UnsupportedAppUsage; -import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; -import android.content.IntentFilter; import android.location.LocationManagerInternal; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; -import android.widget.Toast; import com.android.internal.R; import com.android.internal.location.GpsNetInitiatedHandler; @@ -43,7 +39,6 @@ public class NetInitiatedActivity extends AlertActivity implements DialogInterfa private static final String TAG = "NetInitiatedActivity"; private static final boolean DEBUG = true; - private static final boolean VERBOSE = false; private static final int POSITIVE_BUTTON = AlertDialog.BUTTON_POSITIVE; private static final int NEGATIVE_BUTTON = AlertDialog.BUTTON_NEGATIVE; @@ -55,17 +50,6 @@ public class NetInitiatedActivity extends AlertActivity implements DialogInterfa private int default_response = -1; private int default_response_timeout = 6; - /** Used to detect when NI request is received */ - private BroadcastReceiver mNetInitiatedReceiver = new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - if (DEBUG) Log.d(TAG, "NetInitiatedReceiver onReceive: " + intent.getAction()); - if (intent.getAction() == GpsNetInitiatedHandler.ACTION_NI_VERIFY) { - handleNIVerify(intent); - } - } - }; - private final Handler mHandler = new Handler() { public void handleMessage(Message msg) { switch (msg.what) { @@ -109,14 +93,12 @@ public class NetInitiatedActivity extends AlertActivity implements DialogInterfa protected void onResume() { super.onResume(); if (DEBUG) Log.d(TAG, "onResume"); - registerReceiver(mNetInitiatedReceiver, new IntentFilter(GpsNetInitiatedHandler.ACTION_NI_VERIFY)); } @Override protected void onPause() { super.onPause(); if (DEBUG) Log.d(TAG, "onPause"); - unregisterReceiver(mNetInitiatedReceiver); } /** @@ -141,17 +123,4 @@ public class NetInitiatedActivity extends AlertActivity implements DialogInterfa LocationManagerInternal lm = LocalServices.getService(LocationManagerInternal.class); lm.sendNiResponse(notificationId, response); } - - @UnsupportedAppUsage - private void handleNIVerify(Intent intent) { - int notifId = intent.getIntExtra(GpsNetInitiatedHandler.NI_INTENT_KEY_NOTIF_ID, -1); - notificationId = notifId; - - if (DEBUG) Log.d(TAG, "handleNIVerify action: " + intent.getAction()); - } - - private void showNIError() { - Toast.makeText(this, "NI error" /* com.android.internal.R.string.usb_storage_error_message */, - Toast.LENGTH_LONG).show(); - } } |
