Launchable setting alias; unsigned builds#623
Open
farble1670 wants to merge 1 commit intoKazumaProject:masterfrom
Open
Launchable setting alias; unsigned builds#623farble1670 wants to merge 1 commit intoKazumaProject:masterfrom
farble1670 wants to merge 1 commit intoKazumaProject:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change has 3 components:
1. Separate main setting activity from the launch activity
I would like to be able to disable the settings launcher icon, while still allowing the user to reach settings through Settings > System > Keyboard > On-screen keyboard. We have very high-level users, and prefer to keep the set of launchable apps small. However, if we disable:
it disables both the launch icon, and settings. To fix this, split the setting activity into two components:
To disable the launcher icon, disable the launchable setting alias. This has no effect on any existing intents that target to the setting activity. By default, any home app will still find the launchable setting activity "launchable", and include in its app launcher.
2. Fix release signing config.
It's a bit of a chicken and egg problem. If you have no intention of building a signed release, you'd like to load the project and change the build variant to "debug". However, since the build config is invalid without defining
KEYSTORE_FILE, it can't even be loaded.Modify the release build configuration to gracefully handle missing
KEYSTORE_FILE, and other signing tokens. If not defined, the signing config for the release build is left undefined.3. Add unsigned release
Signing must be part of the build process. You must defined
KEYSTORE_FILE, etc. at build time. It's common to build unsigned artifacts, then have a separate signing process usingapksigner. This keeps a better separation between the OSS project and whatever proprietary signing process one might have. Also,KEYSTORE_FILE, etc. are quite generic names, so it's likely to clash with other projects using the same tokens.Add an
unsignedReleasetarget. This is the same asrelease, minus the signing config.The artifact name change isn't strictly necessary, but without it, the name ends up "app-release-unsignedRelease.apk".
Since we did (2) above, executing "release" without defining
KEYSTORE_FILEis essentially the same thing as executingunsignedRelease.unsignedReleasehowever makes it more explicit what's happening.Testing
1. Separate main setting activity from the launch activity
Install the app. Ensure the launchable alias can be resolved as launchable:
Disable the launchable alias.
Ensure it cannot be resolved as launchable:
Ensure the main setting activity can still be launched via intent:
On device, navigate to: Settings > System > Keyboard > On-screen keyboard. Tap "Sumire...". Ensure it launches the settings page for this IME.
2. Fix release signing config.
Do not defined
KEYSTORE_FILE. Load the project in Android Studio. Ensure it loads correctly.3. Add unsigned release
Build:
Ensure that the unsigned artifact is built:
Ensure it's unsigned: