Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf68aac5 authored by Ricki Hirner's avatar Ricki Hirner
Browse files

OpenTasks update

* move contract to subdirectory (copied from recent OpenTasks)
* support minimum required version for OpenTasks
* use uid field for tasks
* support task color field
parent bff8e5b8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line

buildscript {
    ext.kotlin_version = '1.1.61'
    ext.kotlin_version = '1.2.10'
    ext.dokka_version = '0.9.15'

    repositories {
@@ -47,6 +47,10 @@ android {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
    }

    sourceSets {
        main.java.srcDirs = [ "src/main/java", "opentasks-contract/src/main/java" ]
    }
}

dependencies {
+1 −0
Original line number Diff line number Diff line
/build
+5 −0
Original line number Diff line number Diff line
<manifest package="org.dmfs.tasks.contract">

    <application/>

</manifest>
+1645 −0

File added.

Preview size limit exceeded, changes collapsed.

+27 −26
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014 Marten Gajda <marten@dmfs.org>
 * Copyright 2017 dmfs GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -12,44 +12,45 @@
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */

package org.dmfs.provider.tasks;
package org.dmfs.tasks.contract;

import android.net.Uri;

import java.util.HashMap;
import java.util.Map;

import android.net.Uri;


public class UriFactory
/**
 * TODO
 */
public final class UriFactory
{
	public final String authority;

    private final String mAuthority;
    private final Map<String, Uri> mUriMap = new HashMap<String, Uri>(16);


    UriFactory(String authority)
    {
		this.authority = authority;
        mAuthority = authority;
        mUriMap.put((String) null, Uri.parse("content://" + authority));
    }


    void addUri(String path)
    {
		mUriMap.put(path, Uri.parse("content://" + authority + "/" + path));
        mUriMap.put(path, Uri.parse("content://" + mAuthority + "/" + path));
    }


	public Uri getUri()
    Uri getUri()
    {
        return mUriMap.get(null);
    }


	public Uri getUri(String path)
    Uri getUri(String path)
    {
        return mUriMap.get(path);
    }
Loading