mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
Huawei: improve texts for file uploads, music icon
This commit is contained in:
parent
3bb44d8050
commit
bc56213eba
@ -182,7 +182,7 @@ public class HuaweiInstallHandler implements InstallHandler {
|
||||
installActivity.setInstallItem(installItem);
|
||||
if (device.isBusy()) {
|
||||
LOG.error("App cannot be installed (device busy)");
|
||||
installActivity.setInfoText("Firmware cannot be installed (device busy)");
|
||||
installActivity.setInfoText("App cannot be installed (device busy)");
|
||||
installActivity.setInfoText(device.getBusyTask());
|
||||
installActivity.setInstallEnabled(false);
|
||||
return;
|
||||
@ -190,7 +190,7 @@ public class HuaweiInstallHandler implements InstallHandler {
|
||||
|
||||
if (!device.isConnected()) {
|
||||
LOG.error("App cannot be installed (not connected or wrong device)");
|
||||
installActivity.setInfoText("Firmware cannot be installed (not connected or wrong device)");
|
||||
installActivity.setInfoText("App cannot be installed (not connected or wrong device)");
|
||||
installActivity.setInstallEnabled(false);
|
||||
return;
|
||||
}
|
||||
@ -251,9 +251,9 @@ public class HuaweiInstallHandler implements InstallHandler {
|
||||
|
||||
installItem.setDetails(helper.getMusicInfo().getFileName());
|
||||
|
||||
installItem.setIcon(R.drawable.ic_music_note);
|
||||
installItem.setIcon(R.drawable.ic_music);
|
||||
|
||||
installActivity.setInfoText(context.getString(R.string.app_install_info, helper.getMusicInfo().getFileName(), helper.getMusicInfo().getTitle(), helper.getMusicInfo().getArtist()));
|
||||
installActivity.setInfoText(context.getString(R.string.music_upload_info, helper.getMusicInfo().getFileName(), helper.getMusicInfo().getTitle(), helper.getMusicInfo().getArtist()));
|
||||
|
||||
LOG.debug("Initialized HuaweiInstallHandler: Music");
|
||||
}
|
||||
|
@ -2001,16 +2001,15 @@ public class HuaweiSupportProvider {
|
||||
@Override
|
||||
public void onError(int code) {
|
||||
if (code == 140004) {
|
||||
LOG.error("Too many watchfaces installed");
|
||||
LOG.error("Too many watchfaces installed or musics uploaded");
|
||||
HuaweiSupportProvider.this.handleGBDeviceEvent(new GBDeviceEventDisplayMessage(HuaweiSupportProvider.this.getContext().getString(R.string.cannot_upload_watchface_too_many_watchfaces_installed), Toast.LENGTH_LONG, GB.ERROR));
|
||||
} else if (code == 140008) {
|
||||
LOG.error("File already exists");
|
||||
HuaweiSupportProvider.this.handleGBDeviceEvent(new GBDeviceEventDisplayMessage("File already exists", Toast.LENGTH_LONG, GB.ERROR)); //TODO: localization
|
||||
HuaweiSupportProvider.this.handleGBDeviceEvent(new GBDeviceEventDisplayMessage(HuaweiSupportProvider.this.getContext().getString(R.string.file_already_exists), Toast.LENGTH_LONG, GB.ERROR));
|
||||
} else if (code == 140009) {
|
||||
LOG.error("Insufficient space for upload");
|
||||
HuaweiSupportProvider.this.handleGBDeviceEvent(new GBDeviceEventDisplayMessage(HuaweiSupportProvider.this.getContext().getString(R.string.insufficient_space_for_upload), Toast.LENGTH_LONG, GB.ERROR));
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
21
app/src/main/res/drawable/ic_music.xml
Normal file
21
app/src/main/res/drawable/ic_music.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="45sp"
|
||||
android:height="45sp"
|
||||
android:viewportWidth="30"
|
||||
android:viewportHeight="30">
|
||||
<path
|
||||
android:fillColor="?attr/deviceIconLight"
|
||||
android:pathData="m3.871,3.877h20.925a0.947,0.947 0,0 1,0.948 0.947v20.01a0.947,0.947 0,0 1,-0.948 0.948H3.871A0.947,0.947 0,0 1,2.924 24.834V4.824A0.947,0.947 0,0 1,3.871 3.877Z"
|
||||
android:strokeWidth="3.5"/>
|
||||
<path
|
||||
android:fillColor="?attr/deviceIconDark"
|
||||
android:pathData="m3.879,3.035h20.925a0.947,0.947 0,0 1,0.947 0.947v20.01A0.947,0.947 0,0 1,24.804 24.94H3.88A0.947,0.947 0,0 1,2.933 23.992V3.982A0.947,0.947 0,0 1,3.88 3.035Z"
|
||||
android:strokeWidth="3.5"/>
|
||||
<path
|
||||
android:fillColor="?attr/deviceIconPrimary"
|
||||
android:pathData="m3.871,3.413h20.925a0.947,0.947 0,0 1,0.948 0.947v20.01a0.947,0.947 0,0 1,-0.948 0.948H3.871A0.947,0.947 0,0 1,2.924 24.37V4.36A0.947,0.947 0,0 1,3.87 3.413Z"
|
||||
android:strokeWidth="3.5"/>
|
||||
<path
|
||||
android:pathData="m9.96,22.998c1.459,-0.675 2.415,-1.894 2.427,-2.958h0.003v-8.276l9.868,-3.619v7.181c-0.791,-0.585 -2.187,-0.616 -3.548,0.014 -1.763,0.816 -2.797,2.427 -2.309,3.598 0.488,1.172 2.313,1.46 4.076,0.645 1.459,-0.675 2.415,-1.894 2.427,-2.958h0.003V5.269C19.188,6.702 15.18,8.025 11.741,9.242v9.5c-0.791,-0.585 -2.187,-0.617 -3.548,0.013 -1.763,0.816 -2.797,2.428 -2.309,3.599 0.488,1.172 2.313,1.46 4.076,0.645"
|
||||
android:fillColor="?attr/deviceIconOnPrimary"/>
|
||||
</vector>
|
@ -632,6 +632,7 @@
|
||||
<string name="firmware_install_warning">YOU ARE TRYING TO INSTALL A FIRMWARE, PROCEED AT YOUR OWN RISK.\n\n\n This firmware is for HW Revision: %s</string>
|
||||
<string name="app_install_info">You are about to install the following app:\n\n%1$s\nVersion %2$s by %3$s\n</string>
|
||||
<string name="watchface_install_info">You are about to install the following watchface:\n\n%1$s\nVersion %2$s by %3$s\n</string>
|
||||
<string name="music_upload_info">You are about to upload the following music file:\n\n%1$s\nSong title: %2$s\nAlbum: %3$s\n</string>
|
||||
<string name="n_a">N/A</string>
|
||||
<string name="initialized">initialized</string>
|
||||
<string name="appversion_by_creator">%1$s by %2$s</string>
|
||||
@ -3322,6 +3323,7 @@
|
||||
<string name="pref_fetch_unknown_files_summary">Fetch unknown activity files from the watch. They will not be processed, but will be saved in the phone.</string>
|
||||
<string name="cannot_upload_watchface_too_many_watchfaces_installed">"Cannot upload watchface, too many watchfaces installed"</string>
|
||||
<string name="insufficient_space_for_upload">"Insufficient space for upload"</string>
|
||||
<string name="file_already_exists">"File already exists"</string>
|
||||
<string name="smart_ring_measurement_error_worn_incorrectly">Measurement error. Are the ring\'s sensors oriented correctly?</string>
|
||||
<string name="smart_ring_measurement_error_unknown">Unknown measurement error %d received from ring</string>
|
||||
<string name="pref_header_deprecated_functionalities">Deprecated functionalities</string>
|
||||
|
Loading…
Reference in New Issue
Block a user