Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e440cbe
Bump android_intent, battery, connectivity,espresso
camsim99 Nov 11, 2021
1ebdb16
Bump in actuality android_intent, battery, connectivity, espresso, fl…
camsim99 Nov 11, 2021
3bee3c7
Bump google_maps_flutter
camsim99 Nov 11, 2021
66bfddc
Bump android_alarm_manager
camsim99 Nov 11, 2021
aab0a83
Bump google_sign_in
camsim99 Nov 11, 2021
e40e1d6
Bump image_picker
camsim99 Nov 11, 2021
8619c7d
Bump in_app_purchase
camsim99 Nov 11, 2021
3b7afdc
Bump local_auth
camsim99 Nov 11, 2021
ef95aa4
Bump package_info
camsim99 Nov 11, 2021
c25cbac
Bump path_provider
camsim99 Nov 11, 2021
fd92106
Bump quick_actions
camsim99 Nov 11, 2021
309c971
Bump sensors
camsim99 Nov 11, 2021
8466119
Bump share
camsim99 Nov 11, 2021
87845cf
Bump shared_preferences
camsim99 Nov 11, 2021
843bcb4
Bump url_launcher
camsim99 Nov 11, 2021
da93b62
Bump video_player
camsim99 Nov 11, 2021
74e14ea
Bump webview_flutter
camsim99 Nov 11, 2021
9cdca3e
Bump wifi_info_flutter
camsim99 Nov 11, 2021
d2674f7
Fix pathproviderplugin unsafe operation
camsim99 Nov 12, 2021
ffa2bb7
Add thread annotation
camsim99 Nov 15, 2021
7976b3b
Move method to worker thread
camsim99 Nov 15, 2021
8087087
Format method
camsim99 Nov 15, 2021
db6b14b
Add executor
camsim99 Nov 15, 2021
9cfa5e7
Add version check
camsim99 Nov 15, 2021
09a9fbd
Correct comparison:
camsim99 Nov 15, 2021
d6e2d87
Merge remote-tracking branch 'upstream/master' into bump_sdk_versions
camsim99 Nov 15, 2021
6c60ea2
Correct plugin versions
camsim99 Nov 16, 2021
58b2e51
Bump device info
camsim99 Nov 16, 2021
1f8421e
Correct versions
camsim99 Nov 16, 2021
8de519d
Bump non-android example apps
camsim99 Nov 16, 2021
9091448
Bump other path_provider example app
camsim99 Nov 16, 2021
15cf578
Standardize changelogs
camsim99 Nov 16, 2021
59217c4
Fix typo
camsim99 Nov 16, 2021
b00a788
Change changelogs to present tense
camsim99 Nov 16, 2021
cdf96ea
Undo actual plugin bump
camsim99 Nov 16, 2021
b2a7af3
Update changelog message
camsim99 Nov 16, 2021
2fbd39b
Fix deprecation versioning
camsim99 Nov 16, 2021
feefd6a
Undid version bumps, modified one
camsim99 Nov 16, 2021
e0c36a8
Undid version bumps
camsim99 Nov 16, 2021
cd1cab1
Changed tense in changelog
camsim99 Nov 16, 2021
71c1069
Correct changelog
camsim99 Nov 16, 2021
b87f68e
Clarify changelog edit
camsim99 Nov 16, 2021
b291164
Address nits
camsim99 Nov 17, 2021
d9f45b9
Moved call to result.success
camsim99 Nov 18, 2021
3e8fa4f
Merge remote-tracking branch 'upstream/master' into bump_sdk_versions
camsim99 Nov 18, 2021
615361c
Move if statement
camsim99 Nov 18, 2021
868547c
Format file
camsim99 Nov 18, 2021
defee15
Correct thread
camsim99 Nov 18, 2021
70b431b
Merge remote-tracking branch 'upstream/master' into bump_sdk_versions
camsim99 Nov 18, 2021
dc5a2d6
Merge remote-tracking branch 'upstream/master' into bump_sdk_versions
camsim99 Nov 18, 2021
b1758c6
Formatting, add todo
camsim99 Nov 18, 2021
df34dd2
Merge remote-tracking branch 'upstream/master' into bump_sdk_versions
camsim99 Nov 19, 2021
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
1 change: 1 addition & 0 deletions packages/android_alarm_manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Remove support for the V1 Android embedding.
* Updated Android lint settings.
* Removed `-Werror` in Android builds.
* Updates example app Android compileSdkVersion to 31.

