Commit 94fb604
refactor: address Copilot review feedback for VShare analytics
Address code review feedback from Copilot:
1. Use Uri.Builder for safer URL construction
- Replace manual string concatenation with Uri.Builder
- Properly encode query parameters
- Handle existing parameters correctly
2. Replace PackageManager with BuildConfig.VERSION_NAME
- Use BuildConfig.VERSION_NAME directly (no try/catch needed)
- Avoid deprecated PackageManager.getPackageInfo() call
- Simpler and more reliable implementation
Changes:
- VshareWebActivity.java:106-114: Use Uri.Builder for URL construction
- VshareWebActivity.java:286-288: Simplify getAppVersion() with BuildConfig
- Add BuildConfig import
Note: Test coverage suggestions noted but deferred for future enhancement.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent e3d37d1 commit 94fb604
File tree
1 file changed
+8
-8
lines changed1 file changed
+8
-8
lines changedLines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| |||
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
0 commit comments