Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.gradle
/build
/app/build
13 changes: 7 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
namespace = "com.kodholken.passdroid"
compileSdkVersion = 34
buildToolsVersion = "34.0.0"

defaultConfig {
applicationId "com.kodholken.passdroid"
minSdkVersion 24
targetSdkVersion 28
applicationId = "com.kodholken.passdroid"
minSdkVersion = 24
targetSdkVersion = 34
}

buildTypes {
release {
minifyEnabled false
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="24"
package="com.kodholken.passdroid"
android:versionName="2.3"
android:versionCode="25"
android:versionName="2.5"
android:installLocation="auto">

<supports-screens
Expand All @@ -18,6 +17,7 @@

<activity android:label="@string/app_name"
android:name="MainActivity"
android:exported="false"
android:theme="@android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/kodholken/passdroid/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ public static void setTimeoutTimer(Context context) {
am.cancel(session.timeoutIntent);
session.timeoutIntent = null;
}
session.timeoutIntent = PendingIntent.getBroadcast(context, 0, new Intent(TIMEOUT_ACTION), PendingIntent.FLAG_ONE_SHOT);

session.timeoutIntent = PendingIntent.getBroadcast(context, 0, new Intent(TIMEOUT_ACTION), PendingIntent.FLAG_IMMUTABLE);
am.set(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime() + 5000, session.timeoutIntent);
}

Expand Down
Binary file added app/src/main/res/drawable/safe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 139 additions & 0 deletions app/src/main/res/layout/generate_password.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="250dip"
android:layout_height="wrap_content"
android:background="#000000"
android:orientation="vertical" >

<TextView
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingBottom="10dip"
android:paddingTop="10dip"
android:text="@string/generate_password"
android:textColor="#ffffff"
android:background="#000000"
android:textSize="18dip" />

<LinearLayout
android:id="@+id/layout_id"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:orientation="vertical"
android:padding="20dip" >

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical"
android:paddingBottom="10dip" >

<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/character_set" />

<Spinner
android:id="@+id/charset"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:entries="@array/charsets" />
</LinearLayout>

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/picker"
android:paddingRight="5dip"
android:text="@string/length" />

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/picker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:orientation="vertical" >

<ImageButton
android:id="@+id/increment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/picker_up" />

<EditText
android:id="@+id/length_input"
style="?android:attr/textAppearanceLargeInverse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/picker_input"
android:cursorVisible="false"
android:editable="false"
android:gravity="center"
android:maxLength="2"
android:singleLine="true"
android:textColor="@android:color/primary_text_light"
android:textSize="30sp" />

<ImageButton
android:id="@+id/decrement"
android:layout_width="wrap_content"
android:layout_height="40dip"
android:layout_weight="1"
android:background="@drawable/picker_down" />
</LinearLayout>
</RelativeLayout>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/strength" />

<ImageView
android:id="@+id/strength_meter"
android:layout_width="fill_parent"
android:layout_height="10px"
android:layout_marginTop="5dip"
android:src="@drawable/gradient" />
</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#cccccc"
android:orientation="horizontal"
android:padding="5dip" >

<Button
android:id="@+id/generate_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/generate"
android:textSize="15sp"/>

<Button
android:id="@+id/cancel_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/cancel"
android:textSize="15sp"/>
</LinearLayout>

</LinearLayout>
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
gradlePluginPortal()
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:8.4.0' // or latest
}
}

allprojects {
repositories {
gradlePluginPortal()
google()
jcenter()
mavenCentral()
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android.useAndroidX=true