Messaging: Use StandardCharsets where possible

Change-Id: I45a19c47262116d34260e1957145580a7f97168e
This commit is contained in:
Michael W
2024-12-26 14:55:13 +01:00
parent a2f67b4f7b
commit fd63d5f125
12 changed files with 33 additions and 61 deletions
@@ -43,8 +43,8 @@ import com.android.vcard.VCardEntry.PostalData;
import com.android.vcard.VCardEntry.WebsiteData;
import com.android.vcard.VCardProperty;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
@@ -200,11 +200,8 @@ public class VCardResourceEntry {
}
Intent intent = new Intent(Intent.ACTION_VIEW);
final String address = formatAddress(postalData);
try {
intent.setData(Uri.parse("geo:0,0?q=" + URLEncoder.encode(address, "UTF-8")));
} catch (UnsupportedEncodingException e) {
intent = null;
}
intent.setData(Uri.parse("geo:0,0?q=" + URLEncoder.encode(address,
StandardCharsets.UTF_8)));
retList.add(new VCardResourceEntryDestinationItem(address, type, intent));
}