Remove Magikeyboard and Model modules for easier integration

This commit is contained in:
J-Jamet
2018-09-18 11:40:06 +02:00
parent abc0a14dda
commit 023aba2b60
54 changed files with 109 additions and 746 deletions

View File

@@ -107,9 +107,7 @@ dependencies {
implementation 'biz.source_code:base64coder:2010-12-19' implementation 'biz.source_code:base64coder:2010-12-19'
implementation 'com.google.code.gson:gson:2.8.4' implementation 'com.google.code.gson:gson:2.8.4'
implementation 'com.google.guava:guava:23.0-android' implementation 'com.google.guava:guava:23.0-android'
// Icon pack, classic for all, material for libre and pro // Icon pack
implementation project(path: ':icon-pack-classic') implementation project(path: ':icon-pack-classic')
implementation project(path: ':icon-pack-material') implementation project(path: ':icon-pack-material')
implementation project(path: ':magikeyboard')
implementation project(path: ':keepass-model')
} }

View File

@@ -132,7 +132,22 @@
<activity android:name="com.kunzisoft.keepass.selection.EntrySelectionAuthActivity" <activity android:name="com.kunzisoft.keepass.selection.EntrySelectionAuthActivity"
android:configChanges="orientation|keyboardHidden" /> android:configChanges="orientation|keyboardHidden" />
<activity android:name="com.kunzisoft.keepass.settings.SettingsAutofillActivity" /> <activity android:name="com.kunzisoft.keepass.settings.SettingsAutofillActivity" />
<activity android:name=".magikeyboard.EntryRetrieverActivity"
android:label="@string/keyboard_name">
</activity>
<activity android:name="com.kunzisoft.keepass.magikeyboard.settings.MagikIMESettings"
android:label="@string/keyboard_setting_label">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
<!-- Receiver for Keyboard -->
<receiver
android:name="com.kunzisoft.keepass.magikeyboard.receiver.NotificationDeleteBroadcastReceiver"
android:exported="false" >
</receiver>
<service <service
android:name="com.kunzisoft.keepass.notifications.NotificationCopyingService" android:name="com.kunzisoft.keepass.notifications.NotificationCopyingService"
android:enabled="true" android:enabled="true"
@@ -149,6 +164,17 @@
<action android:name="android.service.autofill.AutofillService" /> <action android:name="android.service.autofill.AutofillService" />
</intent-filter> </intent-filter>
</service> </service>
<service
android:name="com.kunzisoft.keepass.magikeyboard.MagikIME"
android:label="@string/keyboard_label"
android:permission="android.permission.BIND_INPUT_METHOD" >
<meta-data android:name="android.view.im"
android:resource="@xml/method"/>
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
</service>
<service android:name="com.kunzisoft.keepass.magikeyboard.KeyboardEntryNotificationService" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" /> <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
</application> </application>

View File

