Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,14 @@ public boolean onRequestPermissionsResult(
return flutterView.getPluginRegistry().onRequestPermissionsResult(requestCode, permissions, grantResults);
}

@Override
@Deprecated
public boolean onRequestPermissionResult(
int requestCode, String[] permissions, int[] grantResults) {
return onRequestPermissionsResult(requestCode, permissions, grantResults);
}
/*
* Method onRequestPermissionResult(int, String[], int[]) was made
* unavailable on 2018-02-28, following deprecation. This comment is left as
* a temporary tombstone for reference, to be removed on 2018-03-28 (or at
* least four weeks after release of unavailability).
*
* https://github.com/flutter/flutter/wiki/Changelog#typo-fixed-in-flutter-engine-android-api
*/

@Override
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import android.content.Intent;
import android.os.Bundle;
import io.flutter.plugin.common.PluginRegistry.ActivityResultListener;
import io.flutter.plugin.common.PluginRegistry.RequestPermissionResultListener;
import io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener;

/**
Expand All @@ -24,7 +23,6 @@
public interface FlutterActivityEvents
extends ComponentCallbacks2,
ActivityResultListener,
RequestPermissionResultListener,
RequestPermissionsResultListener {
/**
* @see android.app.Activity#onCreate(android.os.Bundle)
Expand Down
33 changes: 16 additions & 17 deletions shell/platform/android/io/flutter/app/FlutterPluginRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

public class FlutterPluginRegistry
implements PluginRegistry,
PluginRegistry.RequestPermissionResultListener,
PluginRegistry.RequestPermissionsResultListener,
PluginRegistry.ActivityResultListener,
PluginRegistry.NewIntentListener,
Expand Down Expand Up @@ -118,17 +117,14 @@ public Registrar publish(Object value) {
return this;
}

@Override
@Deprecated
public Registrar addRequestPermissionResultListener(
final RequestPermissionResultListener listener) {
return addRequestPermissionsResultListener(new RequestPermissionsResultListener() {
@Override
public boolean onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
return listener.onRequestPermissionResult(requestCode, permissions, grantResults);
}
});
}
/*
* Method addRequestPermissionResultListener(RequestPermissionResultListener)
* was made unavailable on 2018-02-28, following deprecation.
* This comment is left as a temporary tombstone for reference, to be removed
* on 2018-03-28 (or at least four weeks after release of unavailability).
*
* https://github.com/flutter/flutter/wiki/Changelog#typo-fixed-in-flutter-engine-android-api
*/

@Override
public Registrar addRequestPermissionsResultListener(
Expand Down Expand Up @@ -172,11 +168,14 @@ public boolean onRequestPermissionsResult(int requestCode, String[] permissions,
return false;
}

@Deprecated
@Override
public boolean onRequestPermissionResult(int requestCode, String[] permissions, int[] grantResults) {
return onRequestPermissionsResult(requestCode, permissions, grantResults);
}
/*
* Method onRequestPermissionResult(int, String[], int[]) was made
* unavailable on 2018-02-28, following deprecation. This comment is left as
* a temporary tombstone for reference, to be removed on 2018-03-28 (or at
* least four weeks after release of unavailability).
*
* https://github.com/flutter/flutter/wiki/Changelog#typo-fixed-in-flutter-engine-android-api
*/

@Override
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
Expand Down
30 changes: 16 additions & 14 deletions shell/platform/android/io/flutter/plugin/common/PluginRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ interface Registrar {
*/
Registrar addRequestPermissionsResultListener(RequestPermissionsResultListener listener);

/**
/*
* Method addRequestPermissionResultListener(RequestPermissionResultListener listener)
* was made unavailable on 2018-02-28, leaving this comment as a temporary
* tombstone for reference. This comment will be removed on 2018-03-28
* (or at least four weeks after the unavailability is released).
*
* https://github.com/flutter/flutter/wiki/Changelog#typo-fixed-in-flutter-engine-android-api
*
* Adds a callback allowing the plugin to take part in handling incoming
* calls to {@code Activity#onRequestPermissionsResult(int, String[], int[])}
* or {@code android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult(int, String[], int[])}.
Expand All @@ -144,8 +151,6 @@ interface Registrar {
* on 2018-02-06 (or at least four weeks after the deprecation is released). Use
* {@link #addRequestPermissionsResultListener(RequestPermissionsResultListener)} instead.
*/
@Deprecated
Registrar addRequestPermissionResultListener(RequestPermissionResultListener listener);

/**
* Adds a callback allowing the plugin to take part in handling incoming
Expand Down Expand Up @@ -195,24 +200,21 @@ interface RequestPermissionsResultListener {
boolean onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults);
}

/**
/*
* interface RequestPermissionResultListener was made unavailable on
* 2018-02-28, leaving this comment as a temporary tombstone for reference.
* This comment will be removed on 2018-03-28 (or at least four weeks after
* the unavailability is released).
*
* https://github.com/flutter/flutter/wiki/Changelog#typo-fixed-in-flutter-engine-android-api
*
* Delegate interface for handling result of permissions requests on
* behalf of the main {@link Activity}.
*
* Deprecated on 2018-01-02 because of misspelling. This interface will be made
* unavailable on 2018-02-06 (or at least four weeks after the deprecation is released).
* Use {@link RequestPermissionsResultListener} instead.
*/
interface RequestPermissionResultListener {
/**
* @return true if the result has been handled.
* @deprecated on 2018-01-02 because of misspelling. This method will be made
* unavailable on 2018-02-06 (or at least four weeks after the deprecation is released).
* Use {@link RequestPermissionsResultListener} instead.
*/
@Deprecated
boolean onRequestPermissionResult(int requestCode, String[] permissions, int[] grantResults);
}

/**
* Delegate interface for handling activity results on behalf of the main
Expand Down