There is a rather hidden feature, that will let you achieve this:
This option is found under Settings > Data usage (Wireless and Networks).
- Tap on the three dots in the top right corner, and press "Mobile Hotspots." (In android 4.3) In later versions of android the similar option is "Network restrictions" > Metered connections
Next you'll see a list of saved wireless networks, and you can check the ones which are mobile hotspots.
I have included the screenshots for Android 7, since interface and options are different from Android 4.3 above:
Such that the options are found under Settings > Data usage (Wi-Fi) > Network restrictions > Metered connections
In this way Android applies the same data restrictions as it does with "Data connections" so no data hogging.
Other devices like Huawei have this setting hidden but can be also enable using adb:
After setting up adb, follow this proceedure to set a metered wi-fi network.
In a command prompt or terminal, execute the following command:
Type the following command into the command prompt or terminal to get a list of all saved WiFi networks:
cmd netpolicy list
You’ll be given a list of saved WiFi networks with a true/false boolean value. True = metered & False = non-metered.
So from here, you can enter the following command in a command prompt or terminal to change the setting:
cmd netpolicy set
metered-network Wireless true
(In this case the SSID is “Wireless”)
You can always revert the setting to false if you want to switch it back to a non-metered network.
Hope this helps