chore(deps): upgrade ktfmt to 0.42
This commit is contained in:
parent
9f89e1dbf5
commit
2d3d6707e8
9 changed files with 29 additions and 40 deletions
|
@ -16,7 +16,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|||
* General purpose [DialogFragment] that can be used to accept a single text input. It provides a
|
||||
* configurable title and text input hint through the instantiation helper at
|
||||
* [TextInputDialog.newInstance]. Typical usage would look something like this:
|
||||
*
|
||||
* ```kotlin
|
||||
* val dialog = TextInputDialog.newInstance(getString(R.string.dialog_title), getString(R.string.dialog_hint))
|
||||
* dialog.show(supportFragmentManager, "text_input_dialog")
|
||||
|
|
|
@ -65,6 +65,7 @@ abstract class BaseGitActivity : AppCompatActivity() {
|
|||
|
||||
/**
|
||||
* Attempt to launch the requested Git operation.
|
||||
*
|
||||
* @param operation The type of git operation to launch
|
||||
*/
|
||||
suspend fun launchGitOperation(operation: GitOp): Result<Unit, Throwable> {
|
||||
|
|
|
@ -463,9 +463,8 @@ class PasswordStore : BaseGitActivity() {
|
|||
*
|
||||
* @param oldCategory The category to change its name
|
||||
* @param error Determines whether to show an error to the user in the alert dialog, this error
|
||||
* may be due to the new category the user entered already exists or the field was empty or the
|
||||
* destination path is outside the repository
|
||||
*
|
||||
* may be due to the new category the user entered already exists or the field was empty or the
|
||||
* destination path is outside the repository
|
||||
* @see [CategoryRenameError]
|
||||
* @see [isInsideRepository]
|
||||
*/
|
||||
|
|
|
@ -16,17 +16,14 @@ import androidx.annotation.RequiresApi
|
|||
|
||||
/**
|
||||
* In order to add a new browser, do the following:
|
||||
*
|
||||
* 1. Obtain the .apk from a trusted source. For example, download it from the Play Store on your
|
||||
* phone and use adb pull to get it onto your computer. We will assume that it is called
|
||||
* browser.apk.
|
||||
*
|
||||
* phone and use adb pull to get it onto your computer. We will assume that it is called
|
||||
* browser.apk.
|
||||
* 2. Run
|
||||
*
|
||||
* aapt dump badging browser.apk | grep package: | grep -Eo " name='[a-zA-Z0-9_\.]*" | cut -c8-
|
||||
*
|
||||
* to obtain the package name (actually, the application ID) of the app in the .apk.
|
||||
*
|
||||
* 3. Run
|
||||
*
|
||||
* apksigner verify --print-certs browser.apk | grep "#1 certificate SHA-256" | grep -Eo
|
||||
|
@ -36,19 +33,15 @@ import androidx.annotation.RequiresApi
|
|||
* the apk has a single signing certificate. Apps with multiple signers are very rare, so there is
|
||||
* probably no need to add them. Refer to computeCertificatesHash to learn how the hash would be
|
||||
* computed in this case.
|
||||
*
|
||||
* 4. Verify the package name and the hash, for example by asking other people to repeat the steps
|
||||
* above.
|
||||
*
|
||||
* above.
|
||||
* 5. Add an entry with the browser apps's package name and the hash to
|
||||
* TRUSTED_BROWSER_CERTIFICATE_HASH.
|
||||
*
|
||||
* TRUSTED_BROWSER_CERTIFICATE_HASH.
|
||||
* 6. Optionally, try adding the browser's package name to BROWSERS_WITH_SAVE_SUPPORT and check
|
||||
* whether a save request to Password Store is triggered when you submit a registration form.
|
||||
*
|
||||
* whether a save request to Password Store is triggered when you submit a registration form.
|
||||
* 7. Optionally, try adding the browser's package name to BROWSERS_WITH_MULTI_ORIGIN_SUPPORT and
|
||||
* check whether it correctly distinguishes web origins even if iframes are present on the page. You
|
||||
* can use https://fabianhenneke.github.io/Android-Password-Store/ as a test form.
|
||||
* check whether it correctly distinguishes web origins even if iframes are present on the page.
|
||||
* You can use https://fabianhenneke.github.io/Android-Password-Store/ as a test form.
|
||||
*
|
||||
* **Security assumption**: Browsers on this list correctly report the web origin of the top-level
|
||||
* window as part of their AssistStructure.
|
||||
|
@ -112,9 +105,9 @@ internal enum class BrowserMultiOriginMethod {
|
|||
*
|
||||
* There are two methods used by browsers:
|
||||
* - Browsers based on Android's WebView report web domains on each WebView view node, which then
|
||||
* needs to be propagated to the child nodes ( [BrowserMultiOriginMethod.WebView]).
|
||||
* needs to be propagated to the child nodes ( [BrowserMultiOriginMethod.WebView]).
|
||||
* - Browsers with custom Autofill implementations report web domains on each input field (
|
||||
* [BrowserMultiOriginMethod.Field]).
|
||||
* [BrowserMultiOriginMethod.Field]).
|
||||
*/
|
||||
private val BROWSER_MULTI_ORIGIN_METHOD =
|
||||
mapOf(
|
||||
|
|
|
@ -17,10 +17,9 @@ import kotlinx.coroutines.async
|
|||
|
||||
/**
|
||||
* API for reading and accessing the public suffix list.
|
||||
*
|
||||
* > A "public suffix" is one under which Internet users can (or historically could) directly
|
||||
* register names. Some > examples of public suffixes are .com, .co.uk and pvt.k12.ma.us. The Public
|
||||
* Suffix List is a list of all known > public suffixes.
|
||||
* > register names. Some > examples of public suffixes are .com, .co.uk and pvt.k12.ma.us. The
|
||||
* > Public Suffix List is a list of all known > public suffixes.
|
||||
*
|
||||
* Note that this implementation applies the rules of the public suffix list only and does not
|
||||
* validate domains.
|
||||
|
@ -51,8 +50,8 @@ internal class PublicSuffixList(
|
|||
* ```
|
||||
*
|
||||
* @param [domain] _must_ be a valid domain. [PublicSuffixList] performs no validation, and if any
|
||||
* unexpected values are passed (e.g., a full URL, a domain with a trailing '/', etc) this may
|
||||
* return an incorrect result.
|
||||
* unexpected values are passed (e.g., a full URL, a domain with a trailing '/', etc) this may
|
||||
* return an incorrect result.
|
||||
*/
|
||||
fun getPublicSuffixPlusOneAsync(domain: String): Deferred<String?> =
|
||||
scope.async {
|
||||
|
|
|
@ -41,7 +41,7 @@ build-detekt = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0"
|
|||
build-diffutils = "io.github.java-diff-utils:java-diff-utils:4.12"
|
||||
build-download = "de.undercouch:gradle-download-task:5.3.0"
|
||||
build-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||
build-ktfmt = "com.facebook:ktfmt:0.41"
|
||||
build-ktfmt = "com.facebook:ktfmt:0.42"
|
||||
build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.22.0"
|
||||
build-metalava = "me.tylerbwong.gradle.metalava:plugin:0.3.2"
|
||||
build-okhttp = "com.squareup.okhttp3:okhttp:4.10.0"
|
||||
|
|
|
@ -31,7 +31,7 @@ public class OpenPgpServiceConnection(context: Context, providerPackageName: Str
|
|||
*
|
||||
* @param context
|
||||
* @param providerPackageName specify package name of OpenPGP provider, e.g.,
|
||||
* "org.sufficientlysecure.keychain"
|
||||
* "org.sufficientlysecure.keychain"
|
||||
* @param onBoundListener callback, executed when connection to service has been established
|
||||
*/
|
||||
public constructor(
|
||||
|
|
|
@ -11,17 +11,16 @@ internal object RandomPasswordGenerator {
|
|||
/**
|
||||
* Generates a random password of length [targetLength], taking the following flags in [pwFlags]
|
||||
* into account, or fails to do so and returns null:
|
||||
*
|
||||
* - [PasswordGenerator.DIGITS]: If set, the password will contain at least one digit; if not set,
|
||||
* the password will not contain any digits.
|
||||
* the password will not contain any digits.
|
||||
* - [PasswordGenerator.UPPERS]: If set, the password will contain at least one uppercase letter;
|
||||
* if not set, the password will not contain any uppercase letters.
|
||||
* if not set, the password will not contain any uppercase letters.
|
||||
* - [PasswordGenerator.LOWERS]: If set, the password will contain at least one lowercase letter;
|
||||
* if not set, the password will not contain any lowercase letters.
|
||||
* if not set, the password will not contain any lowercase letters.
|
||||
* - [PasswordGenerator.SYMBOLS]: If set, the password will contain at least one symbol; if not
|
||||
* set, the password will not contain any symbols.
|
||||
* set, the password will not contain any symbols.
|
||||
* - [PasswordGenerator.NO_AMBIGUOUS]: If set, the password will not contain any ambiguous
|
||||
* characters.
|
||||
* characters.
|
||||
*/
|
||||
fun generate(targetLength: Int, pwFlags: Int): String? {
|
||||
val bank =
|
||||
|
|
|
@ -69,18 +69,17 @@ internal object RandomPhonemesGenerator {
|
|||
/**
|
||||
* Generates a random human-readable password of length [targetLength], taking the following flags
|
||||
* in [pwFlags] into account, or fails to do so and returns null:
|
||||
*
|
||||
* - [PasswordGenerator.DIGITS]: If set, the password will contain at least one digit; if not set,
|
||||
* the password will not contain any digits.
|
||||
* the password will not contain any digits.
|
||||
* - [PasswordGenerator.UPPERS]: If set, the password will contain at least one uppercase letter;
|
||||
* if not set, the password will not contain any uppercase letters.
|
||||
* if not set, the password will not contain any uppercase letters.
|
||||
* - [PasswordGenerator.LOWERS]: If set, the password will contain at least one lowercase letter;
|
||||
* if not set and [PasswordGenerator.UPPERS] is set, the password will not contain any lowercase
|
||||
* characters; if both are not set, an exception is thrown.
|
||||
* if not set and [PasswordGenerator.UPPERS] is set, the password will not contain any lowercase
|
||||
* characters; if both are not set, an exception is thrown.
|
||||
* - [PasswordGenerator.SYMBOLS]: If set, the password will contain at least one symbol; if not
|
||||
* set, the password will not contain any symbols.
|
||||
* set, the password will not contain any symbols.
|
||||
* - [PasswordGenerator.NO_AMBIGUOUS]: If set, the password will not contain any ambiguous
|
||||
* characters.
|
||||
* characters.
|
||||
*/
|
||||
fun generate(targetLength: Int, pwFlags: Int): String? {
|
||||
require(pwFlags hasFlag PasswordGenerator.UPPERS || pwFlags hasFlag PasswordGenerator.LOWERS)
|
||||
|
|
Loading…
Reference in a new issue