summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2023-04-05ui: distinguish play store installs at runtime for reproducible buildsJason A. Donenfeld
This change lets us use the same build for F-Droid, Play Store, self builds, and elsewhere, which makes everything more easily publicly verifiable, since the build system is reproducible. That means that all APKs will have the same code and be completely interchangeable, no matter where they come from. It does this by removing the build-time branch for special Play Store builds, and replacing it with a simple runtime check using the PackageManager APIs that return the name of the installer. If the app is installed by "com.android.vending", then it's a Play Store install. It's possible to test this with: $ pm install -i com.android.vending path/to/package.apk And it appears to work well. One potential concern is that it's unclear whether the Play Store reviewers install the app using utilities that set com.android.vending like this. If not, that might be a problem. However, it looks like various banking apps also use the installer package name check in the same way, and refuse to start if it's not right. That suggests that it would be impossible for Play Store reviewers to even review those banking apps if they did not set com.android.vending properly. Out of an abundance of caution, though, and in order to avoid a Play Store suspension that's harder to appeal, I sent a support request today (which just managed to fit exactly in the 1000 character limit): Hi, My app pays special attention to Google Play Store guidelines. For that reason, there is some code in the app that looks like this: if (BuildConfig.IS_GOOGLE_PLAY) ... else ... This means that I compile two versions of my app, one for Google Play, and another for other app stores. This has worked well for many years and it satisfies Google's policy requirements. However, compiling two versions of my app is a bit of a pain. Instead, I would like to do this check at runtime, with code like this: if (pm.getInstallSourceInfo(package).installingPackageName == "com.android.vending") ... else ... I have tested that this code works well, and I've installed my app with: $ pm install -i com.android.vending ui-release.apk This works and successfully satisfies the policy requirements. My question is how this works during the review process. Are reviewed apps installed with the necessary -i com.android.vending switch to make this work? Thanks. They responded fairly quickly: Hi Jason, Thanks for contacting the Google Play team. Unfortunately I'm not able to comment on your planned implementation. If you think your app is in compliance, please submit your app for review. You may want to review the Developer Program Policies for additional policy guidance. We recommend reviewing the details listed in this blog post and update your app accordingly to comply with the changes. Thanks for your understanding and continued support. Regards, Mia Google Play Developer Support So I'll interpret that as a, "if you think it's okay, submit it and see, and then we'll let you know." So here we go. Hopefully if it is rejected, the update will only be blocked, and I'll just revert this commit and resubmit. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-05tools: clean unwanted ELF flags from binariesJason A. Donenfeld
Fixes warnings on old Android, such as: linker : /data/data/com.wireguard.android/code_cache/bin/wg-quick: unsupported flags DT_FLAGS_1=0x8000001 linker : /data/data/com.wireguard.android/code_cache/bin/wg: unsupported flags DT_FLAGS_1=0x8000001 Reported-by: L.W.Reek <syphyr@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-05tools: deduplicate cmake argumentsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-05tools: remove cmake dependency hackJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-05tools: add missing CLOCK_BOOTTIME case to mips64xL.W.Reek
Signed-off-by: L.W.Reek <syphyr@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: always use MaterialAlertDialogBuilderJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04strings: sync with crowdinJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: don't create fake theme color attrJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: force dark theme in TV modeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: use filled icon buttons in TV modeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: use real M3 themeing on TVJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: redirect to play store if no file manager on tvJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: detect tv framework stubs when getting contentJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: use ErrorMessages consistentlyJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: do not crash if tunnel preparation failsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: do not OOM when leaving log window open for a whileJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: show bottom sheet sync to prevent double addJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: do not return to detail page when restoring stateJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: never access CREATOR directlyJason A. Donenfeld
All of the parcelers have their own type prefix. So we have to actually use the legit methods. This is a bit annoying, as there's no fully compatible way across all API versions, so we have to branch. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04ui: never throw on link clicksJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04version: bumpJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04tools: pass -Wl,--build-id=none and -buildid= to toolchainJason A. Donenfeld
Unfortunately, we need to fix this up in both the Makefile and in CMake, because add_link_options doesn't immediately reflect on the CMake variables in scope. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-04-04build: exclude extra kotlin cruft from release buildJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: don't play with status and navigation colors on old APIsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: do not allow double clicking fab to show menu twiceJason A. Donenfeld
Exception java.lang.IllegalStateException: at androidx.fragment.app.FragmentStore.addFragment (FragmentStore.java:92) at androidx.fragment.app.FragmentManager.addFragment (FragmentManager.java:1481) at androidx.fragment.app.BackStackRecord.executeOps (BackStackRecord.java:387) at androidx.fragment.app.FragmentManager.executeOps (FragmentManager.java:1965) at androidx.fragment.app.FragmentManager.executeOpsTogether (FragmentManager.java:1873) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute (FragmentManager.java:1823) at androidx.fragment.app.FragmentManager.execPendingActions (FragmentManager.java:1760) at androidx.fragment.app.FragmentManager$5.run (FragmentManager.java:547) at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:268) at android.app.ActivityThread.main (ActivityThread.java:8101) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:627) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:997) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: remove unneeded @JvmStatic annotationsJason A. Donenfeld
These are only needed on methods called from databindings, since those compile to java. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: add list selection highlight color for tabletJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: the button is not always blue with Material YouJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: use app resources instead of ctx for strings in callbackJason A. Donenfeld
Exception java.lang.IllegalStateException: at androidx.fragment.app.Fragment.requireContext (Fragment.java:967) at com.wireguard.android.fragment.TunnelListFragment$tunnelFileImportResultLauncher$1$1.invokeSuspend (TunnelListFragment.kt:64) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104) at android.os.Handler.handleCallback (Handler.java:761) at android.os.Handler.dispatchMessage (Handler.java:98) at android.os.Looper.loop (Looper.java:156) at android.app.ActivityThread.main (ActivityThread.java:6617) at java.lang.reflect.Method.invoke at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-30ui: use M3 theme for TV to prevent crashJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28version: bumpJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28tools: use NDK's make binary rather than system'sJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28strings: sync crowdinJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28ui: add log items in buffered batchesJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28ui: color verbose logs the same as debug logsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28ui: don't call getColor on already resolved attributeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28ui: bring back dark log viewer colorsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-28ui: fix inconsistent style namingHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-28gradle: opt into new publishing APIsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-28ui: adjust log viewer text sizesHarsh Shandilya
10sp is below the minimum 11sp recommended for readability Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-28ui: use M3 styles everywhereHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-27ui: add possibility for themed iconJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-27ui: add list selection backgroundsJason A. Donenfeld
Harsh - feel free to replace this commit with something better. I'm sure it's the most terrible way to do it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-27ui: cancel actionmode when pressing back buttonJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-27ui: simplify actionmode castJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-27ui: introduce a fresh set of Material3 themes and migrate to themHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-27ui: use AndroidX `BundleCompat` for extracting parcelableHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-03-25ui: switch from SwitchMaterial to MaterialSwitchJason A. Donenfeld
This required some weird changes to prevent clipping on the top, because apparently the new switch is a bit fatter. I think this actually looks a bit uglier than before, but it seems like that's what Material design wants. Maybe we can improve it? Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-24ui: bring back donation buttonJason A. Donenfeld
For Google Play Store builds, we'll display an alert box. This was inspired by the discussion around StreetComplete; hopefully we'll have a similar okay outcome. Link: https://github.com/streetcomplete/streetcomplete/issues/3768 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-03-24strings: update from crowdinJason A. Donenfeld
This is after doing a rebuild on the crowdin side. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>