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 1 commit
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
Prev Previous commit
Next Next commit
Add back original public APIs and mark them as deprecated
  • Loading branch information
bkonyi committed Jan 25, 2023
commit 2115b085a0789e20be8075a9dbbc013a1a005d03
14 changes: 14 additions & 0 deletions shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,20 @@ public static String getVMServiceUri() {
return vmServiceUri;
}

/**
* VM Service URI for the VM instance.
*
* <p>Its value is set by the native engine once {@link #init(Context, String[], String, String,
* String, long)} is run.
*
* @deprecated replaced by {@link #getVMServiceUri()}.
*/
@Deprecated
@Nullable
public static String getObservatoryUri() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jmagman renaming this method had broken the espresso plugin.

Copy link
Member

Choose a reason for hiding this comment

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

return vmServiceUri;
}

/**
* Notifies the engine about the refresh rate of the display when the API level is below 30.
*
Expand Down
10 changes: 10 additions & 0 deletions shell/platform/darwin/ios/framework/Headers/FlutterEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,16 @@ FLUTTER_DARWIN_EXPORT
*/
@property(nonatomic, readonly) FlutterBasicMessageChannel* keyEventChannel;

/**
* The depcreated `NSURL` of the Dart VM Service for the service isolate.
*
* This is only set in debug and profile runtime modes, and only after the
* Dart VM Service is ready. In release mode or before the Dart VM Service has
* started, it returns `nil`.
*/
@property(nonatomic, readonly, nullable)
NSURL* observatoryUrl FLUTTER_DEPRECATED("Use vmServiceUrl instead");

/**
* The `NSURL` of the Dart VM Service for the service isolate.
*
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/darwin/ios/framework/Source/FlutterEngine.mm
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ - (FlutterBasicMessageChannel*)keyEventChannel {
return _keyEventChannel.get();
}

- (NSURL*)observatoryUrl {
return [_publisher.get() url];
}

- (NSURL*)vmServiceUrl {
return [_publisher.get() url];
}
Expand Down