OSDN Git Service

merge from open-source master
authorThe Android Open Source Project <initial-contribution@android.com>
Mon, 14 Jun 2010 16:26:36 +0000 (09:26 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Mon, 14 Jun 2010 16:26:36 +0000 (09:26 -0700)
Change-Id: Iedee6a43e23821175148324bc2502a33112e2d59

1  2 
samples/ApiDemos/src/com/example/android/apis/app/ForegroundService.java
samples/ApiDemos/src/com/example/android/apis/app/LocalService.java

@@@ -48,10 -43,9 +48,10 @@@ public class ForegroundService extends 
      static final String ACTION_FOREGROUND = "com.example.android.apis.FOREGROUND";
      static final String ACTION_BACKGROUND = "com.example.android.apis.BACKGROUND";
      
-     private static final Class[] mStartForegroundSignature = new Class[] {
 + // BEGIN_INCLUDE(foreground_compatibility)
+     private static final Class<?>[] mStartForegroundSignature = new Class[] {
          int.class, Notification.class};
-     private static final Class[] mStopForegroundSignature = new Class[] {
+     private static final Class<?>[] mStopForegroundSignature = new Class[] {
          boolean.class};
      
      private NotificationManager mNM;
@@@ -110,8 -113,7 +114,7 @@@ public class LocalService extends Servi
                         text, contentIntent);
  
          // Send the notification.
-         // We use a layout id because it is a unique number.  We use it later to cancel.
-         mNM.notify(R.string.local_service_started, notification);
+         mNM.notify(NOTIFICATION, notification);
      }
  }
 -
 +//END_INCLUDE(service)