summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2013-06-14 16:41:24 -0400
committerJohn Spurlock <jspurlock@google.com>2013-06-14 16:41:24 -0400
commit8a21278686b218af63c6e8e2a56b324da8b00db4 (patch)
tree72f29a118b7be17843fd4ccad08e26117332c42f /packages/SystemUI
parent77b7c33a7a4e79022529ae18e39789adbcc86159 (diff)
downloadframeworks_base-8a21278686b218af63c6e8e2a56b324da8b00db4.zip
frameworks_base-8a21278686b218af63c6e8e2a56b324da8b00db4.tar.gz
frameworks_base-8a21278686b218af63c6e8e2a56b324da8b00db4.tar.bz2
Remove unused CarrierLabel.
Change-Id: I145a7ee38655a957aec14fe7318092c42b3cb6cc
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CarrierLabel.java108
1 files changed, 0 insertions, 108 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CarrierLabel.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CarrierLabel.java
deleted file mode 100644
index 5ea17e7..0000000
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CarrierLabel.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2006 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.statusbar.phone;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.widget.TextView;
-
-import com.android.internal.telephony.TelephonyIntents;
-
-/**
- * This widget display an analogic clock with two hands for hours and
- * minutes.
- */
-public class CarrierLabel extends TextView {
- private boolean mAttached;
-
- public CarrierLabel(Context context) {
- this(context, null);
- }
-
- public CarrierLabel(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public CarrierLabel(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- updateNetworkName(false, null, false, null);
- }
-
- @Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
-
- if (!mAttached) {
- mAttached = true;
- IntentFilter filter = new IntentFilter();
- filter.addAction(TelephonyIntents.SPN_STRINGS_UPDATED_ACTION);
- getContext().registerReceiver(mIntentReceiver, filter, null, getHandler());
- }
- }
-
- @Override
- protected void onDetachedFromWindow() {
- super.onDetachedFromWindow();
- if (mAttached) {
- getContext().unregisterReceiver(mIntentReceiver);
- mAttached = false;
- }
- }
-
- private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if (TelephonyIntents.SPN_STRINGS_UPDATED_ACTION.equals(action)) {
- updateNetworkName(intent.getBooleanExtra(TelephonyIntents.EXTRA_SHOW_SPN, false),
- intent.getStringExtra(TelephonyIntents.EXTRA_SPN),
- intent.getBooleanExtra(TelephonyIntents.EXTRA_SHOW_PLMN, false),
- intent.getStringExtra(TelephonyIntents.EXTRA_PLMN));
- }
- }
- };
-
- void updateNetworkName(boolean showSpn, String spn, boolean showPlmn, String plmn) {
- if (false) {
- Log.d("CarrierLabel", "updateNetworkName showSpn=" + showSpn + " spn=" + spn
- + " showPlmn=" + showPlmn + " plmn=" + plmn);
- }
- final String str;
- // match logic in KeyguardStatusViewManager
- final boolean plmnValid = showPlmn && !TextUtils.isEmpty(plmn);
- final boolean spnValid = showSpn && !TextUtils.isEmpty(spn);
- if (plmnValid && spnValid) {
- str = plmn + "|" + spn;
- } else if (plmnValid) {
- str = plmn;
- } else if (spnValid) {
- str = spn;
- } else {
- str = "";
- }
- setText(str);
- }
-
-
-}
-
-