OSDN Git Service

Add provideAssistData attr to public.xml
authorAdam Skory <skory@google.com>
Sat, 31 Aug 2013 03:53:33 +0000 (04:53 +0100)
committerAdam Skory <skory@google.com>
Wed, 4 Sep 2013 11:30:47 +0000 (12:30 +0100)
http://ag/323631 added the provideAssistData
attribute to the Service manifest tag.

It did not, however, add that attribute to
public.xml - making it impossible to actually
build a service that defines said tag.

So, add it.

Now that the attribute is where it should be,
restore @link notation to ServiceInfo.java
without breaking the offline docs build
( see http://ag//340279 ).

Also, make some log warnings related to
providing assist data slightly more verbose.

Bug: 10573008
Change-Id: Ie2bcb411c182d69738a2fa4a74de3171b9b9c455

api/current.txt
core/java/android/content/pm/ServiceInfo.java
core/res/res/values/public.xml
services/java/com/android/server/am/ActivityManagerService.java

index 7d06e1c..099b1a5 100644 (file)
@@ -845,6 +845,7 @@ package android {
     field public static final int prompt = 16843131; // 0x101017b
     field public static final int propertyName = 16843489; // 0x10102e1
     field public static final int protectionLevel = 16842761; // 0x1010009
+    field public static final int provideAssistData = 16843756; // 0x10103ec
     field public static final int publicKey = 16843686; // 0x10103a6
     field public static final int queryActionMsg = 16843227; // 0x10101db
     field public static final int queryAfterZeroResults = 16843394; // 0x1010282
index 3f17dc4..3dc8717 100644 (file)
@@ -52,7 +52,7 @@ public class ServiceInfo extends ComponentInfo
      * Bit in {@link #flags}: If set,
      * {@link android.app.Service#onProvideAssistData(android.os.Bundle)} will
      * be called on the service when it is running in the foreground. Set from
-     * the android.R.attr#provideAssistData attribute.
+     * the {@link android.R.attr#provideAssistData} attribute.
      */
     public static final int FLAG_PROVIDE_ASSIST_DATA = 0x0004;
 
index dce2db0..e6702b0 100644 (file)
   <public type="attr" name="supportsSwitchingToNextInputMethod" />
   <public type="attr" name="requireDeviceUnlock" />
   <public type="attr" name="apduServiceBanner" />
+  <public type="attr" name="provideAssistData" />
 
 </resources>
index 1813593..75cf5d0 100644 (file)
@@ -407,12 +407,13 @@ public final class ActivityManagerService extends ActivityManagerNative
         @Override
         public void run() {
             if (activityExtras == null) {
-                Slog.w(TAG, "getAssistContextExtras failed: timeout retrieving from " + activity);
+                Slog.w(TAG, "getAssistContextExtras failed: timeout retrieving from activtity "
+                        + activity);
             }
             for (int i = 0; i < services.size(); i++) {
                 if (servicesExtras[i] == null) {
-                    Slog.w(TAG, "getAssistContextExtras failed: timeout retrieving from "
-                            + services.get(i));
+                    Slog.w(TAG, "getAssistContextExtras failed: timeout retrieving from service "
+                            + i + " " + services.get(i));
                 }
             }
             synchronized (this) {