text stringlengths 3 1.18M |
|---|
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
package org.dodgybits.shuffle.android.preference.activity;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.dodgybits.android.shuffle.R;
import org.dodgybits.shuffle.android.core.activity... |
/*
* 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... |
/*
* 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... |
package org.dodgybits.shuffle.android.preference.activity;
import org.dodgybits.shuffle.android.core.activity.flurry.FlurryEnabledActivity;
import org.dodgybits.shuffle.android.synchronisation.gae.AccountsActivity;
import android.content.Intent;
import android.os.Bundle;
public class PreferencesAppEngineSynchronizat... |
/*
* 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... |
package org.dodgybits.shuffle.android.preference.activity;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
... |
package org.dodgybits.shuffle.android.preference.activity;
import static org.dodgybits.shuffle.android.preference.model.Preferences.TRACKS_INTERVAL;
import static org.dodgybits.shuffle.android.preference.model.Preferences.TRACKS_PASSWORD;
import static org.dodgybits.shuffle.android.preference.model.Preferences.TRACKS_... |
/*
* 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... |
package org.dodgybits.shuffle.android.preference.model;
import org.dodgybits.shuffle.android.core.model.persistence.selector.Flag;
import roboguice.util.Ln;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Pref... |
package org.dodgybits.shuffle.android.preference.view;
public class Progress {
private int mProgressPercent;
private String mDetails;
private boolean mIsError;
private Runnable mErrorUIAction;
public static Progress createProgress(int progressPercent, String details) {
return new Progress(progressPercent, det... |
/*
* 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... |
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... |
/*
* 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... |
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()... |
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... |
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... |
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... |
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(... |
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... |
/*
* 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... |
/*
* 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... |
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... |
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... |
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<E>> {
Uri getContentUri();
Flag getActive();
... |
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... |
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... |
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... |
package org.dodgybits.shuffle.android.core.model.persistence.selector;
public enum Flag {
yes, no, ignored
}
|
package org.dodgybits.shuffle.android.core.model.persistence;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryCompleteTaskEvent;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryCountParam;
import static org.dodgybits.shuffle.android.core.util.Constants.cFlurryDeleteEntityE... |
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);
} |
/*
* 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... |
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... |
package org.dodgybits.shuffle.android.core.model.persistence;
import static org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider.ShuffleTable.ACTIVE;
import static org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider.ShuffleTable.DELETED;
import static org.dodgybits.sh... |
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... |
package org.dodgybits.shuffle.android.core.model.persistence;
import static org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider.ShuffleTable.ACTIVE;
import static org.dodgybits.shuffle.android.persistence.provider.AbstractCollectionProvider.ShuffleTable.DELETED;
import static org.dodgybits.sh... |
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... |
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... |
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)
... |
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... |
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;
... |
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 , ... |
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> {... |
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);
}
|
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>... |
/*
* 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... |
/*
* 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... |
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... |
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... |
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);
}
|
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)) {
... |
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.... |
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();
... |
/*
* 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... |
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... |
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... |
/*
* 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... |
/*
* 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... |
/*
* 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... |
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... |
package org.dodgybits.shuffle.android.core.configuration;
import org.dodgybits.android.shuffle.R;
import org.dodgybits.shuffle.android.core.model.Context;
import org.dodgybits.shuffle.android.core.model.Project;
import org.dodgybits.shuffle.android.core.model.Task;
import org.dodgybits.shuffle.android.core.model... |
/*
* 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... |
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... |
package org.dodgybits.shuffle.android.core.util;
import java.lang.ref.SoftReference;
import java.util.HashMap;
import android.util.Log;
/**
* Generic in-memory cache based on Romain Guy's suggestion.
* See http://code.google.com/events/io/2009/sessions/TurboChargeUiAndroidFast.html
*/
public class ItemCache<K,V> ... |
/*
* 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... |
package org.dodgybits.shuffle.android.core.util;
import java.lang.reflect.Field;
import android.os.Build;
public class OSUtils {
public static boolean osAtLeastFroyo() {
boolean isFroyoOrAbove = false;
try {
Field field = Build.VERSION.class.getDeclaredField("SDK_INT");
i... |
package org.dodgybits.shuffle.android.core.util;
public final class Constants {
private Constants() {
//deny
}
public static final String cPackage = "org.dodgybits.android.shuffle";
public static final int cVersion = 40;
public static final String cFlurryApiKey = "T7KF1PCGVU... |
package org.dodgybits.shuffle.android.core.util;
import android.net.Uri;
public class CalendarUtils {
// We can't use the constants from the provider since it's not a public portion of the SDK.
private static final Uri CALENDAR_CONTENT_URI =
Uri.parse("content://calendar/calendars"); // Calendars.C... |
/*
* Copyright (C) 2008 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 app... |
package org.dodgybits.shuffle.android.widget;
import static org.dodgybits.shuffle.android.core.util.Constants.cIdType;
import static org.dodgybits.shuffle.android.core.util.Constants.cPackage;
import static org.dodgybits.shuffle.android.core.util.Constants.cStringType;
import java.util.Arrays;
import java.util.HashMa... |
/*
* Copyright (C) 2008 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 app... |
package org.dodgybits.shuffle.android.widget;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
public class RoboAppWidgetProvider extends RoboBroadcastReceiver {
@Override
protected void handleReceive(Context context, Intent i... |
package org.dodgybits.shuffle.android.widget;
import roboguice.RoboGuice;
import roboguice.inject.RoboInjector;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
* To ensure proper ContextScope usage, override the handleReceive method
*
* Replace with rob... |
package org.dodgybits.shuffle.android.widget;
import java.util.ArrayList;
import java.util.List;
import org.dodgybits.android.shuffle.R;
import org.dodgybits.shuffle.android.core.view.IconArrayAdapter;
import org.dodgybits.shuffle.android.list.config.StandardTaskQueries;
import org.dodgybits.shuffle.android.preferenc... |
import java.io.IOException;
import ants.GameState;
import ants.TimeRunningOutException;
import ants.TurnManager;
public class MyBot {
public static void main(String[] args) throws IOException,
TimeRunningOutException {
TurnManager.playRemainingTurns(new Gam... |
package cell;
public class Ant extends Cell {
public Ant(Cell cell) {
super(cell);
}
public Ant(int row, int col) {
super(row, col);
}
}
|
package cell;
public class Hill extends Cell {
public Hill(Cell cell) {
super(cell);
}
public Hill(int row, int col) {
super(row, col);
}
}
|
package cell;
public class Dead extends Cell {
public Dead(Cell cell) {
super(cell);
}
public Dead(int row, int col) {
super(row, col);
}
}
|
package cell;
public class Visible extends Cell {
public Visible(Cell cell) {
super(cell);
}
public Visible(int row, int col) {
super(row, col);
}
}
|
package cell;
import java.util.Comparator;
import java.util.Map;
import ants.Direction;
import ants.GameState;
import com.google.common.base.Function;
/**
* Represents a (row, col) location on the game map.
*
* Is a token; it can't be changed in any way once created.
*
* No longer implements Comparable<MapLo... |
package cell;
public class Water extends Cell {
public Water(Cell cell) {
super(cell);
}
public Water(int row, int col) {
super(row, col);
}
}
|
package cell;
public class Food extends Cell {
public Food(Cell cell) {
super(cell);
}
public Food(int row, int col) {
super(row, col);
}
}
|
package cell;
public class Land extends Cell {
public Land(Cell cell) {
super(cell);
}
public Land(int row, int col) {
super(row, col);
}
}
|
package ants;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import cell.Cell;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common... |
package ants;
public class TimeRunningOutException extends RuntimeException {
private static final long serialVersionUID = 1L;
public TimeRunningOutException(String message) {
super(message);
}
}
|
package ants;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import cell.Ant;
import cell.Cell;
import cell.Food;
import cell.Hill;
import cell.Land;
import cell.Visible;
import cell.Water;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Immutabl... |
package ants;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.regex.Pattern;
import cell.Ant;
import cell.Cell;
import cell.Food;
import cell.Hill;
import cell.Land;
import cell.Visible;
import com.... |
package ants;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import cell.Cell;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
/**
* Represents the directions of ant neighbor cells.
*/
publi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.