-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8343398: Add reducedData preference #1656
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back mstrauss! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@mstr2 has indicated that a compatibility and specification (CSR) request is needed for this pull request. @mstr2 please create a CSR request for issue JDK-8343398 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
Webrevs
|
This PR also includes a small refactor of the GTK and macOS The previous implementations had some parts of the change notification mechanism implemented outside of |
It works on my 14.6 machine. Let me try upgrading and testing again... |
I might suggest adding the instructions on how to control the platform settings as comments somewhere in the implementation.
|
(I've merged the latest master prior to testing) |
It also works on 15.1.1 on my machine. Just to check the obvious: did you close the WiFi Details window? The settings are only applied when you click OK. |
Update: I was getting interference from the VPN application. Getting off the VPN helped - I see the property and ( |
That's the expected result. |
I feel this wouldn't age well, considering that the particular UI used by the different operating systems has often changed over the years. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the scope of this change goes far beyond adding a few properties. It looks like a non-trivial refactoring that might also impact other platform preferences.
I did check that switching between light/dark modes on macOS results in proper updates, but the native code needs to be re-reviewed.
@@ -204,6 +187,7 @@ - (void)applicationWillFinishLaunching:(NSNotification *)aNotification | |||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |||
{ | |||
// unblock main thread. Glass is started at this point. | |||
self->platformSupport = [[PlatformSupport alloc] initWithEnv:env application:jApplication]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we check for failure here? (alloc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never do that in obj-c native code, so this probably wouldn't be the place to start. In any case, a failure at this point wouldn't lead to a crash, as the only access of platformSupport
checks for nil
.
I think it has merit. Now that we need to re-test the functionality, it would have helped. Even when something changes, it will be easier to look up a few missing pieces than dig through the PRs... |
I think this sort of information is better suited for a Wiki. Btw, I can review the native code changes. Just not for a couple days. |
tested macOS behavior, all is well. BTW, I've updated the Monkey Tester to highlight changes in Tools -> Platform Preferences Monitor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on macOS. needs testing on linux and windows.
That seems useful. Thanks.
I can test Windows and Linux (I'll skip macOS since you've already done that). |
The
reducedData
preference instructs applications to minimize internet traffic, as users might be on a metered network or a limited data plan.This corresponds to the following OS settings:
Windows: Settings -> Network and Internet -> Ethernet/WiFi -> Metered connection
macOS: Settings -> Network -> Ethernet/WiFi -> Network Settings -> Low data mode
Ubuntu: Settings -> Network -> Wired/WiFi -> Metered connection
Change notifications work consistently on Windows and macOS. On my Ubuntu 24 system, the GIO
network-changed
signal is not sent when I only toggle the "metered connection" flag in network settings (and there's no signal specifically for low-data mode). The new value is only picked up when the connection changes by coming offline or going online./reviewers 2
/csr
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1656/head:pull/1656
$ git checkout pull/1656
Update a local copy of the PR:
$ git checkout pull/1656
$ git pull https://git.openjdk.org/jfx.git pull/1656/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1656
View PR using the GUI difftool:
$ git pr show -t 1656
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1656.diff
Using Webrev
Link to Webrev Comment