Skip to content

Commit

Permalink
Updates and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
soraefir committed Jun 28, 2024
1 parent e7f55c2 commit 917a01b
Show file tree
Hide file tree
Showing 27 changed files with 416 additions and 190 deletions.
Binary file added app/src/main/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class MainActivity : AppCompatActivity() {

binding = ActMainBinding.inflate(layoutInflater)
setContentView(binding.root)

onBackPressedDispatcher.addCallback(this) {
if (supportFragmentManager.backStackEntryCount > 0) {
supportFragmentManager.popBackStackImmediate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ class CreateEntry : Fragment() {
kpEntry.second
)
)
if (!binding.checkboxProtected.isChecked) {
val r = KeepassWrapper.entryExtract(kpEntry.first)
CacheManager.addFidelity(r)
}
activity?.supportFragmentManager?.popBackStack()
} catch (e: ActivityNotFoundException) {
ErrorToaster.noKP2AFound(context)
} catch (e: Exception) {
e.printStackTrace()
}
if (!binding.checkboxProtected.isChecked) {
val r = KeepassWrapper.entryExtract(kpEntry.first)
CacheManager.addFidelity(r)
}
activity?.supportFragmentManager?.popBackStack()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ViewEntry : Fragment() {
return (resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE)
}

private fun setScreenBrightness(brightness: Float?) {
private fun setScreenBrightness(brightness: Float) {
requireActivity().window?.attributes?.screenBrightness = brightness
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object Kp2aControl {
startKp2aIntent.addCategory(Intent.CATEGORY_DEFAULT)
startKp2aIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
startKp2aIntent.putExtra("KP2A_APPTASK", "CreateEntryThenCloseTask")
startKp2aIntent.putExtra("ShowUserNotifications", "false")
startKp2aIntent.putExtra("ShowUserNotifications", "true")
startKp2aIntent.putExtra(Strings.EXTRA_ENTRY_OUTPUT_DATA, outputData)
if (protectedFields != null)
startKp2aIntent.putStringArrayListExtra(
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/net/helcel/fidelity/pluginSDK/Strings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ object Strings {
const val SCOPE_CURRENT_ENTRY = "keepass2android.SCOPE_CURRENT_ENTRY"
const val SCOPE_QUERY_CREDENTIALS_FOR_OWN_PACKAGE =
"keepass2android.SCOPE_QUERY_CREDENTIALS_FOR_OWN_PACKAGE"
const val SCOPE_QUERY_CREDENTIALS = "keepass2android.SCOPE_QUERY_CREDENTIALS"

const val EXTRA_SCOPES = "keepass2android.EXTRA_SCOPES"
const val EXTRA_PLUGIN_PACKAGE = "keepass2android.EXTRA_PLUGIN_PACKAGE"
Expand Down
61 changes: 57 additions & 4 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/logo_g"/>
</adaptive-icon>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="128"
android:viewportHeight="128">
<group android:scaleX="1.2833333"
android:scaleY="1.2833333"
android:translateX="-16.612345"
android:translateY="-16.612345">
<group
android:translateX="34"
android:translateY="26">
<group
android:scaleX="0.8"
android:scaleY="1.0"
android:translateX="0"
android:translateY="0">
<path
android:fillColor="@color/blue"
android:pathData="M59.959,52.794H12.041c-0.552,0 -1,-0.448 -1,-1v-29.547c0,-0.552 0.448,-1 1,-1h47.918c0.552,0 1,0.448 1,1v29.547C60.959,52.347 60.511,52.794 59.959,52.794z"
android:strokeWidth="2"
android:strokeColor="#000000" />
</group>
<group
android:scaleX="0.4"
android:scaleY="0.5"
android:translateX="27"
android:translateY="15.75">
<path
android:fillColor="@color/red"
android:pathData="M46.5,56l-10,-11l-10,11l0,-45l20,0z"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="@color/red2"
android:fillAlpha="1.0"
android:pathData="M41.5,11l0,39l5,6l0,-45z"
android:strokeColor="#00000000" />

</group>
<group
android:scaleX="0.75"
android:scaleY="0.75"
android:translateX="6"
android:translateY="10">
<path
android:fillColor="#00000000"
android:pathData="M9,21V52 M12,21V52 M20,21V50 M28,21V50 M15,50V21H17V50H15 M23,50V21H25V50H23 M31,50V21H32V50H31 M35,21V52 M38,21V52"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</group>

</group>
</group>
</vector>
30 changes: 0 additions & 30 deletions app/src/main/res/drawable/logo.xml

This file was deleted.

164 changes: 25 additions & 139 deletions app/src/main/res/drawable/logo_g.xml
Original file line number Diff line number Diff line change
@@ -1,167 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:width="200dp"
android:height="200dp"
android:viewportWidth="128"
android:viewportHeight="128">
<group
android:translateX="28"
android:translateY="28">
<group>
android:translateX="34"
android:translateY="26">
<group
android:scaleX="0.8"
android:scaleY="1.0"
android:translateX="0"
android:translateY="0">
<path
android:fillColor="#92D3F5"
android:fillColor="@color/blue"
android:pathData="M59.959,52.794H12.041c-0.552,0 -1,-0.448 -1,-1v-29.547c0,-0.552 0.448,-1 1,-1h47.918c0.552,0 1,0.448 1,1v29.547C60.959,52.347 60.511,52.794 59.959,52.794z"
android:strokeWidth="2"
android:strokeColor="#000000" />
</group>
<group
android:scaleX="0.5"
android:scaleX="0.4"
android:scaleY="0.5"
android:translateX="32"
android:translateY="16">
android:translateX="27"
android:translateY="15.75">
<path
android:fillColor="#EA5A47"
android:pathData="M46.5,56l-10,-11.151l-10,11.151l0,-45.042l20,0z"
android:strokeWidth="2"
android:strokeColor="#00000000"
android:fillColor="@color/red"
android:pathData="M46.5,56l-10,-11l-10,11l0,-45l20,0z"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#D22F27"
android:pathData="M41.864,12.03l0,37.854l4.523,5.044l0,-42.898z"
android:fillColor="@color/red2"
android:fillAlpha="1.0"
android:pathData="M41.5,11l0,39l5,6l0,-45z"
android:strokeColor="#00000000" />
<path
android:fillColor="#00000000"
android:pathData="M46.5,56l-10,-11.151l-10,11.151l0,-45.042l20,0z"
android:strokeWidth="2"
android:strokeColor="#000000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M46.5,56l-10,-11.151l-10,11.151l0,-45.042l20,0z"
android:strokeWidth="2"
android:strokeColor="#000000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />

</group>
<group
android:scaleX="0.5"
android:scaleY="0.5"
android:translateX="10"
android:translateY="18">
<path
android:fillColor="#00000000"
android:pathData="M9,21V52"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M12,21V52"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M20,21V50"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M28,21V50"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#000"
android:pathData="M15,50V21H17V50H15Z"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#000"
android:pathData="M23,50V21H25V50H23Z"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#000"
android:pathData="M31,50V21H32V50H31Z"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M46,21V50"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M49,21V50"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M57,21V50"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#000"
android:pathData="M41,50V21H43V50H41Z"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#000"
android:pathData="M52,50V21H54V50H52Z"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M60,21V52"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M63,21V52"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="M35,21V52"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
android:scaleX="0.75"
android:scaleY="0.75"
android:translateX="6"
android:translateY="10">
<path
android:fillColor="#00000000"
android:pathData="M38,21V52"
android:pathData="M9,21V52 M12,21V52 M20,21V50 M28,21V50 M15,50V21H17V50H15 M23,50V21H25V50H23 M31,50V21H32V50H31 M35,21V52 M38,21V52"
android:strokeWidth="2"
android:strokeColor="#000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</group>

</group>
</vector>
Loading

0 comments on commit 917a01b

Please sign in to comment.