Permalink
Browse files

Remove Rasterizer

  • Loading branch information...
pocorall committed Sep 28, 2017
1 parent 3624348 commit b4fcbd0c25870941af727b382cee500600b7594e
@@ -128,7 +128,8 @@ object AndroidClassExtractor extends JavaConversionHelpers {
m =>
(!cls.getName.endsWith("Service") || !m.getName.equals("setForeground")) && // Android 2.1.1 has a weird undocumented method. manually ignore this.
(!cls.getName.endsWith("WebView") || !m.getName.equals("getZoomControls")) && //https://github.com/pocorall/scaloid/issues/56
(!cls.getName.endsWith("View") || !m.getName.equals("setBackground")) // manually specifies this method
(!cls.getName.endsWith("View") || !m.getName.equals("setBackground")) && // manually specifies this method
(!cls.getName.endsWith("Paint") || !m.getName.contains("Rasterizer")) // Rasterizer is removed in Android 8
}
val allMethodNames = clsMethods.map(_.getName).toSet
View
@@ -23,8 +23,8 @@ object ScaloidBuild extends Build {
organizationHomepage := Some(new URL("http://blog.scaloid.org")),
description := "Less Painful Android Development with Scala",
startYear := Some(2012),
scalaVersion := "2.11.7",
crossScalaVersions := Seq("2.11.7"), // only 2.11.x for now
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8"), // only 2.11.x for now
version := scaloidVersion,
publishMavenStyle := true,
publishTo <<= version {
@@ -11347,21 +11347,6 @@ trait TraitPaint[This <: android.graphics.Paint] {
*/
@inline def pathEffect_=(p: android.graphics.PathEffect) = { basis.setPathEffect(p); basis }
/**
* Shortcut for `[[https://developer.android.com/reference/android/graphics/Paint.html#getRasterizer() getRasterizer()]]`
*/
@inline def rasterizer = basis.getRasterizer
/**
* Shortcut for `[[https://developer.android.com/reference/android/graphics/Paint.html#setRasterizer(android.graphics.Rasterizer) setRasterizer(android.graphics.Rasterizer)]]`
*/
@inline def rasterizer(p: android.graphics.Rasterizer) = rasterizer_=(p)
/**
* Shortcut for `[[https://developer.android.com/reference/android/graphics/Paint.html#setRasterizer(android.graphics.Rasterizer) setRasterizer(android.graphics.Rasterizer)]]`
*/
@inline def rasterizer_=(p: android.graphics.Rasterizer) = { basis.setRasterizer(p); basis }
/**
* Shortcut for `[[https://developer.android.com/reference/android/graphics/Paint.html#getShader() getShader()]]`
*/
@@ -215,6 +215,16 @@ class LocalServiceConnection[S <: LocalService](bindFlag: Int = Context.BIND_AUT
*/
def apply[T](test: S => Boolean, ifTrue: S => T, ifFalse: => T) = if(service.nonEmpty && test(service.get)) ifTrue(service.get) else ifFalse
/**
* Execute given function and returns value if the service is connected.
* If the service is not connected yet, this does nothing and returns an empty option
* for example:
* val service = new LocalServiceConnection[MyService]
* //...
* val fooOption = service.maybe(_.foo)
*/
def maybe[T](f: S => T): Option[T] = service.map(f)
/**
* Internal implementation for handling the service connection. You do not need to call this method.
*/

0 comments on commit b4fcbd0

Please sign in to comment.