am f19dcd1f: am 6efacc28: am 84bf28b2: am 27a5bbcb: am 5cdf8488: am 3081f16c: Sync browseable samples for lmp-docs

* commit 'f19dcd1fcd110370441afb90799c9694265fae99':
  Sync browseable samples for lmp-docs
This commit is contained in:
Trevor Johns
2014-11-14 18:57:00 +00:00
committed by Android Git Automerger
5 changed files with 5 additions and 35 deletions

View File

@@ -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>

View File

@@ -16,7 +16,7 @@
-->
<resources>
<string name="app_name">Auto Music Demo</string>
<string name="app_name">MediaBrowserService Sample</string>
<string name="favorite">Favorite</string>
<string name="error_no_metadata">Unable to retrieve metadata.</string>
<string name="browse_genres">Genres</string>

View File

@@ -127,7 +127,7 @@ public class MusicService extends MediaBrowserService implements OnPreparedListe
// The volume we set the media player when we have audio focus.
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_EMULATOR_PACKAGE_NAME = "com.google.android.mediasimulator";
public static final String ANDROID_AUTO_SIMULATOR_PACKAGE_NAME = "com.google.android.mediasimulator";
// Music catalog manager
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
// need to check the origin:
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)) {
// If the request comes from an untrusted package, return null. No further calls will
// be made to other media browsing methods.

View File

@@ -24,8 +24,8 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.preview.support.v4.app.NotificationCompat.CarExtender;
import android.preview.support.v4.app.NotificationCompat.CarExtender.UnreadConversation;
import android.support.v4.app.NotificationCompat.CarExtender;
import android.support.v4.app.NotificationCompat.CarExtender.UnreadConversation;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.app.RemoteInput;

View File

@@ -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>