Merge "Fix kotlinc warnings in EasterEgg."
am: d913216e27
Change-Id: Ib0128b40a8087096765b7268eaf2591973feb993
This commit is contained in:
@@ -26,15 +26,16 @@ class CutoutAvoidingToolbar : LinearLayout {
|
|||||||
private var _insets: WindowInsets? = null
|
private var _insets: WindowInsets? = null
|
||||||
|
|
||||||
constructor(context: Context) : super(context) {
|
constructor(context: Context) : super(context) {
|
||||||
init(null, 0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
||||||
init(attrs, 0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
|
constructor(
|
||||||
init(attrs, defStyle)
|
context: Context,
|
||||||
|
attrs: AttributeSet,
|
||||||
|
defStyle: Int
|
||||||
|
) : super(context, attrs, defStyle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
|
||||||
@@ -81,8 +82,4 @@ class CutoutAvoidingToolbar : LinearLayout {
|
|||||||
requestLayout()
|
requestLayout()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun init(attrs: AttributeSet?, defStyle: Int) {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package com.android.egg.paint
|
package com.android.egg.paint
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.res.Resources
|
|
||||||
import android.graphics.*
|
import android.graphics.*
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
@@ -26,7 +25,6 @@ import android.view.MotionEvent
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.WindowInsets
|
import android.view.WindowInsets
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
import android.util.Log
|
|
||||||
import android.provider.Settings.System
|
import android.provider.Settings.System
|
||||||
|
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
@@ -113,7 +111,9 @@ public class Painting : View, SpotFilter.Plotter {
|
|||||||
FADE_TO_BLACK_CF
|
FADE_TO_BLACK_CF
|
||||||
|
|
||||||
synchronized(_bitmapLock) {
|
synchronized(_bitmapLock) {
|
||||||
c.drawBitmap(bitmap, 0f, 0f, pt)
|
bitmap?.let {
|
||||||
|
c.drawBitmap(bitmap!!, 0f, 0f, pt)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
invalidate()
|
invalidate()
|
||||||
}
|
}
|
||||||
@@ -122,18 +122,22 @@ public class Painting : View, SpotFilter.Plotter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context) : super(context) {
|
constructor(context: Context) : super(context) {
|
||||||
init(null, 0)
|
init()
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
||||||
init(attrs, 0)
|
init()
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
|
constructor(
|
||||||
init(attrs, defStyle)
|
context: Context,
|
||||||
|
attrs: AttributeSet,
|
||||||
|
defStyle: Int
|
||||||
|
) : super(context, attrs, defStyle) {
|
||||||
|
init()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun init(attrs: AttributeSet?, defStyle: Int) {
|
private fun init() {
|
||||||
loadDevicePressureData()
|
loadDevicePressureData()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +268,7 @@ public class Painting : View, SpotFilter.Plotter {
|
|||||||
super.onDraw(canvas)
|
super.onDraw(canvas)
|
||||||
|
|
||||||
bitmap?.let {
|
bitmap?.let {
|
||||||
canvas.drawBitmap(bitmap, 0f, 0f, _drawPaint);
|
canvas.drawBitmap(bitmap!!, 0f, 0f, _drawPaint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,9 +354,10 @@ public class Painting : View, SpotFilter.Plotter {
|
|||||||
val invertPaint = Paint()
|
val invertPaint = Paint()
|
||||||
invertPaint.colorFilter = INVERT_CF
|
invertPaint.colorFilter = INVERT_CF
|
||||||
synchronized(_bitmapLock) {
|
synchronized(_bitmapLock) {
|
||||||
_paintCanvas?.drawBitmap(bitmap, 0f, 0f, invertPaint)
|
bitmap?.let {
|
||||||
|
_paintCanvas?.drawBitmap(bitmap!!, 0f, 0f, invertPaint)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
invalidate()
|
invalidate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,19 +17,10 @@
|
|||||||
package com.android.egg.paint
|
package com.android.egg.paint
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Canvas
|
|
||||||
import android.graphics.Color
|
|
||||||
import android.graphics.Paint
|
|
||||||
import android.graphics.Rect
|
|
||||||
import android.graphics.drawable.Drawable
|
|
||||||
import android.text.TextPaint
|
|
||||||
import android.transition.ChangeBounds
|
|
||||||
import android.transition.Transition
|
import android.transition.Transition
|
||||||
import android.transition.TransitionListenerAdapter
|
import android.transition.TransitionListenerAdapter
|
||||||
import android.transition.TransitionManager
|
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.animation.OvershootInterpolator
|
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
|
|
||||||
class ToolbarView : FrameLayout {
|
class ToolbarView : FrameLayout {
|
||||||
@@ -44,15 +35,16 @@ class ToolbarView : FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context) : super(context) {
|
constructor(context: Context) : super(context) {
|
||||||
init(null, 0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
||||||
init(attrs, 0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) {
|
constructor(
|
||||||
init(attrs, defStyle)
|
context: Context,
|
||||||
|
attrs: AttributeSet,
|
||||||
|
defStyle: Int
|
||||||
|
) : super(context, attrs, defStyle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onApplyWindowInsets(insets: WindowInsets?): WindowInsets {
|
override fun onApplyWindowInsets(insets: WindowInsets?): WindowInsets {
|
||||||
@@ -70,8 +62,4 @@ class ToolbarView : FrameLayout {
|
|||||||
|
|
||||||
return super.onApplyWindowInsets(insets)
|
return super.onApplyWindowInsets(insets)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun init(attrs: AttributeSet?, defStyle: Int) {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user