## 2.0.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
1 change: 1 addition & 0 deletions packages/android_intent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Updated Android lint settings.
* Specify Java 8 for Android build.
* Removed `-Werror` in Android builds.
* Updates example app Android compileSdkVersion to 31.

## 2.0.2

Expand Down
2 changes: 1 addition & 1 deletion packages/android_intent/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
1 change: 1 addition & 0 deletions packages/battery/battery/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Remove references to the Android v1 embedding.
* Updated Android lint settings.
* Updates example app Android compileSdkVersion to 31.
* Recreated Android example from current template.

## 2.0.3
Expand Down
2 changes: 1 addition & 1 deletion packages/battery/battery/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
1 change: 1 addition & 0 deletions packages/connectivity/connectivity/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Updated Android lint settings.
* Specify Java 8 for Android build.
* Removed `-Werror` in Android builds.
* Updates example app Android compileSdkVersion to 31.

## 3.0.6

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 4 additions & 0 deletions packages/device_info/device_info/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

## 2.0.3

* Remove references to the Android V1 embedding.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 4 additions & 0 deletions packages/espresso/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

## 0.1.0+4

* Updated Android lint settings.
Expand Down
2 changes: 1 addition & 1 deletion packages/espresso/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 4 additions & 0 deletions packages/flutter_plugin_android_lifecycle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

## 2.0.4

* Updated Android lint settings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 4 additions & 0 deletions packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

## 2.1.1

* Suppresses unchecked cast warning.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 4 additions & 0 deletions packages/google_sign_in/google_sign_in/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

## 5.2.1

Change the placeholder of the GoogleUserCircleAvatar to a transparent image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
1 change: 1 addition & 0 deletions packages/image_picker/image_picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.
* Fix iOS RunnerUITests search paths.

## 0.8.4+4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31
testOptions.unitTests.includeAndroidResources = true

lintOptions {
Expand Down
2 changes: 2 additions & 0 deletions packages/in_app_purchase/in_app_purchase/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

* **BREAKING CHANGES**:
* Renames `in_app_purchase_ios` to `in_app_purchase_storekit`.
* Renames `InAppPurchaseIosPlatform` to `InAppPurchaseStoreKitPlatform`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ android {
}
}

compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 4 additions & 0 deletions packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

## 0.2.0

* BREAKING CHANGE : Refactor to handle new `PurchaseStatus` named `canceled`. This means developers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ android {
}
}

compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 4 additions & 0 deletions packages/local_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

## 1.1.8

* Update minimum Flutter SDK to 2.5 and iOS deployment target to 9.0.
Expand Down
2 changes: 1 addition & 1 deletion packages/local_auth/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
2 changes: 1 addition & 1 deletion packages/package_info/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Remove references to the Android v1 embedding.
* Updated Android lint settings.
* Update Android compileSdkVersion to 30.
* Updates example app Android compileSdkVersion to 31.

## 2.0.2

Expand Down
2 changes: 1 addition & 1 deletion packages/package_info/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 4 additions & 0 deletions packages/path_provider/path_provider/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Updates example app Android compileSdkVersion to 31.

## 2.0.7

* Moved Android and iOS implementations to federated packages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
5 changes: 5 additions & 0 deletions packages/path_provider/path_provider_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.0.8

* Updates example app Android compileSdkVersion to 31.
* Fixes typing build warning.

