Sync browseable samples for lmp-docs
Syncing to commit 0afa2a3366307b12a213a199be1eb8baac1c5f1c. Change-Id: I6ab153008951bb7e06001c0f27f44df4e4f6cb83
This commit is contained in:
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
</resources>
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">Auto Music Demo</string>
|
<string name="app_name">MediaBrowserService Sample</string>
|
||||||
<string name="favorite">Favorite</string>
|
<string name="favorite">Favorite</string>
|
||||||
<string name="error_no_metadata">Unable to retrieve metadata.</string>
|
<string name="error_no_metadata">Unable to retrieve metadata.</string>
|
||||||
<string name="browse_genres">Genres</string>
|
<string name="browse_genres">Genres</string>
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ public class MusicService extends MediaBrowserService implements OnPreparedListe
|
|||||||
// The volume we set the media player when we have audio focus.
|
// The volume we set the media player when we have audio focus.
|
||||||
public static final float VOLUME_NORMAL = 1.0f;
|
public static final float VOLUME_NORMAL = 1.0f;
|
||||||
public static final String ANDROID_AUTO_PACKAGE_NAME = "com.google.android.projection.gearhead";
|
public static final String ANDROID_AUTO_PACKAGE_NAME = "com.google.android.projection.gearhead";
|
||||||
public static final String ANDROID_AUTO_EMULATOR_PACKAGE_NAME = "com.google.android.mediasimulator";
|
public static final String ANDROID_AUTO_SIMULATOR_PACKAGE_NAME = "com.google.android.mediasimulator";
|
||||||
|
|
||||||
// Music catalog manager
|
// Music catalog manager
|
||||||
private MusicProvider mMusicProvider;
|
private MusicProvider mMusicProvider;
|
||||||
@@ -259,7 +259,7 @@ public class MusicService extends MediaBrowserService implements OnPreparedListe
|
|||||||
// To ensure you are not allowing any arbitrary app to browse your app's contents, you
|
// To ensure you are not allowing any arbitrary app to browse your app's contents, you
|
||||||
// need to check the origin:
|
// need to check the origin:
|
||||||
if (!ANDROID_AUTO_PACKAGE_NAME.equals(clientPackageName) &&
|
if (!ANDROID_AUTO_PACKAGE_NAME.equals(clientPackageName) &&
|
||||||
!ANDROID_AUTO_EMULATOR_PACKAGE_NAME.equals(clientPackageName) &&
|
!ANDROID_AUTO_SIMULATOR_PACKAGE_NAME.equals(clientPackageName) &&
|
||||||
!getApplication().getPackageName().equals(clientPackageName)) {
|
!getApplication().getPackageName().equals(clientPackageName)) {
|
||||||
// If the request comes from an untrusted package, return null. No further calls will
|
// If the request comes from an untrusted package, return null. No further calls will
|
||||||
// be made to other media browsing methods.
|
// be made to other media browsing methods.
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ import android.os.Handler;
|
|||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.Messenger;
|
import android.os.Messenger;
|
||||||
import android.preview.support.v4.app.NotificationCompat.CarExtender;
|
import android.support.v4.app.NotificationCompat.CarExtender;
|
||||||
import android.preview.support.v4.app.NotificationCompat.CarExtender.UnreadConversation;
|
import android.support.v4.app.NotificationCompat.CarExtender.UnreadConversation;
|
||||||
import android.support.v4.app.NotificationCompat;
|
import android.support.v4.app.NotificationCompat;
|
||||||
import android.support.v4.app.NotificationManagerCompat;
|
import android.support.v4.app.NotificationManagerCompat;
|
||||||
import android.support.v4.app.RemoteInput;
|
import android.support.v4.app.RemoteInput;
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
</resources>
|
|
||||||
Reference in New Issue
Block a user