Relative component names for dream settings activities.

If no package name is provided when declaring a dream settings
activity, use the dream service component package name.

Bug:8370189
Change-Id: I36fabc4e7f10fe7deb5bd7a670c66b2c23d5fc20
This commit is contained in:
John Spurlock
2013-03-12 15:38:18 -04:00
parent 9471675c0a
commit 5ddc19957f

View 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);
}