## 2.0.7

* Fixes link in README.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private String getPathProviderStorageDirectory() {
}

private List<String> getPathProviderExternalCacheDirectories() {
final List<String> paths = new ArrayList<>();
final List<String> paths = new ArrayList<String>();
Copy link
Contributor Author

@camsim99 camsim99 Nov 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Type added to help fix warnings given by flutter build apk.


if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
for (File dir : context.getExternalCacheDirs()) {
Expand All @@ -262,7 +262,7 @@ private List<String> getPathProviderExternalCacheDirectories() {
}

private List<String> getPathProviderExternalStorageDirectories(String type) {
final List<String> paths = new ArrayList<>();
final List<String> paths = new ArrayList<String>();

if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
for (File dir : context.getExternalFilesDirs(type)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
2 changes: 1 addition & 1 deletion packages/path_provider/path_provider_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: path_provider_android
description: Android implementation of the path_provider plugin.
repository: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22
version: 2.0.7
version: 2.0.8

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down
5 changes: 5 additions & 0 deletions packages/quick_actions/quick_actions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.6.0+8

* Updates example app Android compileSdkVersion to 31.
* Moves method call to background thread to fix CI failure.

## 0.6.0+7

* Update minimum Flutter SDK to 2.5 and iOS deployment target to 9.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
import android.content.res.Resources;
import android.graphics.drawable.Icon;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

class MethodCallHandlerImpl implements MethodChannel.MethodCallHandler {
protected static final String EXTRA_ACTION = "some unique action key";
Expand Down Expand Up @@ -47,10 +53,42 @@ public void onMethodCall(MethodCall call, MethodChannel.Result result) {
(ShortcutManager) context.getSystemService(Context.SHORTCUT_SERVICE);
switch (call.method) {
case "setShortcutItems":
List<Map<String, String>> serializedShortcuts = call.arguments();
List<ShortcutInfo> shortcuts = deserializeShortcuts(serializedShortcuts);
shortcutManager.setDynamicShortcuts(shortcuts);
break;
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) {
List<Map<String, String>> serializedShortcuts = call.arguments();
List<ShortcutInfo> shortcuts = deserializeShortcuts(serializedShortcuts);

Executor uiThreadExecutor = new UiThreadExecutor();
ThreadPoolExecutor executor =
new ThreadPoolExecutor(
0, 1, 1, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());

executor.execute(
() -> {
boolean dynamicShortcutsSet = false;
try {
shortcutManager.setDynamicShortcuts(shortcuts);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now you are calling result after you've dispatched the message to the background thread. You should call the result after the background task has executed (calling result from the background thread should be thread-safe now, no need to dispatch back to the main thread).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling result from the background thread should be thread-safe now

Does "now" include stable? Plugins support at least back to last stable (often more, but currently for this plugin it's 2.5)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it doesn't I corrected myself over chat. We can't call the result directly until background platform channels is on stable.

dynamicShortcutsSet = true;
} catch (Exception e) {
// Leave dynamicShortcutsSet as false
}

final boolean didSucceed = dynamicShortcutsSet;

// TODO(camsim99): Move re-dispatch below to background thread when Flutter 2.8+ is stable.
uiThreadExecutor.execute(
() -> {
if (didSucceed) {
result.success(null);
} else {
result.error(
"quick_action_setshortcutitems_failure",
"Exception thrown when setting dynamic shortcuts",
null);
}
});
});
}
return;
case "clearShortcutItems":
shortcutManager.removeAllDynamicShortcuts();
break;
Expand Down Expand Up @@ -127,4 +165,13 @@ private Intent getIntentToOpenMainActivity(String type) {
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
}

private static class UiThreadExecutor implements Executor {
private final Handler handler = new Handler(Looper.getMainLooper());

@Override
public void execute(Runnable command) {
handler.post(command);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 31

lintOptions {
disable 'InvalidPackage'
Expand Down
Loading