OSDN Git Service

Relative component names for dream settings activities.
authorJohn Spurlock <jspurlock@google.com>
Tue, 12 Mar 2013 19:38:18 +0000 (15:38 -0400)
committerJohn Spurlock <jspurlock@google.com>
Tue, 12 Mar 2013 19:38:18 +0000 (15:38 -0400)
If no package name is provided when declaring a dream settings
activity, use the dream service component package name.

Bug:8370189
Change-Id: I36fabc4e7f10fe7deb5bd7a670c66b2c23d5fc20

src/com/android/settings/DreamBackend.java

index 70124ef..1522705 100644 (file)
@@ -277,6 +277,9 @@ public class DreamBackend {
             Log.w(TAG, "Error parsing : " + resolveInfo.serviceInfo.packageName, caughtException);
             return null;
         }
+        if (cn != null && cn.indexOf('/') < 0) {
+            cn = resolveInfo.serviceInfo.packageName + "/" + cn;
+        }
         return cn == null ? null : ComponentName.unflattenFromString(cn);
     }