Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/image_picker/image_picker_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.13+17

* Updates internal implementation to use Kotlin Pigeon.

## 0.8.13+16

* Bumps androidx.core:core from 1.17.0 to 1.18.0.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "io.flutter.plugins.imagepicker"
version = "1.0-SNAPSHOT"

buildscript {
val kotlinVersion = "2.3.20"
repositories {
google()
mavenCentral()
}

dependencies {
classpath("com.android.tools.build:gradle:8.13.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}

Expand All @@ -21,6 +25,13 @@ allprojects {

plugins {
id("com.android.library")
id("kotlin-android")
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
}
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private void setType(String type) {
prefs.edit().putString(SHARED_PREFERENCE_TYPE_KEY, type).apply();
}

void saveDimensionWithOutputOptions(Messages.ImageSelectionOptions options) {
void saveDimensionWithOutputOptions(ImageSelectionOptions options) {
final SharedPreferences prefs =
context.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = prefs.edit();
Expand All @@ -87,7 +87,7 @@ void saveDimensionWithOutputOptions(Messages.ImageSelectionOptions options) {
editor.putLong(
SHARED_PREFERENCE_MAX_HEIGHT_KEY, Double.doubleToRawLongBits(options.getMaxHeight()));
}
editor.putInt(SHARED_PREFERENCE_IMAGE_QUALITY_KEY, options.getQuality().intValue());
editor.putInt(SHARED_PREFERENCE_IMAGE_QUALITY_KEY, (int) options.getQuality());
editor.apply();
}

Expand Down Expand Up @@ -146,13 +146,12 @@ Map<String, Object> getCacheMap() {
}

if (prefs.contains(SHARED_PREFERENCE_ERROR_CODE_KEY)) {
final Messages.CacheRetrievalError.Builder error = new Messages.CacheRetrievalError.Builder();
error.setCode(prefs.getString(SHARED_PREFERENCE_ERROR_CODE_KEY, ""));
final CacheRetrievalError error =
new CacheRetrievalError(
prefs.getString(SHARED_PREFERENCE_ERROR_CODE_KEY, ""),
prefs.getString(SHARED_PREFERENCE_ERROR_MESSAGE_KEY, null));
hasData = true;
if (prefs.contains(SHARED_PREFERENCE_ERROR_MESSAGE_KEY)) {
error.setMessage(prefs.getString(SHARED_PREFERENCE_ERROR_MESSAGE_KEY, ""));
}
resultMap.put(MAP_KEY_ERROR, error.build());
resultMap.put(MAP_KEY_ERROR, error);
}

if (hasData) {
Expand All @@ -161,8 +160,8 @@ Map<String, Object> getCacheMap() {
resultMap.put(
MAP_KEY_TYPE,
typeValue.equals(MAP_TYPE_VALUE_VIDEO)
? Messages.CacheRetrievalType.VIDEO
: Messages.CacheRetrievalType.IMAGE);
? CacheRetrievalType.VIDEO
: CacheRetrievalType.IMAGE);
}
if (prefs.contains(SHARED_PREFERENCE_MAX_WIDTH_KEY)) {
final long maxWidthValue = prefs.getLong(SHARED_PREFERENCE_MAX_WIDTH_KEY, 0);
Expand Down
Loading
Loading