Skip to content

Commit

Permalink
Address more android lint issues
Browse files Browse the repository at this point in the history
1. Also switch to using specific version of gms library to reduce apk size.
2. Remove unnecessary gson library dependency.

Bug: 19354960

Change-Id: I43e3f954c90e0ae3a7b9974abee0d1e1ddd69c0c
  • Loading branch information
nageshs authored and mangini committed Mar 10, 2015
1 parent 41d8a3c commit ee13dd9
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
3 changes: 1 addition & 2 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@ repositories {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.google.android.gms:play-services-cast:6.5.87'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:cardview-v7:21.0.2'
compile 'com.android.support:leanback-v17:21.0.2'
compile 'com.android.support:mediarouter-v7:21.0.2'

compile 'com.google.code.gson:gson:2.3.1'
compile (name:'CastCompanionLibrary-debug', ext:'aar')
compile 'com.github.amlcurran.showcaseview:library:5.0.0'
}
4 changes: 3 additions & 1 deletion mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.android.uamp" >

<uses-permission android:name="android.permission.INTERNET" />
Expand Down Expand Up @@ -121,7 +122,8 @@
MediaBrowser (for browsing) and MediaController (for play session control) -->
<service
android:name=".MusicService"
android:exported="true">
android:exported="true"
tools:ignore="ExportedService">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public MusicProvider() {
/**
* Get an iterator over the list of genres
*
* @return
* @return genres
*/
public Iterable<String> getGenres() {
if (mCurrentState != State.INITIALIZED) {
Expand All @@ -104,7 +104,6 @@ public Iterable<String> getGenres() {
/**
* Get music tracks of the given genre
*
* @return
*/
public Iterable<MediaMetadata> getMusicsByGenre(String genre) {
if (mCurrentState != State.INITIALIZED || !mMusicListByGenre.containsKey(genre)) {
Expand All @@ -117,7 +116,6 @@ public Iterable<MediaMetadata> getMusicsByGenre(String genre) {
* Very basic implementation of a search that filter music tracks which title containing
* the given query.
*
* @return
*/
public Iterable<MediaMetadata> searchMusics(String titleQuery) {
if (mCurrentState != State.INITIALIZED) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
public class ResourceHelper {
/**
* Get a color value from a theme attribute.
* @param context
* @param attribute
* @param defaultColor
* @param context used for getting the color.
* @param attribute theme attribute.
* @param defaultColor default to use.
* @return color value
*/
public static int getThemeColor(Context context, int attribute, int defaultColor) {
Expand Down
3 changes: 2 additions & 1 deletion mobile/src/main/res/layout/activity_placeholder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_info_outline_grey600_48dp"/>
android:src="@drawable/ic_info_outline_grey600_48dp"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion mobile/src/main/res/layout/activity_tv_now_playing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:id="@+id/now_playing_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
android:contentDescription="@string/now_playing" />

<fragment
android:id="@+id/playback_controls_fragment"
Expand Down
3 changes: 2 additions & 1 deletion mobile/src/main/res/layout/drawer_list_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
android:layout_marginRight="@dimen/drawer_item_icon_horizontal_margin"
android:tintMode="src_in"
android:tint="@android:color/darker_gray"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical"
tools:ignore="ContentDescription" />

<TextView
android:id="@+id/drawer_item_title"
Expand Down
1 change: 1 addition & 0 deletions mobile/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
<string name="placeholder_message">This is a placeholder for your application code.</string>
<string name="drawer_allmusic_title">All Music</string>
<string name="drawer_playlists_title">Playlists</string>
<string name="now_playing">Now Playing</string>

</resources>

0 comments on commit ee13dd9

Please sign in to comment.