Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Use androidx.core.graphics.PathParser instead of accessing a non-SDK interface via reflection #77

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions richpath/src/main/java/com/richpath/pathparser/PathParser.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.richpath.pathparser

import android.graphics.Path
import android.os.Build
import androidx.core.graphics.PathParser

object PathParser {

Expand All @@ -10,11 +10,7 @@ object PathParser {
* @return the generated Path object.
*/
fun createPathFromPathData(pathData: String?): Path {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
PathParserCompatApi21.createPathFromPathData(pathData) ?: Path()
} else {
PathParserCompat.createPathFromPathData(pathData)
}
return PathParser.createPathFromPathData(pathData) ?: Path()
}

}

This file was deleted.