diff --git a/docs/html/auto/images/logos/apps/TextMe.png b/docs/html/auto/images/logos/apps/TextMe.png new file mode 100644 index 0000000000000..b96f81a78187d Binary files /dev/null and b/docs/html/auto/images/logos/apps/TextMe.png differ diff --git a/docs/html/auto/images/logos/apps/soundcloud.png b/docs/html/auto/images/logos/apps/soundcloud.png new file mode 100644 index 0000000000000..a5bdbe32c83d7 Binary files /dev/null and b/docs/html/auto/images/logos/apps/soundcloud.png differ diff --git a/docs/html/auto/index.jd b/docs/html/auto/index.jd index ddb265be4dbd5..129478ab7b8f4 100644 --- a/docs/html/auto/index.jd +++ b/docs/html/auto/index.jd @@ -223,34 +223,25 @@ page.type=about
-
-
+
@@ -259,25 +250,47 @@ page.type=about
+
+
+
+ width="160" height="160" class="img-logo" style="margin-left:160px" />
+ width="160" height="160" class="img-logo" style="margin-left:370px" />
App has no more than four primary actions plus one optional action overflow toggle (or five if no action overflow is used). For more information, see details on the media control card in the - Android Auto UX Guidelines + Android Auto UX Guidelines for Media Applications.
@@ -324,7 +324,7 @@ data-sortorder="-timestamp" data-cardsizes="9x3" data-maxresults="6">App has no more than four optional secondary actions plus one action overflow toggle. For more information, see details on the media control card in the - Android Auto UX Guidelines + Android Auto UX Guidelines for Media Applications.
diff --git a/docs/html/training/auto/audio/index.jd b/docs/html/training/auto/audio/index.jd index 2656b96a7bda2..aa2576946718e 100644 --- a/docs/html/training/auto/audio/index.jd +++ b/docs/html/training/auto/audio/index.jd @@ -301,31 +301,30 @@ look like this: public BrowserRoot onGetRoot(String clientPackageName, int clientUid, Bundle rootHints) { - // Check the calling client to make sure it's one you approve. - // For example, to limit access to just Auto, the Auto emulator, - // and this app: - - if (!clientPackageName.equals("com.google.android.projection.gearhead") && - !clientPackageName.equals("com.example.android.media") && - !clientPackageName.equals(getApplication().getPackageName()) { - + // To ensure you are not allowing any arbitrary app to browse your app's + // contents, you need to check the origin: + if (!PackageValidator.isCallerAllowed(this, clientPackageName, clientUid)) { // If the request comes from an untrusted package, return null. // No further calls will be made to other media browsing methods. + LogHelper.w(TAG, "OnGetRoot: IGNORING request from untrusted package " + + clientPackageName); return null; - } - - // Return a BrowserRoot. If you wish, you could have multiple BrowserRoot - // objects and return different ones depending on the calling client. - // In this example, there's just a single BrowserRoot. - return new BrowserRoot(MEDIA_BROWSER_ROOT, null); } + if (ANDROID_AUTO_PACKAGE_NAME.equals(clientPackageName)) { + // Optional: if your app needs to adapt ads, music library or anything + // else that needs to run differently when connected to the car, this + // is where you should handle it. + } + return new BrowserRoot(MEDIA_ID_ROOT, null); +}The Auto device client builds the top-level menu by calling {@link - android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()} with the root node - object and getting it's children. The client builds submenus by calling the same method with - other child nodes. The following example code shows a simple implementation of {@link + android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()} + with the root node object and getting it's children. The client builds + submenus by calling the same method with other child nodes. The following + example code shows a simple implementation of {@link android.service.media.MediaBrowserService#onLoadChildren onLoadChildren()} method: