mirror of https://github.com/tasks/tasks
Add Amazon build flavor
parent
4f4b83bde3
commit
6410570d84
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.tasks">
|
||||
|
||||
<application>
|
||||
<!-- Google Analytics -->
|
||||
|
||||
<receiver
|
||||
android:name="com.google.android.gms.analytics.AnalyticsReceiver"
|
||||
android:enabled="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<service
|
||||
android:name="com.google.android.gms.analytics.AnalyticsService"
|
||||
android:enabled="true"
|
||||
android:exported="false" />
|
||||
|
||||
<receiver
|
||||
android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.vending.INSTALL_REFERRER" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<service android:name="com.google.android.gms.analytics.CampaignTrackingService" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,23 @@
|
||||
package com.todoroo.astrid.gtasks;
|
||||
|
||||
import com.todoroo.astrid.api.Filter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class GtasksFilterExposer {
|
||||
@Inject
|
||||
public GtasksFilterExposer() {
|
||||
|
||||
}
|
||||
|
||||
public List<Filter> getFilters() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
public Filter getFilter(long aLong) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.todoroo.astrid.gtasks;
|
||||
|
||||
import com.todoroo.astrid.activity.TaskListFragment;
|
||||
import com.todoroo.astrid.api.GtasksFilter;
|
||||
import com.todoroo.astrid.subtasks.SubtasksListFragment;
|
||||
|
||||
public class GtasksListFragment extends SubtasksListFragment {
|
||||
public static final String TOKEN_STORE_ID = "storeId";
|
||||
|
||||
public static TaskListFragment newGtasksListFragment(GtasksFilter gtasksFilter, GtasksList list) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.todoroo.astrid.gtasks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class GtasksListService {
|
||||
|
||||
@Inject
|
||||
public GtasksListService() {
|
||||
|
||||
}
|
||||
|
||||
public List<GtasksList> getLists() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
public GtasksList getList(long storeId) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.todoroo.astrid.gtasks.sync;
|
||||
|
||||
import com.todoroo.astrid.gtasks.GtasksList;
|
||||
import com.todoroo.astrid.sync.SyncResultCallback;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class GtasksSyncV2Provider {
|
||||
|
||||
@Inject
|
||||
public GtasksSyncV2Provider() {
|
||||
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void synchronizeActiveTasks(SyncResultCallback callback) {
|
||||
|
||||
}
|
||||
|
||||
public void synchronizeList(GtasksList list, SyncResultCallback callback) {
|
||||
|
||||
}
|
||||
|
||||
public void clearCompleted(GtasksList list, SyncResultCallback callback) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package org.tasks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class AccountManager {
|
||||
|
||||
@Inject
|
||||
public AccountManager() {
|
||||
}
|
||||
|
||||
public List<String> getAccounts() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
public boolean hasAccount(String account) {
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package org.tasks;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class FlavorSetup {
|
||||
@Inject
|
||||
public FlavorSetup() {
|
||||
|
||||
}
|
||||
|
||||
public void setup() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package org.tasks.activities;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class ClearGtaskDataActivity {
|
||||
@Inject
|
||||
public ClearGtaskDataActivity() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package org.tasks.analytics;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.google.android.gms.analytics.GoogleAnalytics;
|
||||
import com.google.android.gms.analytics.HitBuilders;
|
||||
import com.google.android.gms.analytics.StandardExceptionParser;
|
||||
|
||||
import org.tasks.BuildConfig;
|
||||
import org.tasks.R;
|
||||
import org.tasks.injection.ForApplication;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class Tracker {
|
||||
|
||||
private final GoogleAnalytics analytics;
|
||||
private final com.google.android.gms.analytics.Tracker tracker;
|
||||
private final StandardExceptionParser exceptionParser;
|
||||
private Context context;
|
||||
|
||||
@Inject
|
||||
public Tracker(@ForApplication Context context) {
|
||||
this.context = context;
|
||||
analytics = GoogleAnalytics.getInstance(context);
|
||||
tracker = analytics.newTracker(R.xml.google_analytics);
|
||||
tracker.setAppVersion(Integer.toString(BuildConfig.VERSION_CODE));
|
||||
exceptionParser = new StandardExceptionParser(context, null);
|
||||
if (BuildConfig.DEBUG) {
|
||||
analytics.setDryRun(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void showScreen(String screenName) {
|
||||
tracker.setScreenName(screenName);
|
||||
tracker.send(new HitBuilders.ScreenViewBuilder().build());
|
||||
}
|
||||
|
||||
public void setTrackingEnabled(boolean enabled) {
|
||||
analytics.setAppOptOut(!enabled);
|
||||
}
|
||||
|
||||
public void reportException(Exception e) {
|
||||
tracker.send(new HitBuilders.ExceptionBuilder()
|
||||
.setDescription(exceptionParser.getDescription(Thread.currentThread().getName(), e))
|
||||
.setFatal(false)
|
||||
.build());
|
||||
}
|
||||
|
||||
public void reportEvent(Tracking.Events event) {
|
||||
HitBuilders.EventBuilder eventBuilder = new HitBuilders.EventBuilder()
|
||||
.setCategory(context.getString(event.category))
|
||||
.setAction(context.getString(event.action));
|
||||
if (event.label > 0) {
|
||||
eventBuilder.setLabel(context.getString(event.label));
|
||||
}
|
||||
tracker.send(eventBuilder.build());
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package org.tasks.dialogs;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class AccountSelectionDialog {
|
||||
@Inject
|
||||
public AccountSelectionDialog() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package org.tasks.injection;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Singleton
|
||||
@Subcomponent(modules = ActivityModule.class)
|
||||
public interface ActivityComponent extends BaseActivityComponent {
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package org.tasks.injection;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent(modules = BroadcastModule.class)
|
||||
public interface BroadcastComponent extends BaseBroadcastComponent {
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package org.tasks.injection;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
@Subcomponent(modules = ServiceModule.class)
|
||||
public interface ServiceComponent extends BaseServiceComponent {
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package org.tasks.location;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@SuppressWarnings("EmptyMethod")
|
||||
public class GeofenceApi {
|
||||
|
||||
@Inject
|
||||
public GeofenceApi() {
|
||||
|
||||
}
|
||||
|
||||
public void register(List<Geofence> activeGeofences) {
|
||||
|
||||
}
|
||||
|
||||
public void cancel(Geofence geofence) {
|
||||
|
||||
}
|
||||
|
||||
public void cancel(List<Geofence> geofences) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package org.tasks.location;
|
||||
|
||||
public class GeofenceTransitionsIntentService {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.tasks.location;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import org.tasks.preferences.Preferences;
|
||||
|
||||
public class PlacePicker {
|
||||
public static Intent getIntent(Activity activity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Geofence getPlace(Context context, Intent data, Preferences preferences) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package org.tasks.preferences;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.tasks.R;
|
||||
import org.tasks.injection.ActivityComponent;
|
||||
|
||||
public class BasicPreferences extends BaseBasicPreferences {
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
requires(false, R.string.synchronization, R.string.get_plugins);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inject(ActivityComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package org.tasks.scheduling;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class GtasksBackgroundService {
|
||||
@Inject
|
||||
public GtasksBackgroundService() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package org.tasks.injection;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Component;
|
||||
|
||||
@Singleton
|
||||
@Component(modules = TestModule.class)
|
||||
public interface TestComponent extends BaseTestComponent {
|
||||
}
|
@ -1,12 +1,11 @@
|
||||
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tasks="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/asAbBackgroundColor"
|
||||
android:paddingEnd="@dimen/toolbar_horizontal_padding"
|
||||
android:paddingRight="@dimen/toolbar_horizontal_padding"
|
||||
android:elevation="@dimen/elevation_toolbar"
|
||||
tasks:popupTheme="?attr/popup_theme"
|
||||
tasks:theme="@style/ActionBarThemeOverlay"
|
||||
tasks:titleTextAppearance="@style/ActionBar.TitleText" />
|
||||
app:toolbarStyle="@style/Toolbar"
|
||||
app:popupTheme="?attr/popup_theme"
|
||||
app:theme="@style/ActionBarThemeOverlay"
|
||||
app:titleTextAppearance="@style/ActionBar.TitleText" />
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="keyline_first">24dp</dimen>
|
||||
<dimen name="toolbar_horizontal_padding">12dp</dimen>
|
||||
<dimen name="keyline_second_absolute">68dp</dimen>
|
||||
<dimen name="keyline_content_inset">68dp</dimen>
|
||||
</resources>
|
Loading…
Reference in New Issue