~singpolyma/cheogram-android

e65ee62cd3eec4c01d4c5752b5ba1aecd87a09bb — Stephen Paul Weber 2 years ago 9fa4b88
Polyfill to allow use on Android 21
2 files changed, 7 insertions(+), 3 deletions(-)

M build.gradle
M src/main/java/eu/siacs/conversations/ui/widget/DialpadView.java
M build.gradle => build.gradle +1 -1
@@ 90,7 90,7 @@ android {
    compileSdkVersion 29

    defaultConfig {
        minSdkVersion 24
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 42024
        versionName "2.10.3-beta"

M src/main/java/eu/siacs/conversations/ui/widget/DialpadView.java => src/main/java/eu/siacs/conversations/ui/widget/DialpadView.java +6 -2
@@ 26,7 26,7 @@ import eu.siacs.conversations.R;

public class DialpadView extends ConstraintLayout implements View.OnClickListener {

    protected java.util.function.Consumer<String> clickConsumer = null;
    protected Consumer<String> clickConsumer = null;

    public DialpadView(Context context) {
        super(context);


@@ 43,7 43,7 @@ public class DialpadView extends ConstraintLayout implements View.OnClickListene
        init();
    }

    public void setClickConsumer(java.util.function.Consumer<String> clickConsumer) {
    public void setClickConsumer(Consumer<String> clickConsumer) {
        this.clickConsumer = clickConsumer;
    }



@@ 72,4 72,8 @@ public class DialpadView extends ConstraintLayout implements View.OnClickListene
        clickConsumer.accept(v.getTag().toString());
    }

	// Based on java.util.function.Consumer to avoid Android 24 dependency
	public interface Consumer<T> {
		void accept(T t);
	}
}