diff --git a/res/values/ids.xml b/res/values/ids.xml
new file mode 100644
index 0000000..2fbf70b
--- /dev/null
+++ b/res/values/ids.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2014, 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.
+*/
+-->
+<resources>
+    <item type="id" name="preference_highlight_key" />
+</resources>
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
index c145938..4a8211f 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -19,6 +19,7 @@
         xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
 
         <com.android.settings.BrightnessPreference
+                android:key="brightness"
                 android:title="@string/brightness"
                 android:persistent="false"/>
 
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 1d41816..dbef6cb 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -360,7 +360,8 @@
 
             mDataEnabled = new Switch(inflater.getContext());
             mDataEnabledView = inflatePreference(inflater, mNetworkSwitches, mDataEnabled);
-            mDataEnabledView.setTag(DATA_USAGE_ENABLE_MOBILE_KEY);
+            mDataEnabledView.setTag(R.id.preference_highlight_key,
+                    DATA_USAGE_ENABLE_MOBILE_KEY);
             mDataEnabled.setOnCheckedChangeListener(mDataEnabledListener);
             mNetworkSwitches.addView(mDataEnabledView);
 
@@ -368,7 +369,8 @@
             mDisableAtLimit.setClickable(false);
             mDisableAtLimit.setFocusable(false);
             mDisableAtLimitView = inflatePreference(inflater, mNetworkSwitches, mDisableAtLimit);
-            mDisableAtLimitView.setTag(DATA_USAGE_DISABLE_MOBILE_LIMIT_KEY);
+            mDisableAtLimitView.setTag(R.id.preference_highlight_key,
+                    DATA_USAGE_DISABLE_MOBILE_LIMIT_KEY);
             mDisableAtLimitView.setClickable(true);
             mDisableAtLimitView.setFocusable(true);
             mDisableAtLimitView.setOnClickListener(mDisableAtLimitListener);
@@ -377,7 +379,7 @@
 
         // bind cycle dropdown
         mCycleView = mHeader.findViewById(R.id.cycles);
-        mCycleView.setTag(DATA_USAGE_CYCLE_KEY);
+        mCycleView.setTag(R.id.preference_highlight_key, DATA_USAGE_CYCLE_KEY);
         mCycleSpinner = (Spinner) mCycleView.findViewById(R.id.cycles_spinner);
         mCycleAdapter = new CycleAdapter(context);
         mCycleSpinner.setAdapter(mCycleAdapter);
diff --git a/src/com/android/settings/HighlightingFragment.java b/src/com/android/settings/HighlightingFragment.java
index 1424abd..4a233b4 100644
--- a/src/com/android/settings/HighlightingFragment.java
+++ b/src/com/android/settings/HighlightingFragment.java
@@ -116,7 +116,7 @@
     }
 
     private boolean checkTag(View view, String key) {
-        final Object tag = view.getTag();
+        final Object tag = view.getTag(R.id.preference_highlight_key);
         if (tag == null || !(tag instanceof String)) {
             return false;
         }
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index 67432c0..eb2bea9 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -204,19 +204,6 @@
                     }, DELAY_HIGHLIGHT_DURATION_MILLIS);
                 }
             });
-        } else {
-            // Try locating the Preference View thru its tag
-            View preferenceView = findPreferenceViewForKey(getView(), key);
-            if (preferenceView != null ) {
-                mPreferenceHighlighted = true;
-
-                preferenceView.setBackground(highlight);
-                final int centerX = preferenceView.getWidth() / 2;
-                final int centerY = preferenceView.getHeight() / 2;
-                highlight.setHotspot(centerX, centerY);
-                preferenceView.setPressed(true);
-                preferenceView.setPressed(false);
-            }
         }
     }
 
@@ -235,33 +222,6 @@
         return -1;
     }
 
-    private View findPreferenceViewForKey(View root, String key) {
-        if (checkTag(root, key)) {
-            return root;
-        }
-        if (root instanceof ViewGroup) {
-            final ViewGroup group = (ViewGroup) root;
-            final int count = group.getChildCount();
-            for (int n = 0; n < count; n++) {
-                final View child = group.getChildAt(n);
-                final View view = findPreferenceViewForKey(child, key);
-                if (view != null) {
-                    return view;
-                }
-            }
-        }
-        return null;
-    }
-
-    private boolean checkTag(View view, String key) {
-        final Object tag = view.getTag();
-        if (tag == null || !(tag instanceof String)) {
-            return false;
-        }
-        final String prefKey = (String) tag;
-        return (!TextUtils.isEmpty(prefKey) && prefKey.equals(key));
-    }
-
     protected void removePreference(String key) {
         Preference pref = findPreference(key);
         if (pref != null) {
