code
stringlengths
3
1.18M
language
stringclasses
1 value
/* * Copyright 2011 Google Inc. * * 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 w...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2008 Google Inc. * * 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 w...
Java
// Copyright 2010 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.wireless.gdata.data.Entry; import java.util.HashMap; import java.util.Map; /** * GData entry for a map feature. */ class MapFeatureEntry extends Entry { private String mPrivacy = null; priv...
Java
// Copyright 2009 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.wireless.gdata.data.Entry; import com.google.wireless.gdata.data.StringUtils; import android.graphics.Color; import android.util.Log; import org.xmlpull.v1.XmlPullParserException; import org.xmlpu...
Java
// Copyright 2010 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.wireless.gdata.client.GDataParserFactory; import com.google.wireless.gdata.data.Entry; import com.google.wireless.gdata.parser.GDataParser; import com.google.wireless.gdata.parser.ParseException; im...
Java
// Copyright 2009 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.wireless.gdata.data.Entry; import com.google.wireless.gdata.data.Feed; import com.google.wireless.gdata.data.XmlUtils; import com.google.wireless.gdata.parser.ParseException; import com.google.wirel...
Java
// Copyright 2010 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.wireless.gdata.client.GDataClient; import com.google.wireless.gdata.client.GDataParserFactory; import com.google.wireless.gdata.client.GDataServiceClient; import android.util.Log; /** * Client to...
Java
// Copyright 2009 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; /** * Constants for My Maps. */ public class MyMapsConstants { static final String TAG = "MapsApi"; static final String MAPSHOP_BASE_URL = "https://maps.google.com/maps/ms"; public static final String S...
Java
// Copyright 2011 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.android.apps.mytracks.content.Waypoint; import com.google.android.apps.mytracks.io.AuthManager; import com.google.android.apps.mytracks.util.StringUtils; import com.google.android.maps.GeoPoint; imp...
Java
// Copyright 2009 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.android.maps.GeoPoint; /** * A rectangle in geographical space. */ class GeoRect { public int top; public int left; public int bottom; public int right; public GeoRect() { top = 0;...
Java
// Copyright 2009 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.android.maps.GeoPoint; import java.util.Random; import java.util.Vector; /** * MyMapsFeature contains all of the data associated with a feature in My Maps, * where a feature is a marker, line, o...
Java
// Copyright 2009 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; /** * Metadata about a maps feature. */ class MyMapsFeatureMetadata { private static final String BLUE_DOT_URL = "http://maps.google.com/mapfiles/ms/micons/blue-dot.png"; private static final int DEFAULT...
Java
// Copyright 2010 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.android.apps.mytracks.io.AuthManager; import com.google.android.apps.mytracks.io.AuthManager.AuthCallback; import com.google.android.apps.mytracks.io.gdata.GDataClientFactory; import com.google.andr...
Java
// Copyright 2009 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; /** * Metadata about a "my maps" map. */ class MyMapsMapMetadata { private String title; private String description; private String gdataEditUri; private boolean searchable; public MyMapsMapMetadata() {...
Java
// Copyright 2010 Google Inc. All Rights Reserved. package com.google.android.apps.mytracks.io.mymaps; import com.google.wireless.gdata.data.StringUtils; import com.google.wireless.gdata.parser.ParseException; import com.google.wireless.gdata.parser.xml.XmlGDataParser; import com.google.wireless.gdata.parser.xml.XmlPa...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2008 Google Inc. * * 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 w...
Java
/* * Copyright 2008 Google Inc. * * 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 w...
Java
/* * Copyright 2007 Google Inc. * * 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 i...
Java
/* * Copyright 2009 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2008 Google Inc. * * 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 w...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2009 Google Inc. * * 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 i...
Java
/* * Copyright 2008 Google Inc. * * 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 i...
Java
/* * Copyright 2008 Google Inc. * * 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 w...
Java
/* * Copyright 2008 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2009 Google Inc. * * 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 i...
Java
/* * Copyright 2009 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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 w...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2010 Google Inc. * * 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 i...
Java
/* * Copyright 2011 Google Inc. * * 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 i...
Java
/* * Copyright 2011 Google Inc. * * 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 w...
Java
package org.dodgybits.shuffle.android.core.activity.flurry; import com.google.inject.Inject; import roboguice.activity.RoboListActivity; public abstract class FlurryEnabledListActivity extends RoboListActivity { @Inject protected Analytics mAnalytics; @Override public void onStart() { sup...
Java
package org.dodgybits.shuffle.android.core.activity.flurry; import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryApiKey; import java.util.Map; import org.dodgybits.shuffle.android.preference.model.Preferences; import android.content.Context; import com.flurry.android.FlurryAgent; import com.googl...
Java
package org.dodgybits.shuffle.android.core.activity.flurry; import com.google.inject.Inject; import roboguice.activity.RoboExpandableListActivity; public abstract class FlurryEnabledExpandableListActivity extends RoboExpandableListActivity { @Inject protected Analytics mAnalytics; @Override public v...
Java
package org.dodgybits.shuffle.android.core.activity.flurry; import com.google.inject.Inject; import roboguice.activity.RoboPreferenceActivity; public abstract class FlurryEnabledPreferenceActivity extends RoboPreferenceActivity { @Inject protected Analytics mAnalytics; @Override public void onStart(...
Java
package org.dodgybits.shuffle.android.core.activity.flurry; import com.google.inject.Inject; import roboguice.activity.RoboActivity; public abstract class FlurryEnabledActivity extends RoboActivity { @Inject protected Analytics mAnalytics; @Override public void onStart() { super.onStart()...
Java
package org.dodgybits.shuffle.android.core.activity.flurry; import android.content.Intent; import com.google.inject.Inject; import roboguice.service.RoboService; public abstract class FlurryEnabledService extends RoboService { @Inject protected Analytics mAnalytics; @Override public void onStart(In...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
package org.dodgybits.shuffle.android.core.activity; import java.util.ArrayList; import java.util.List; import org.dodgybits.android.shuffle.R; import org.dodgybits.shuffle.android.core.activity.flurry.FlurryEnabledListActivity; import org.dodgybits.shuffle.android.core.view.IconArrayAdapter; import org.dodgybits.shu...
Java
package org.dodgybits.shuffle.android.core.configuration; import android.content.ContextWrapper; import com.google.inject.Provides; import org.dodgybits.android.shuffle.R; import org.dodgybits.shuffle.android.core.model.Context; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.an...
Java
package org.dodgybits.shuffle.android.core; import com.google.inject.Module; import org.dodgybits.shuffle.android.core.configuration.ShuffleModule; import roboguice.application.RoboApplication; import java.util.List; public class ShuffleApplication extends RoboApplication { @Override protected void add...
Java
package org.dodgybits.shuffle.android.core.model; public final class Id { private final long mId; public static final Id NONE = new Id(0L); private Id(long id) { mId = id; } public long getId() { return mId; } public boolean isInitialised() { ret...
Java
package org.dodgybits.shuffle.android.core.model; public class Reminder { public Integer id; public final int minutes; public final Method method; public Reminder(Integer id, int minutes, Method method) { this.id = id; this.minutes = minutes; this.method = method; } public Reminder(int minutes, Method me...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
package org.dodgybits.shuffle.android.core.model.encoding; import static android.provider.BaseColumns._ID; import static org.dodgybits.shuffle.android.persistence.provider.ContextProvider.Contexts.COLOUR; import static org.dodgybits.shuffle.android.persistence.provider.ContextProvider.Contexts.ICON; import static org....
Java
package org.dodgybits.shuffle.android.core.model.encoding; import static android.provider.BaseColumns._ID; import static org.dodgybits.shuffle.android.persistence.provider.ProjectProvider.Projects.ARCHIVED; import static org.dodgybits.shuffle.android.persistence.provider.ProjectProvider.Projects.DEFAULT_CONTEXT_ID; im...
Java
package org.dodgybits.shuffle.android.core.model.encoding; import static android.provider.BaseColumns._ID; import static org.dodgybits.shuffle.android.persistence.provider.TaskProvider.Tasks.ALL_DAY; import static org.dodgybits.shuffle.android.persistence.provider.TaskProvider.Tasks.CAL_EVENT_ID; import static org.dod...
Java
package org.dodgybits.shuffle.android.core.model.encoding; import android.os.Bundle; public interface EntityEncoder<Entity> { void save(Bundle icicle, Entity e); Entity restore(Bundle icicle); }
Java
package org.dodgybits.shuffle.android.core.model.encoding; import org.dodgybits.shuffle.android.core.model.Id; import android.os.Bundle; public abstract class AbstractEntityEncoder { protected static Id getId(Bundle icicle, String key) { Id result = Id.NONE; if (icicle.containsKey(key)) { ...
Java
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.android.core.model.Context; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.dto.ShuffleProtos.Context.Builder; public class ContextProtocolTranslator implements EntityProtocolTranslator<Context , ...
Java
package org.dodgybits.shuffle.android.core.model.protocol; import com.google.protobuf.MessageLite; public interface EntityProtocolTranslator<E,M extends MessageLite> { E fromMessage(M message); M toMessage(E entity); }
Java
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.android.core.model.Context; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.android.core.model.Project; import org.dodgybits.shuffle.dto.ShuffleProtos.Project.Builder; public class ProjectProtocolT...
Java
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.dto.ShuffleProtos.Date; public final class ProtocolUtil { private ProtocolUtil() { // deny } public static Date toDate(long millis) { return Date.newBuilder() .setMillis(millis) ...
Java
package org.dodgybits.shuffle.android.core.model.protocol; import java.util.HashMap; import java.util.Map; import org.dodgybits.shuffle.android.core.model.Id; public class HashEntityDirectory<Entity> implements EntityDirectory<Entity> { private Map<String,Entity> mItemsByName; private Map<Id, Entity> mItemsById; ...
Java
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.android.core.model.Context; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.android.core.model.Project; import org.dodgybits.shuffle.android.core.model.Task; import org.dodgybits.shuffle.dto.Shuffle...
Java
package org.dodgybits.shuffle.android.core.model.protocol; import org.dodgybits.shuffle.android.core.model.Id; /** * A lookup service for entities. Useful when matching up entities from different * sources that may have conflicting ids (e.g. backup or remote synching). */ public interface EntityDirectory<Entity> {...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
package org.dodgybits.shuffle.android.core.model.persistence; import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryCountParam; import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryCreateEntityEvent; import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryDeleteEntityE...
Java
package org.dodgybits.shuffle.android.core.model.persistence; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import com.google.inject.Inject; import org.dodgybits.shuffle.android.core.activity.flurry.Analytics; import org.dodgybits.shuffle.android.core.model.Project; impo...
Java
package org.dodgybits.shuffle.android.core.model.persistence; import android.content.ContentResolver; import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.provider.BaseColumns; import android.text.TextUtils; import android.text...
Java
package org.dodgybits.shuffle.android.core.model.persistence; import org.dodgybits.shuffle.android.core.model.Entity; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.android.core.util.ItemCache; import org.dodgybits.shuffle.android.core.util.ItemCache.ValueBuilder; import roboguice.in...
Java
package org.dodgybits.shuffle.android.core.model.persistence; import java.util.Collection; import org.dodgybits.shuffle.android.core.model.Entity; import org.dodgybits.shuffle.android.core.model.Id; import android.database.Cursor; import android.net.Uri; public interface EntityPersister<E extends Entity> { Uri...
Java
package org.dodgybits.shuffle.android.core.model.persistence; import org.dodgybits.shuffle.android.core.model.Entity; import org.dodgybits.shuffle.android.core.model.Id; public interface EntityCache<E extends Entity> { E findById(Id localId); }
Java
package org.dodgybits.shuffle.android.core.model.persistence.selector; import static org.dodgybits.shuffle.android.core.model.persistence.selector.Flag.ignored; import static org.dodgybits.shuffle.android.core.model.persistence.selector.Flag.no; import static org.dodgybits.shuffle.android.core.model.persistence.select...
Java
package org.dodgybits.shuffle.android.core.model.persistence.selector; import android.util.Log; import org.dodgybits.shuffle.android.core.model.Id; import org.dodgybits.shuffle.android.core.util.StringUtils; import org.dodgybits.shuffle.android.preference.model.ListPreferenceSettings; import java.util.ArrayList; impo...
Java
package org.dodgybits.shuffle.android.core.model.persistence.selector; import android.net.Uri; import org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider; import org.dodgybits.shuffle.android.persistence.provider.ContextProvider; import java.util.List; public class ContextSelector extends A...
Java
package org.dodgybits.shuffle.android.core.model.persistence.selector; import android.net.Uri; import org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider; import org.dodgybits.shuffle.android.persistence.provider.ProjectProvider; import java.util.List; public class ProjectSelector extends A...
Java
package org.dodgybits.shuffle.android.core.model.persistence.selector; import android.content.Context; import android.net.Uri; import org.dodgybits.shuffle.android.preference.model.ListPreferenceSettings; public interface EntitySelector<E extends EntitySelector> { Uri getContentUri(); Flag getActive(); ...
Java
package org.dodgybits.shuffle.android.core.model.persistence.selector; public enum Flag { yes, no, ignored }
Java
package org.dodgybits.shuffle.android.core.model.persistence; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import com.google.inject.Inject; import org.dodgybits.shuffle.android.core.activity.flurry.Analytics; import org.dodgybits.shuffle.android.core.model.Context; impo...
Java
package org.dodgybits.shuffle.android.core.model; public interface Entity { /** * @return primary key for entity in local sqlite DB. 0L indicates an unsaved entity. */ Id getLocalId(); /** * @return ms since epoch entity was last modified. */ long getModifiedDate(); ...
Java
package org.dodgybits.shuffle.android.core.model; public interface EntityBuilder<E> { EntityBuilder<E> mergeFrom(E e); EntityBuilder<E> setLocalId(Id id); EntityBuilder<E> setModifiedDate(long ms); EntityBuilder<E> setTracksId(Id id); EntityBuilder<E> setActive(boolean value); EntityBuilder<E>...
Java
package org.dodgybits.shuffle.android.core.view; import android.content.res.Resources; import android.text.TextUtils; public class ContextIcon { private static final String cPackage = "org.dodgybits.android.shuffle"; private static final String cType = "drawable"; public static final ContextIcon NON...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
package org.dodgybits.shuffle.android.core.view; import org.dodgybits.android.shuffle.R; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; public class IconArrayAdapter extends ArrayAdapter<CharSequence> { pr...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
/* * Copyright (C) 2009 Android Shuffle 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...
Java
package org.dodgybits.shuffle.android.core.util; import java.util.List; public class StringUtils { public static String repeat(int count, String token) { return repeat(count, token, ""); } public static String repeat(int count, String token, String delim) { StringBuilder builder = new StringBuilder(); for...
Java