Skip to content

Commit

Permalink
Change the tooltip text in battery status icon for tethered devices
Browse files Browse the repository at this point in the history
When using tethered devices instead of standalone headsets, the battery
level we show in the tray is the phone's so it does make sense to
use "Phone" instead of "Headset".
  • Loading branch information
svillar committed Feb 21, 2024
1 parent 11a5208 commit 5803399
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public void updateUI() {
.withDensity(R.dimen.tray_tooltip_density)
.withLayout(R.layout.tooltip)
.withString(getContext().getString(
R.string.tray_status_headset,
DeviceType.isTetheredDevice() ? R.string.tray_status_phone : R.string.tray_status_headset,
String.format(
LocaleUtils.getDisplayLanguage(
getContext()).getLocale(),
Expand Down
4 changes: 4 additions & 0 deletions app/src/common/shared/com/igalia/wolvic/utils/DeviceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ public static String getDeviceName(Context aContext) {
}
return aContext.getString(R.string.device_name, appName, deviceName);
}

public static boolean isTetheredDevice() {
return mType == HVR3DoF || mType == HVR6DoF || mType == VisionGlass || mType == LenovoA3;
}
}
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2532,5 +2532,7 @@ the Select` button. When clicked it closes all the previously selected tabs -->

<!-- Shown in the tray wifi icon popup when SSID cannot be retrieved -->
<string name="tray_wifi_unavailable_ssid">SSID unavailable</string>
<!-- Tooltip for the battery level when using a tethered device instead of a headset -->
<string name="tray_status_phone">Phone: %1$s</string>

</resources>

0 comments on commit 5803399

Please sign in to comment.