@@ -1,4 +1,4 @@
package com.kunzisoft.magikeyboard; package com.kunzisoft.keepass.magikeyboard;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
@@ -9,7 +9,8 @@ import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.util.Log; import android.util.Log;
import com.kunzisoft.keepass_model.Entry; import com.kunzisoft.keepass.R;
import com.kunzisoft.keepass.model.Entry;
public class EntryRetrieverActivity extends AppCompatActivity { public class EntryRetrieverActivity extends AppCompatActivity {

View File

@@ -1,4 +1,4 @@
package com.kunzisoft.magikeyboard; package com.kunzisoft.keepass.magikeyboard;
import android.app.NotificationChannel; import android.app.NotificationChannel;
import android.app.NotificationManager; import android.app.NotificationManager;
@@ -12,11 +12,12 @@ import android.os.IBinder;
import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationCompat;
import android.util.Log; import android.util.Log;
import com.kunzisoft.magikeyboard.receiver.LockBroadcastReceiver; import com.kunzisoft.keepass.R;
import com.kunzisoft.magikeyboard.receiver.NotificationDeleteBroadcastReceiver; import com.kunzisoft.keepass.magikeyboard.receiver.LockBroadcastReceiver;
import com.kunzisoft.keepass.magikeyboard.receiver.NotificationDeleteBroadcastReceiver;
import static android.content.ContentValues.TAG; import static android.content.ContentValues.TAG;
import static com.kunzisoft.magikeyboard.receiver.LockBroadcastReceiver.LOCK_ACTION; import static com.kunzisoft.keepass.magikeyboard.receiver.LockBroadcastReceiver.LOCK_ACTION;
public class KeyboardEntryNotificationService extends Service { public class KeyboardEntryNotificationService extends Service {

View File

@@ -17,7 +17,7 @@
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>. * along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
package com.kunzisoft.magikeyboard; package com.kunzisoft.keepass.magikeyboard;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@@ -36,10 +36,11 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import com.kunzisoft.keepass_model.Entry; import com.kunzisoft.keepass.R;
import com.kunzisoft.magikeyboard.receiver.LockBroadcastReceiver; import com.kunzisoft.keepass.magikeyboard.receiver.LockBroadcastReceiver;
import com.kunzisoft.keepass.model.Entry;
import static com.kunzisoft.magikeyboard.receiver.LockBroadcastReceiver.LOCK_ACTION; import static com.kunzisoft.keepass.magikeyboard.receiver.LockBroadcastReceiver.LOCK_ACTION;
public class MagikIME extends InputMethodService public class MagikIME extends InputMethodService
implements KeyboardView.OnKeyboardActionListener { implements KeyboardView.OnKeyboardActionListener {

View File

@@ -0,0 +1,6 @@
package com.kunzisoft.keepass.magikeyboard;
public class Utility {
}

View File

@@ -1,4 +1,4 @@
package com.kunzisoft.magikeyboard.receiver; package com.kunzisoft.keepass.magikeyboard.receiver;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;

View File

@@ -1,13 +1,13 @@
package com.kunzisoft.magikeyboard.receiver; package com.kunzisoft.keepass.magikeyboard.receiver;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import com.kunzisoft.magikeyboard.KeyboardEntryNotificationService; import com.kunzisoft.keepass.R;
import com.kunzisoft.magikeyboard.MagikIME; import com.kunzisoft.keepass.magikeyboard.KeyboardEntryNotificationService;
import com.kunzisoft.magikeyboard.R; import com.kunzisoft.keepass.magikeyboard.MagikIME;
public class NotificationDeleteBroadcastReceiver extends BroadcastReceiver { public class NotificationDeleteBroadcastReceiver extends BroadcastReceiver {

View File

@@ -17,7 +17,7 @@
* along with KeePass DX. If not, see <http://www.gnu.org/licenses/>. * along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
package com.kunzisoft.magikeyboard.settings; package com.kunzisoft.keepass.magikeyboard.settings;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
@@ -25,7 +25,7 @@ import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.view.MenuItem; import android.view.MenuItem;
import com.kunzisoft.magikeyboard.R; import com.kunzisoft.keepass.R;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

View File

@@ -1,15 +1,15 @@
package com.kunzisoft.magikeyboard.settings; package com.kunzisoft.keepass.magikeyboard.settings;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.preference.PreferenceFragmentCompat; import android.support.v7.preference.PreferenceFragmentCompat;
import com.kunzisoft.magikeyboard.R; import com.kunzisoft.keepass.R;
public class MagikIMESettingsFragment extends PreferenceFragmentCompat { public class MagikIMESettingsFragment extends PreferenceFragmentCompat {
@Override @Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
// Load the preferences from an XML resource // Load the preferences from an XML resource
setPreferencesFromResource(R.xml.ime_preferences, rootKey); setPreferencesFromResource(R.xml.keyboard_preferences, rootKey);
} }
} }

View File

@@ -1,4 +1,4 @@
package com.kunzisoft.keepass_model; package com.kunzisoft.keepass.model;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;

View File

@@ -5,7 +5,7 @@ import android.content.Intent;
import android.util.Log; import android.util.Log;
import com.kunzisoft.keepass.database.PwEntry; import com.kunzisoft.keepass.database.PwEntry;
import com.kunzisoft.keepass_model.Entry; import com.kunzisoft.keepass.model.Entry;
public class EntrySelectionHelper { public class EntrySelectionHelper {

View File

@@ -60,7 +60,7 @@ import com.kunzisoft.keepass.settings.preferenceDialogFragment.MemoryUsagePrefer
import com.kunzisoft.keepass.settings.preferenceDialogFragment.ParallelismPreferenceDialogFragmentCompat; import com.kunzisoft.keepass.settings.preferenceDialogFragment.ParallelismPreferenceDialogFragmentCompat;
import com.kunzisoft.keepass.settings.preferenceDialogFragment.RoundsPreferenceDialogFragmentCompat; import com.kunzisoft.keepass.settings.preferenceDialogFragment.RoundsPreferenceDialogFragmentCompat;
import com.kunzisoft.keepass.stylish.Stylish; import com.kunzisoft.keepass.stylish.Stylish;
import com.kunzisoft.magikeyboard.settings.MagikIMESettings; import com.kunzisoft.keepass.magikeyboard.settings.MagikIMESettings;
public class NestedSettingsFragment extends PreferenceFragmentCompat public class NestedSettingsFragment extends PreferenceFragmentCompat
implements Preference.OnPreferenceClickListener { implements Preference.OnPreferenceClickListener {

View File

@@ -68,4 +68,9 @@
<color name="colorTextSecondaryDisable">#c7c7c7</color> <color name="colorTextSecondaryDisable">#c7c7c7</color>
<color name="colorTextSecondaryInverse">#999999</color> <color name="colorTextSecondaryInverse">#999999</color>
<color name="colorTextSecondaryInverseDisable">#565656</color> <color name="colorTextSecondaryInverseDisable">#565656</color>
<color name="keyboard_button">#3c474c</color>
<color name="keyboard_button_pressed">#263238</color>
<color name="keyboard_button_border">#3c464c</color>
<color name="keyboard_background">#263238</color>
</resources> </resources>

View File

@@ -288,6 +288,50 @@
<string name="keyboard_lock_database_text">Lock the database.</string> <string name="keyboard_lock_database_text">Lock the database.</string>
<string name="keyboard_back_main_keyboard_text">Go back to your main keyboard.</string> <string name="keyboard_back_main_keyboard_text">Go back to your main keyboard.</string>
<string name="keyboard_name">Magikeyboard</string>
<string name="keyboard_label">Magikeyboard (KeePass DX)</string>
<string name="keyboard_setting_label">Magikeyboard settings</string>
<string name="entry_category">Entry</string>
<string name="entry_timeout_key" translatable="false">erase_entry_timeout_key</string>
<string name="entry_timeout_title">Timeout</string>
<string name="entry_timeout_summary">Timeout to clear the keyboard entry</string>
<string name="notification_entry_key" translatable="false">notification_entry_key</string>
<string name="notification_entry_title">Notification information</string>
<string name="notification_entry_summary">Show a notification when an entry is available</string>
<bool name="notification_entry_default" translatable="false">true</bool>
<string name="notification_entry_content_title_text">Entry</string>
<string name="notification_entry_content_title">%1$s available on Magikeyboard</string>
<string name="notification_entry_content_text">%1$s</string>
<string name="notification_entry_clear_close_key" translatable="false">notification_entry_slide_close_key</string>
<string name="notification_entry_clear_close_title">Clear at closing</string>
<string name="notification_entry_clear_close_summary">Clear the keyboard entry when closing the notification</string>
<bool name="notification_entry_clear_close_default" translatable="false">true</bool>
<string name="appearance_category">Appearance</string>
<string name="theme_key" translatable="false">theme_key</string>
<string name="theme_title">Theme</string>
<string name="keys_category">Keys</string>
<string name="key_vibrate_key" translatable="false">key_vibrate_key</string>
<string name="key_vibrate_title">Vibrate on keypress</string>
<bool name="key_vibrate_default" translatable="false">true</bool>
<string name="key_vibrate_duration_key" translatable="false">key_vibrate_duration_key</string>
<string name="key_vibrate_duration_title">Keypress vibration duration</string>
<string name="key_sound_key" translatable="false">key_sound_key</string>
<string name="key_sound_title">Sound on keypress</string>
<bool name="key_sound_default" translatable="false">false</bool>
<string name="key_long_press_delay_key" translatable="false">key_long_press_delay_key</string>
<string name="key_long_press_delay_title">Key long press delay</string>
<string name="allow_no_password_title">Allow no password</string> <string name="allow_no_password_title">Allow no password</string>
<string name="allow_no_password_summary">Enable the open button if no password identification is selected</string> <string name="allow_no_password_summary">Enable the open button if no password identification is selected</string>
<string name="enable_read_only_title">Read only</string> <string name="enable_read_only_title">Read only</string>

View File

@@ -1 +0,0 @@
R.java

View File

@@ -1,440 +0,0 @@
package org.bouncycastle.asn1.util;
import org.bouncycastle.asn1.ASN1OctetString;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.ASN1Set;
import org.bouncycastle.asn1.BERConstructedOctetString;
import org.bouncycastle.asn1.BERConstructedSequence;
import org.bouncycastle.asn1.BERSequence;
import org.bouncycastle.asn1.BERSet;
import org.bouncycastle.asn1.BERTaggedObject;
import org.bouncycastle.asn1.DERBMPString;
import org.bouncycastle.asn1.DERBitString;
import org.bouncycastle.asn1.DERBoolean;
import org.bouncycastle.asn1.DERConstructedSequence;
import org.bouncycastle.asn1.DERConstructedSet;
import org.bouncycastle.asn1.DEREncodable;
import org.bouncycastle.asn1.DERGeneralizedTime;
import org.bouncycastle.asn1.DERIA5String;
import org.bouncycastle.asn1.DERInteger;
import org.bouncycastle.asn1.DERNull;
import org.bouncycastle.asn1.DERObject;
import org.bouncycastle.asn1.DERObjectIdentifier;
import org.bouncycastle.asn1.DEROctetString;
import org.bouncycastle.asn1.DERPrintableString;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.asn1.DERSet;
import org.bouncycastle.asn1.DERT61String;
import org.bouncycastle.asn1.DERTaggedObject;
import org.bouncycastle.asn1.DERUTCTime;
import org.bouncycastle.asn1.DERUTF8String;
import org.bouncycastle.asn1.DERUnknownTag;
import org.bouncycastle.asn1.DERVisibleString;
import org.bouncycastle.asn1.DERApplicationSpecific;
import org.bouncycastle.asn1.DERTags;
import org.bouncycastle.asn1.BERApplicationSpecific;
import org.bouncycastle.util.encoders.Hex;
import java.util.Enumeration;
import java.io.IOException;
public class ASN1Dump
{
private static final String TAB = " ";
private static final int SAMPLE_SIZE = 32;
/**
* dump a DER object as a formatted string with indentation
*
* @param obj the DERObject to be dumped out.
*/
static String _dumpAsString(
String indent,
boolean verbose,
DERObject obj)
{
String nl = System.getProperty("line.separator");
if (obj instanceof ASN1Sequence)
{
StringBuffer buf = new StringBuffer();
Enumeration e = ((ASN1Sequence)obj).getObjects();
String tab = indent + TAB;
buf.append(indent);
if (obj instanceof BERConstructedSequence)
{
buf.append("BER ConstructedSequence");
}
else if (obj instanceof DERConstructedSequence)
{
buf.append("DER ConstructedSequence");
}
else if (obj instanceof BERSequence)
{
buf.append("BER Sequence");
}
else if (obj instanceof DERSequence)
{
buf.append("DER Sequence");
}
else
{
buf.append("Sequence");
}
buf.append(nl);
while (e.hasMoreElements())
{
Object o = e.nextElement();
if (o == null || o.equals(new DERNull()))
{
buf.append(tab);
buf.append("NULL");
buf.append(nl);
}
else if (o instanceof DERObject)
{
buf.append(_dumpAsString(tab, verbose, (DERObject)o));
}
else
{
buf.append(_dumpAsString(tab, verbose, ((DEREncodable)o).getDERObject()));
}
}
return buf.toString();
}
else if (obj instanceof DERTaggedObject)
{
StringBuffer buf = new StringBuffer();
String tab = indent + TAB;
buf.append(indent);
if (obj instanceof BERTaggedObject)
{
buf.append("BER Tagged [");
}
else
{
buf.append("Tagged [");
}
DERTaggedObject o = (DERTaggedObject)obj;
buf.append(Integer.toString(o.getTagNo()));
buf.append(']');
if (!o.isExplicit())
{
buf.append(" IMPLICIT ");
}
buf.append(nl);
if (o.isEmpty())
{
buf.append(tab);
buf.append("EMPTY");
buf.append(nl);
}
else
{
buf.append(_dumpAsString(tab, verbose, o.getObject()));
}
return buf.toString();
}
else if (obj instanceof DERConstructedSet)
{
StringBuffer buf = new StringBuffer();
Enumeration e = ((ASN1Set)obj).getObjects();
String tab = indent + TAB;
buf.append(indent);
buf.append("ConstructedSet");
buf.append(nl);
while (e.hasMoreElements())
{
Object o = e.nextElement();
if (o == null)
{
buf.append(tab);
buf.append("NULL");
buf.append(nl);
}
else if (o instanceof DERObject)
{
buf.append(_dumpAsString(tab, verbose, (DERObject)o));
}
else
{
buf.append(_dumpAsString(tab, verbose, ((DEREncodable)o).getDERObject()));
}
}
return buf.toString();
}
else if (obj instanceof BERSet)
{
StringBuffer buf = new StringBuffer();
Enumeration e = ((ASN1Set)obj).getObjects();
String tab = indent + TAB;
buf.append(indent);
buf.append("BER Set");
buf.append(nl);
while (e.hasMoreElements())
{
Object o = e.nextElement();
if (o == null)
{
buf.append(tab);
buf.append("NULL");
buf.append(nl);
}
else if (o instanceof DERObject)
{
buf.append(_dumpAsString(tab, verbose, (DERObject)o));
}
else
{
buf.append(_dumpAsString(tab, verbose, ((DEREncodable)o).getDERObject()));
}
}
return buf.toString();
}
else if (obj instanceof DERSet)
{
StringBuffer buf = new StringBuffer();
Enumeration e = ((ASN1Set)obj).getObjects();
String tab = indent + TAB;
buf.append(indent);
buf.append("DER Set");
buf.append(nl);
while (e.hasMoreElements())
{
Object o = e.nextElement();
if (o == null)
{
buf.append(tab);
buf.append("NULL");
buf.append(nl);
}
else if (o instanceof DERObject)
{
buf.append(_dumpAsString(tab, verbose, (DERObject)o));
}
else
{
buf.append(_dumpAsString(tab, verbose, ((DEREncodable)o).getDERObject()));
}
}
return buf.toString();
}
else if (obj instanceof DERObjectIdentifier)
{
return indent + "ObjectIdentifier(" + ((DERObjectIdentifier)obj).getId() + ")" + nl;
}
else if (obj instanceof DERBoolean)
{
return indent + "Boolean(" + ((DERBoolean)obj).isTrue() + ")" + nl;
}
else if (obj instanceof DERInteger)
{
return indent + "Integer(" + ((DERInteger)obj).getValue() + ")" + nl;
}
else if (obj instanceof BERConstructedOctetString)
{
ASN1OctetString oct = (ASN1OctetString)obj;
if (verbose)
{
return indent + "BER Constructed Octet String" + "[" + oct.getOctets().length + "] " + dumpBinaryDataAsString(indent, oct.getOctets()) + nl;
}
return indent + "BER Constructed Octet String" + "[" + oct.getOctets().length + "] " + nl;
}
else if (obj instanceof DEROctetString)
{
ASN1OctetString oct = (ASN1OctetString)obj;
if (verbose)
{
return indent + "DER Octet String" + "[" + oct.getOctets().length + "] " + dumpBinaryDataAsString(indent, oct.getOctets()) + nl;
}
return indent + "DER Octet String" + "[" + oct.getOctets().length + "] " + nl;
}
else if (obj instanceof DERBitString)
{
DERBitString bt = (DERBitString)obj;
if (verbose)
{
return indent + "DER Bit String" + "[" + bt.getBytes().length + ", " + bt.getPadBits() + "] " + dumpBinaryDataAsString(indent, bt.getBytes()) + nl;
}
return indent + "DER Bit String" + "[" + bt.getBytes().length + ", " + bt.getPadBits() + "] " + nl;
}
else if (obj instanceof DERIA5String)
{
return indent + "IA5String(" + ((DERIA5String)obj).getString() + ") " + nl;
}
else if (obj instanceof DERUTF8String)
{
return indent + "UTF8String(" + ((DERUTF8String)obj).getString() + ") " + nl;
}
else if (obj instanceof DERPrintableString)
{
return indent + "PrintableString(" + ((DERPrintableString)obj).getString() + ") " + nl;
}
else if (obj instanceof DERVisibleString)
{
return indent + "VisibleString(" + ((DERVisibleString)obj).getString() + ") " + nl;
}
else if (obj instanceof DERBMPString)
{
return indent + "BMPString(" + ((DERBMPString)obj).getString() + ") " + nl;
}
else if (obj instanceof DERT61String)
{
return indent + "T61String(" + ((DERT61String)obj).getString() + ") " + nl;
}
else if (obj instanceof DERUTCTime)
{
return indent + "UTCTime(" + ((DERUTCTime)obj).getTime() + ") " + nl;
}
else if (obj instanceof DERGeneralizedTime)
{
return indent + "GeneralizedTime(" + ((DERGeneralizedTime)obj).getTime() + ") " + nl;
}
else if (obj instanceof DERUnknownTag)
{
return indent + "Unknown " + Integer.toString(((DERUnknownTag)obj).getTag(), 16) + " " + new String(Hex.encode(((DERUnknownTag)obj).getData())) + nl;
}
else if (obj instanceof BERApplicationSpecific)
{
return outputApplicationSpecific("BER", indent, verbose, obj, nl);
}
else if (obj instanceof DERApplicationSpecific)
{
return outputApplicationSpecific("DER", indent, verbose, obj, nl);
}
else
{
return indent + obj.toString() + nl;
}
}
private static String outputApplicationSpecific(String type, String indent, boolean verbose, DERObject obj, String nl)
{
DERApplicationSpecific app = (DERApplicationSpecific)obj;
StringBuffer buf = new StringBuffer();
if (app.isConstructed())
{
try
{
ASN1Sequence s = ASN1Sequence.getInstance(app.getObject(DERTags.SEQUENCE));
buf.append(indent + type + " ApplicationSpecific[" + app.getApplicationTag() + "]" + nl);
for (Enumeration e = s.getObjects(); e.hasMoreElements();)
{
buf.append(_dumpAsString(indent + TAB, verbose, (DERObject)e.nextElement()));
}
}
catch (IOException e)
{
buf.append(e);
}
return buf.toString();
}
return indent + type + " ApplicationSpecific[" + app.getApplicationTag() + "] (" + new String(Hex.encode(app.getContents())) + ")" + nl;
}
/**
* dump out a DER object as a formatted string, in non-verbose mode.
*
* @param obj the DERObject to be dumped out.
* @return the resulting string.
*/
public static String dumpAsString(
Object obj)
{
return dumpAsString(obj, false);
}
/**
* Dump out the object as a string.
*
* @param obj the object to be dumped
* @param verbose if true, dump out the contents of octet and bit strings.
* @return the resulting string.
*/
public static String dumpAsString(
Object obj,
boolean verbose)
{
if (obj instanceof DERObject)
{
return _dumpAsString("", verbose, (DERObject)obj);
}
else if (obj instanceof DEREncodable)
{
return _dumpAsString("", verbose, ((DEREncodable)obj).getDERObject());
}
return "unknown object type " + obj.toString();
}
private static String dumpBinaryDataAsString(String indent, byte[] bytes)
{
String nl = System.getProperty("line.separator");
StringBuffer buf = new StringBuffer();
indent += TAB;
buf.append(nl);
for (int i = 0; i < bytes.length; i += SAMPLE_SIZE)
{
if (bytes.length - i > SAMPLE_SIZE)
{
buf.append(indent);
buf.append(new String(Hex.encode(bytes, i, SAMPLE_SIZE)));
buf.append(TAB);
buf.append(calculateAscString(bytes, i, SAMPLE_SIZE));
buf.append(nl);
}
else
{
buf.append(indent);
buf.append(new String(Hex.encode(bytes, i, bytes.length - i)));
for (int j = bytes.length - i; j != SAMPLE_SIZE; j++)
{
buf.append(" ");
}
buf.append(TAB);
buf.append(calculateAscString(bytes, i, bytes.length - i));
buf.append(nl);
}
}
return buf.toString();
}
private static String calculateAscString(byte[] bytes, int off, int len)
{
StringBuffer buf = new StringBuffer();
for (int i = off; i != off + len; i++)
{
if (bytes[i] >= ' ' && bytes[i] <= '~')
{
buf.append((char)bytes[i]);
}
}
return buf.toString();
}
}

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,26 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}

View File

@@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,2 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kunzisoft.keepass_model" />

View File

@@ -1 +0,0 @@
/build

View File

@@ -1,33 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
def supportVersion = "27.1.1"
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "com.android.support:preference-v7:$supportVersion"
implementation "com.android.support:preference-v14:$supportVersion"
implementation project(path: ':keepass-model')
}

View File

@@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -1,31 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kunzisoft.magikeyboard" >
<uses-permission android:name="android.permission.VIBRATE"/>
<application>
<service
android:name="com.kunzisoft.magikeyboard.MagikIME"
android:label="@string/keyboard_label"
android:permission="android.permission.BIND_INPUT_METHOD" >
<meta-data android:name="android.view.im"
android:resource="@xml/method"/>
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
</service>
<service android:name=".KeyboardEntryNotificationService" />
<receiver
android:name=".receiver.NotificationDeleteBroadcastReceiver"
android:exported="false" >
</receiver>
<activity android:name="com.kunzisoft.magikeyboard.settings.MagikIMESettings"
android:label="@string/keyboard_setting_label">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
<activity android:name="com.kunzisoft.magikeyboard.EntryRetrieverActivity"
android:label="@string/keyboard_name">
</activity>
</application>
</manifest>

View File

@@ -1,6 +0,0 @@
package com.kunzisoft.magikeyboard;
public class Utility {
}

View File

@@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6h1.9c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,10h12v10z"/>
</vector>

View File

@@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
</vector>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar_default" />
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
tools:targetApi="lollipop" />

View File

@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Jeremy Jamet / Kunzisoft.
This file is part of KeePass DX.
KeePass DX is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
KeePass DX is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<color name="keyboard_button">#3c474c</color>
<color name="keyboard_button_pressed">#263238</color>
<color name="keyboard_button_border">#3c464c</color>
<color name="keyboard_background">#263238</color>
</resources>

View File

@@ -1,64 +0,0 @@
<!--
Copyright 2018 Jeremy Jamet / Kunzisoft.
This file is part of KeePass DX.
KeePass DX is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
KeePass DX is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with KeePass DX. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<string name="keyboard_name">Magikeyboard</string>
<string name="keyboard_label">Magikeyboard (KeePass DX)</string>
<string name="keyboard_setting_label">Magikeyboard settings</string>
<string name="entry_category">Entry</string>
<string name="entry_timeout_key" translatable="false">erase_entry_timeout_key</string>
<string name="entry_timeout_title">Timeout</string>
<string name="entry_timeout_summary">Timeout to clear the keyboard entry</string>
<string name="notification_entry_key" translatable="false">notification_entry_key</string>
<string name="notification_entry_title">Notification information</string>
<string name="notification_entry_summary">Show a notification when an entry is available</string>
<bool name="notification_entry_default" translatable="false">true</bool>
<string name="notification_entry_content_title_text">Entry</string>
<string name="notification_entry_content_title">%1$s available on Magikeyboard</string>
<string name="notification_entry_content_text">%1$s</string>
<string name="notification_entry_clear_close_key" translatable="false">notification_entry_slide_close_key</string>
<string name="notification_entry_clear_close_title">Clear at closing</string>
<string name="notification_entry_clear_close_summary">Clear the keyboard entry when closing the notification</string>
<bool name="notification_entry_clear_close_default" translatable="false">true</bool>
<string name="appearance_category">Appearance</string>
<string name="theme_key" translatable="false">theme_key</string>
<string name="theme_title">Theme</string>
<string name="keys_category">Keys</string>
<string name="key_vibrate_key" translatable="false">key_vibrate_key</string>
<string name="key_vibrate_title">Vibrate on keypress</string>
<bool name="key_vibrate_default" translatable="false">true</bool>
<string name="key_vibrate_duration_key" translatable="false">key_vibrate_duration_key</string>
<string name="key_vibrate_duration_title">Keypress vibration duration</string>
<string name="key_sound_key" translatable="false">key_sound_key</string>
<string name="key_sound_title">Sound on keypress</string>
<bool name="key_sound_default" translatable="false">false</bool>
<string name="key_long_press_delay_key" translatable="false">key_long_press_delay_key</string>
<string name="key_long_press_delay_title">Key long press delay</string>
</resources>

View File

@@ -1 +1 @@
include ':app', ':icon-pack-classic', ':icon-pack-material', ':magikeyboard', ':keepass-model' include ':app', ':icon-pack-classic', ':icon-pack-material'