2 * Copyright (C) 2012 Andrew Neal
3 * Copyright (C) 2014 The CyanogenMod Project
4 * Licensed under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with the
6 * License. You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
8 * or agreed to in writing, software distributed under the License is
9 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
10 * KIND, either express or implied. See the License for the specific language
11 * governing permissions and limitations under the License.
14 package org.lineageos.eleven;
19 * @author Andrew Neal (andrewdneal@gmail.com)
21 public final class Config {
23 /* This class is never initiated. */
28 * My personal Last.fm API key, please use your own.
30 public static final String LASTFM_API_KEY = "0bec3f7ec1f914d7c960c12a916c8fb3";
33 * Used to distinguish album art from artist images
35 public static final String ALBUM_ART_SUFFIX = "album";
38 * The ID of an artist, album, genre, or playlist passed to the profile
41 public static final String ID = "id";
44 * The name of an artist, album, genre, or playlist passed to the profile
47 public static final String NAME = "name";
50 * The name of an artist passed to the profile activity
52 public static final String ARTIST_NAME = "artist_name";
55 * The year an album was released passed to the profile activity
57 public static final String ALBUM_YEAR = "album_year";
59 /** number of songs in a album or track list */
60 public static final String SONG_COUNT = "song_count";
63 * The MIME type passed to a the profile activity
65 public static final String MIME_TYPE = "mime_type";
68 * Play from search intent
70 public static final String PLAY_FROM_SEARCH = "android.media.action.MEDIA_PLAY_FROM_SEARCH";
73 * The smart playlist type
75 public static final String SMART_PLAYLIST_TYPE = "smart_playlist_type";
78 * Number of search results to show at the top level search
80 public static final int SEARCH_NUM_RESULTS_TO_GET = 3;
82 public static enum SmartPlaylistType {
83 LastAdded(-1, R.string.playlist_last_added),
84 RecentlyPlayed(-2, R.string.playlist_recently_played),
85 TopTracks(-3, R.string.playlist_top_tracks);
90 SmartPlaylistType(long id, int titleId) {
95 public static SmartPlaylistType getTypeById(long id) {
96 for (SmartPlaylistType type : SmartPlaylistType.values()) {
107 * This helps identify where an id has come from. Mainly used to determine when a user
108 * clicks a song where that song came from (artist/album/playlist)
110 public static enum IdType {
116 public final int mId;
118 IdType(final int id) {
122 public static IdType getTypeById(int id) {
123 for (IdType type : values()) {
124 if (type.mId == id) {
129 throw new IllegalArgumentException("Unrecognized id: " + id);