AI 147272: am: CL 147271 am: CL 147269 Remove "show compass" option as it requires Google Maps dependency.
  Original author: xav
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 147272
diff --git a/apps/Development/AndroidManifest.xml b/apps/Development/AndroidManifest.xml
index 879e7d6..316cbf5 100644
--- a/apps/Development/AndroidManifest.xml
+++ b/apps/Development/AndroidManifest.xml
@@ -36,7 +36,6 @@
             android:icon="@drawable/ic_launcher_devtools">
 
         <uses-library android:name="android.test.runner" />
-        <uses-library android:name="com.google.android.maps" />
 
         <activity android:name="Development" android:label="Dev Tools"
             android:icon="@drawable/ic_launcher_devtools">
diff --git a/apps/Development/res/layout/development_settings.xml b/apps/Development/res/layout/development_settings.xml
index 0486748..4f185aa 100644
--- a/apps/Development/res/layout/development_settings.xml
+++ b/apps/Development/res/layout/development_settings.xml
@@ -142,13 +142,6 @@
             android:layout_below="@id/font_hinting"
             android:layout_alignParentLeft="true"
             android:text="@string/development_settings_show_xmpp_text" />
-
-        <CheckBox android:id="@+id/show_maps_compass"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@id/show_xmpp"
-            android:layout_alignParentLeft="true"
-            android:text="@string/development_settings_show_maps_compass_text" />
             
     </RelativeLayout>
 
diff --git a/apps/Development/res/values/strings.xml b/apps/Development/res/values/strings.xml
index 8d343ae..74f411d 100644
--- a/apps/Development/res/values/strings.xml
+++ b/apps/Development/res/values/strings.xml
@@ -84,7 +84,6 @@
     <string name="development_settings_show_xmpp_text">Show GTalk service connection status</string>
     <string name="development_settings_debug_app_label_text">Debug App:</string>
     <string name="development_settings_show_sleep_text">Show sleep state on LED</string>
-    <string name="development_settings_show_maps_compass_text">Show compass in Maps</string>
     <string name="development_settings_keep_screen_on_text">Keep screen on while plugged in</string>
 
     <string name="monkey_screen_initialActivity_text"></string>
diff --git a/apps/Development/src/com/android/development/DevelopmentSettings.java b/apps/Development/src/com/android/development/DevelopmentSettings.java
index cdc1e0a..3b4848a 100644
--- a/apps/Development/src/com/android/development/DevelopmentSettings.java
+++ b/apps/Development/src/com/android/development/DevelopmentSettings.java
@@ -57,7 +57,6 @@
     private CheckBox mShowUpdatesCB;
     private CheckBox mShowBackgroundCB;
     private CheckBox mShowSleepCB;
-    private CheckBox mShowMapsCompassCB;
     private CheckBox mShowXmppCB;
     private Spinner mMaxProcsSpinner;
     private Spinner mWindowAnimationScaleSpinner;
@@ -69,7 +68,6 @@
     private boolean mAlwaysFinish;
     private int mProcessLimit;
     private boolean mShowSleep;
-    private boolean mShowMapsCompass;
     private boolean mShowXmpp;
     private AnimationScaleSelectedListener mWindowAnimationScale
             = new AnimationScaleSelectedListener(0);
@@ -106,8 +104,6 @@
         mShowBackgroundCB.setOnCheckedChangeListener(new SurfaceFlingerClicker(1003));
         mShowSleepCB = (CheckBox)findViewById(R.id.show_sleep);
         mShowSleepCB.setOnClickListener(mShowSleepClicked);
-        mShowMapsCompassCB = (CheckBox)findViewById(R.id.show_maps_compass);
-        mShowMapsCompassCB.setOnClickListener(mShowMapsCompassClicked);
         mShowXmppCB = (CheckBox)findViewById(R.id.show_xmpp);
         mShowXmppCB.setOnClickListener(mShowXmppClicked);
         mMaxProcsSpinner = (Spinner)findViewById(R.id.max_procs);
@@ -172,7 +168,6 @@
         updateSharedOptions();
         updateFlingerOptions();
         updateSleepOptions();
-        updateMapsCompassOptions();
         updateXmppOptions();        
 
         try {
@@ -293,31 +288,6 @@
         mShowSleepCB.setChecked(mShowSleep);
     }
 
-    private void writeMapsCompassOptions() {
-        try {
-            Context c = createPackageContext("com.google.android.apps.maps", 0);
-            c.getSharedPreferences("extra-features", MODE_WORLD_WRITEABLE)
-                .edit()
-                .putBoolean("compass", mShowMapsCompass)
-                .commit();
-        } catch (NameNotFoundException e) {
-            Log.w(TAG, "Failed setting maps compass");
-            e.printStackTrace();
-        }
-    }
-
-    private void updateMapsCompassOptions() {
-        try {
-            Context c = createPackageContext("com.google.android.apps.maps", 0);
-            mShowMapsCompass = c.getSharedPreferences("extra-features", MODE_WORLD_READABLE)
-                .getBoolean("compass", false);
-        } catch (NameNotFoundException e) {
-            Log.w(TAG, "Failed reading maps compass");
-            e.printStackTrace();
-        }
-        mShowMapsCompassCB.setChecked(mShowMapsCompass);
-    }
-
     private void writeXmppOptions() {
         Settings.System.setShowGTalkServiceStatus(getContentResolver(), mShowXmpp);
     }
@@ -410,16 +380,6 @@
         }
     };
 
-    private View.OnClickListener mShowMapsCompassClicked =
-        new View.OnClickListener() {
-        public void onClick(View v) {
-            mShowMapsCompass = ((CheckBox)v).isChecked();
-            writeMapsCompassOptions();
-            updateMapsCompassOptions();
-        }
-    };
-
-    
     private View.OnClickListener mShowXmppClicked = new View.OnClickListener() {
         public void onClick(View v) {
             mShowXmpp = ((CheckBox)v).isChecked();