Skip to content

Commit

Permalink
Encryption demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin McDonagh committed Jul 16, 2011
1 parent 62831c7 commit 1ce6848
Show file tree
Hide file tree
Showing 13 changed files with 828 additions and 0 deletions.
18 changes: 18 additions & 0 deletions encryption/AndroidManifest.xml
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.novoda"
android:versionCode="1"
android:versionName="1.0">


<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/Theme.Demo" >
<activity android:name=".Encrypt"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>
</manifest>
36 changes: 36 additions & 0 deletions encryption/proguard.cfg
@@ -0,0 +1,36 @@
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {
native <methods>;
}

-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
Binary file added encryption/res/drawable-hdpi/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added encryption/res/drawable-ldpi/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added encryption/res/drawable-mdpi/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions encryption/res/layout/main.xml
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/Fill">

<LinearLayout style="@style/Fill.Width.Horizontal">
<TextView android:text="Encrypted: " />
<TextView android:id="@+id/txt_encrypted" />
</LinearLayout>

<LinearLayout style="@style/Fill.Width.Horizontal">
<TextView android:text="After: " />
<TextView android:id="@+id/txt_unencrypted" />
</LinearLayout>

</LinearLayout>
5 changes: 5 additions & 0 deletions encryption/res/values/strings.xml
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, Encrypt!</string>
<string name="app_name">Encrypt</string>
</resources>
15 changes: 15 additions & 0 deletions encryption/res/values/styles_activities.xml
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="TEXT" />
<style name="TEXT.h1">
<item name="android:textSize">20sp</item>
</style>
<style name="TEXT.h1.white">
<item name="android:textColor">@android:color/white</item>
</style>
<style name="TEXT.li">
<item name="android:textSize">18sp</item>
</style>

</resources>
28 changes: 28 additions & 0 deletions encryption/res/values/styles_master.xml
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Fill">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:orientation">vertical</item>
</style>
<style name="Wrap">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:orientation">vertical</item>
</style>
<style name="Fill.Height" parent="@style/Fill">
<item name="android:layout_width">wrap_content</item>
</style>
<style name="Fill.Width" parent="@style/Fill">
<item name="android:layout_height">wrap_content</item>
</style>
<style name="Fill.Width.Horizontal" parent="@style/Fill.Width">
<item name="android:orientation">horizontal</item>
</style>
<style name="Fill.Height.Horizontal" parent="@style/Fill.Height">
<item name="android:orientation">horizontal</item>
</style>
<style name="Fill.Horizontal" parent="@style/Fill">
<item name="android:orientation">horizontal</item>
</style>
</resources>
19 changes: 19 additions & 0 deletions encryption/res/values/styles_theme.xml
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- _THEME -->
<style name="Theme" parent="android:Theme" />
<style name="Theme.Demo" parent="android:style/Theme.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:windowBackground">@android:color/white</item>
</style>

<!-- Widget Styles -->
<style name="Widget">
<item name="android:textAppearance">?android:attr/textAppearance</item>
</style>


</resources>

0 comments on commit 1ce6848

Please sign in to comment.