am a1ef162d: Use the new gingerbread Status bar text styles.

Merge commit 'a1ef162db869174d43bccb4d7d33299624a25527' into gingerbread-plus-aosp

* commit 'a1ef162db869174d43bccb4d7d33299624a25527':
  Use the new gingerbread Status bar text styles.
diff --git a/src/com/android/music/TouchInterceptor.java b/src/com/android/music/TouchInterceptor.java
index 79d471e..1e449e3 100644
--- a/src/com/android/music/TouchInterceptor.java
+++ b/src/com/android/music/TouchInterceptor.java
@@ -357,7 +357,7 @@
         v.setImageBitmap(bm);
         mDragBitmap = bm;
 
-        mWindowManager = (WindowManager)context.getSystemService("window");
+        mWindowManager = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
         mWindowManager.addView(v, mWindowParams);
         mDragView = v;
     }
@@ -380,7 +380,8 @@
     
     private void stopDragging() {
         if (mDragView != null) {
-            WindowManager wm = (WindowManager)getContext().getSystemService("window");
+            mDragView.setVisibility(GONE);
+            WindowManager wm = (WindowManager)getContext().getSystemService(Context.WINDOW_SERVICE);
             wm.removeView(mDragView);
             mDragView.setImageDrawable(null);
             mDragView = null;
diff --git a/tests/src/com/android/music/MusicPlayerNames.java b/tests/src/com/android/music/MusicPlayerNames.java
index f5f5d48..655d578 100644
--- a/tests/src/com/android/music/MusicPlayerNames.java
+++ b/tests/src/com/android/music/MusicPlayerNames.java
@@ -16,34 +16,36 @@
 
 package com.android.music.tests;
 
+import android.os.Environment;
+
 /**
- * 
- * This class has the names of the all the activity name and variables 
+ *
+ * This class has the names of the all the activity name and variables
  * in the instrumentation test.
  *
  */
 public class MusicPlayerNames {
-  
+
   //Expected result of the sorted playlistname
     public static final String expectedPlaylistTitle[] = { "**1E?:|}{[]~~.,;'",
         "//><..", "0123456789",
         "0random@112", "MyPlaylist", "UPPERLETTER",
         "combination011", "loooooooog",
-        "normal", "~!@#$%^&*()_+"    
-    }; 
-  
+        "normal", "~!@#$%^&*()_+"
+    };
+
   //Unsorted input playlist name
     public static final String unsortedPlaylistTitle[] = { "//><..","MyPlaylist",
-        "0random@112", "UPPERLETTER","normal", 
+        "0random@112", "UPPERLETTER","normal",
         "combination011", "0123456789",
         "~!@#$%^&*()_+","**1E?:|}{[]~~.,;'",
-        "loooooooog"    
+        "loooooooog"
     };
-    
+
     public static final String DELETE_PLAYLIST_NAME = "testDeletPlaylist";
     public static final String ORIGINAL_PLAYLIST_NAME = "original_playlist_name";
     public static final String RENAMED_PLAYLIST_NAME = "rename_playlist_name";
-    
+
     public static int NO_OF_PLAYLIST = 10;
     public static int WAIT_SHORT_TIME = 1000;
     public static int WAIT_LONG_TIME = 2000;
@@ -52,10 +54,12 @@
     public static int DEFAULT_PLAYLIST_LENGTH = 15;
     public static int NO_ALBUMS_TOBE_PLAYED = 50;
     public static int NO_SKIPPING_SONGS = 500;
-    
-    public static final String DELETESONG = "/sdcard/toBeDeleted.amr"; 
-    public static final String GOLDENSONG = "/sdcard/media_api/music/AMRNB.amr";
-    public static final String TOBEDELETESONGNAME = "toBeDeleted";   
-    
+
+    public static final String EXTERNAL_DIR =
+        Environment.getExternalStorageDirectory().toString();
+    public static final String DELETESONG = EXTERNAL_DIR + "/toBeDeleted.amr";
+    public static final String GOLDENSONG = EXTERNAL_DIR + "/media_api/music/AMRNB.amr";
+    public static final String TOBEDELETESONGNAME = "toBeDeleted";
+
     public static int EXPECTED_NO_RINGTONE = 1;
 }
diff --git a/tests/src/com/android/music/stress/AlbumsPlaybackStress.java b/tests/src/com/android/music/stress/AlbumsPlaybackStress.java
index f396317..46e1d9f 100644
--- a/tests/src/com/android/music/stress/AlbumsPlaybackStress.java
+++ b/tests/src/com/android/music/stress/AlbumsPlaybackStress.java
@@ -19,6 +19,7 @@
 import android.app.ActivityManager;
 import android.app.Instrumentation;
 import android.app.Instrumentation.ActivityMonitor;
+import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.SystemClock;
@@ -83,7 +84,7 @@
     
       //Verification: check if it is in low memory
       ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
-      ((ActivityManager)getActivity().getSystemService("activity")).getMemoryInfo(mi);
+      ((ActivityManager)getActivity().getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(mi);
       assertFalse(TAG, mi.lowMemory); 
      
    
diff --git a/tests/src/com/android/music/stress/MusicPlaybackStress.java b/tests/src/com/android/music/stress/MusicPlaybackStress.java
index 9e7fd74..ea916f6 100644
--- a/tests/src/com/android/music/stress/MusicPlaybackStress.java
+++ b/tests/src/com/android/music/stress/MusicPlaybackStress.java
@@ -80,7 +80,7 @@
       }
       //Verification: check if it is in low memory
       ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
-      ((ActivityManager)getActivity().getSystemService("activity")).getMemoryInfo(mi);
+      ((ActivityManager)getActivity().getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(mi);
       assertFalse(TAG, mi.lowMemory);      
     }
 }