/**
* Used to save the queue as reverse hexadecimal numbers, which we can
- * generate faster than normal decimal or // hexadecimal numbers, which in
- * turn allows us to save the playlist // more often without worrying too
+ * generate faster than normal decimal or hexadecimal numbers, which in
+ * turn allows us to save the playlist more often without worrying too
* much about performance
*/
private static final char HEX_DIGITS[] = new char[] {
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
};
/**
mRecentsCache = RecentStore.getInstance(this);
mFavoritesCache = FavoritesStore.getInstance(this);
- // Initialze the notification helper
+ // Initialize the notification helper
mNotificationHelper = new NotificationHelper(this);
// Initialize the image fetcher
mPlayerHandler = new MusicPlayerHandler(this, thread.getLooper());
mDelayedStopHandler = new DelayedHandler(this);
- // Initialze the audio manager and register any headset controls for
+ // Initialize the audio manager and register any headset controls for
// playback
mAudioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
mMediaButtonReceiverComponent = new ComponentName(getPackageName(),
// Use the remote control APIs (if available and the user allows it) to
// set the playback state
- mEnableLockscreenControls = PreferenceUtils.getInstace(this).enableLockscreenControls();
+ mEnableLockscreenControls = PreferenceUtils.getInstance(this).enableLockscreenControls();
setUpRemoteControlClient();
// Initialize the preferences
registerExternalStorageListener();
- // Initialze the media player
+ // Initialize the media player
mPlayer = new MultiPlayer(this);
mPlayer.setHandler(mPlayerHandler);
- // Initialze the intent filter and each action
+ // Initialize the intent filter and each action
final IntentFilter filter = new IntentFilter();
filter.addAction(SERVICECMD);
filter.addAction(TOGGLEPAUSE_ACTION);
switch (imageType) {
case ARTIST:
if (!TextUtils.isEmpty(artistName)) {
- if (PreferenceUtils.getInstace(mContext).downloadMissingArtistImages()) {
+ if (PreferenceUtils.getInstance(mContext).downloadMissingArtistImages()) {
final PaginatedResult<Image> paginatedResult = Artist.getImages(mContext,
artistName);
if (paginatedResult != null) {
break;
case ALBUM:
if (!TextUtils.isEmpty(artistName) && !TextUtils.isEmpty(albumName)) {
- if (PreferenceUtils.getInstace(mContext).downloadMissingArtwork()) {
+ if (PreferenceUtils.getInstance(mContext).downloadMissingArtwork()) {
final Artist correction = Artist.getCorrection(mContext, artistName);
if (correction != null) {
final Album album = Album.getInfo(mContext, correction.getName(),
* @param prefixHighlightColor The color used to highlight the prefixes.
*/
public PrefixHighlighter(final Context context) {
- mPrefixHighlightColor = PreferenceUtils.getInstace(context).getDefaultThemeColor(context);
+ mPrefixHighlightColor = PreferenceUtils.getInstance(context).getDefaultThemeColor(context);
}
/**
AlbumColumns.NUMBER_OF_SONGS,
/* 4 */
AlbumColumns.FIRST_YEAR
- }, null, null, PreferenceUtils.getInstace(context).getAlbumSortOrder());
+ }, null, null, PreferenceUtils.getInstance(context).getAlbumSortOrder());
}
}
/* 4 */
AudioColumns.DURATION
}, selection.toString(), null,
- PreferenceUtils.getInstace(context).getAlbumSongSortOrder());
+ PreferenceUtils.getInstance(context).getAlbumSongSortOrder());
}
}
AlbumColumns.NUMBER_OF_SONGS,
/* 4 */
AlbumColumns.FIRST_YEAR
- }, null, null, PreferenceUtils.getInstace(context).getArtistAlbumSortOrder());
+ }, null, null, PreferenceUtils.getInstance(context).getArtistAlbumSortOrder());
}
}
ArtistColumns.NUMBER_OF_ALBUMS,
/* 3 */
ArtistColumns.NUMBER_OF_TRACKS
- }, null, null, PreferenceUtils.getInstace(context).getArtistSortOrder());
+ }, null, null, PreferenceUtils.getInstance(context).getArtistSortOrder());
}
}
/* 3 */
AudioColumns.ALBUM
}, selection.toString(), null,
- PreferenceUtils.getInstace(context).getArtistSongSortOrder());
+ PreferenceUtils.getInstance(context).getArtistSongSortOrder());
}
}
/* 3 */
AudioColumns.ALBUM
}, mSelection.toString(), null,
- PreferenceUtils.getInstace(context).getSongSortOrder());
+ PreferenceUtils.getInstance(context).getSongSortOrder());
}
}
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// Get the preferences
- mPreferences = PreferenceUtils.getInstace(this);
+ mPreferences = PreferenceUtils.getInstance(this);
// Initialze the image fetcher
mImageFetcher = ApolloUtils.getImageFetcher(this);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
// Get the preferences
- mPreferences = PreferenceUtils.getInstace(this);
+ mPreferences = PreferenceUtils.getInstance(this);
// Initialze the image cache
mImageCache = ImageCache.getInstance(this);
// Make sure everthing is good-to-go
if (mService != null) {
- // Frist, check the artist MIME type
+ // First, check the artist MIME type
if (getType(MediaStore.Audio.Artists.CONTENT_TYPE)) {
// Shuffle the artist track list
}
private boolean isSimpleLayout() {
- return PreferenceUtils.getInstace(getActivity()).isSimpleLayout(ALBUM_LAYOUT,
+ return PreferenceUtils.getInstance(getActivity()).isSimpleLayout(ALBUM_LAYOUT,
getActivity());
}
private boolean isDetailedLayout() {
- return PreferenceUtils.getInstace(getActivity()).isDetailedLayout(ALBUM_LAYOUT,
+ return PreferenceUtils.getInstance(getActivity()).isDetailedLayout(ALBUM_LAYOUT,
getActivity());
}
}
}
private boolean isSimpleLayout() {
- return PreferenceUtils.getInstace(getActivity()).isSimpleLayout(ARTIST_LAYOUT,
+ return PreferenceUtils.getInstance(getActivity()).isSimpleLayout(ARTIST_LAYOUT,
getActivity());
}
private boolean isDetailedLayout() {
- return PreferenceUtils.getInstace(getActivity()).isDetailedLayout(ARTIST_LAYOUT,
+ return PreferenceUtils.getInstance(getActivity()).isDetailedLayout(ARTIST_LAYOUT,
getActivity());
}
}
}
private boolean isSimpleLayout() {
- return PreferenceUtils.getInstace(getActivity()).isSimpleLayout(RECENT_LAYOUT,
+ return PreferenceUtils.getInstance(getActivity()).isSimpleLayout(RECENT_LAYOUT,
getActivity());
}
private boolean isDetailedLayout() {
- return PreferenceUtils.getInstace(getActivity()).isDetailedLayout(RECENT_LAYOUT,
+ return PreferenceUtils.getInstance(getActivity()).isDetailedLayout(RECENT_LAYOUT,
getActivity());
}
}
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Get the preferences
- mPreferences = PreferenceUtils.getInstace(getActivity());
+ mPreferences = PreferenceUtils.getInstance(getActivity());
}
/**
}
boolean state = false;
- final boolean onlyOnWifi = PreferenceUtils.getInstace(context).onlyOnWifi();
+ final boolean onlyOnWifi = PreferenceUtils.getInstance(context).onlyOnWifi();
/* Monitor network connections */
final ConnectivityManager connectivityManager = (ConnectivityManager)context
@Override
public void onClick(final DialogInterface dialog, final int which) {
- PreferenceUtils.getInstace(context).setDefaultThemeColor(
+ PreferenceUtils.getInstance(context).setDefaultThemeColor(
colorPickerView.getColor());
}
});
/**
* @param context The {@link Context} to use.
- * @return A singelton of this class
+ * @return A singleton of this class
*/
- public static final PreferenceUtils getInstace(final Context context) {
+ public static final PreferenceUtils getInstance(final Context context) {
if (sInstance == null) {
sInstance = new PreferenceUtils(context.getApplicationContext());
}
setThemePackageName(APOLLO_PACKAGE);
}
// Get the current theme color
- mCurrentThemeColor = PreferenceUtils.getInstace(context).getDefaultThemeColor(context);
+ mCurrentThemeColor = PreferenceUtils.getInstance(context).getDefaultThemeColor(context);
// Inflate the custom layout
mActionBarLayout = LayoutInflater.from(context).inflate(R.layout.action_bar, null);
}
public ColorSchemeDialog(final Context context) {
super(context);
getWindow().setFormat(PixelFormat.RGBA_8888);
- mCurrentColor = PreferenceUtils.getInstace(context).getDefaultThemeColor(context);
+ mCurrentColor = PreferenceUtils.getInstance(context).getDefaultThemeColor(context);
setUp(mCurrentColor);
}