adds the android

This commit is contained in:
Timothy Prepscius 2013-08-09 16:48:44 -04:00
parent 5079615e69
commit 5fb69ebea8
295 changed files with 217724 additions and 0 deletions

8
android/Ext/.classpath Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

33
android/Ext/.project Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Ext</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ext"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
</application>
</manifest>

View File

@ -0,0 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ext"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
</application>
</manifest>

4
android/Ext/bin/R.txt Normal file
View File

@ -0,0 +1,4 @@
int drawable ic_launcher 0x7f020000
int string app_name 0x7f030000
int style AppBaseTheme 0x7f040000
int style AppTheme 0x7f040001

View File

@ -0,0 +1,68 @@
JSON in Java [package org.json]
Douglas Crockford
douglas@crockford.com
2011-02-02
JSON is a light-weight, language independent, data interchange format.
See http://www.JSON.org/
The files in this package implement JSON encoders/decoders in Java.
It also includes the capability to convert between JSON and XML, HTTP
headers, Cookies, and CDL.
This is a reference implementation. There is a large number of JSON packages
in Java. Perhaps someday the Java community will standardize on one. Until
then, choose carefully.
The license includes this restriction: "The software shall be used for good,
not evil." If your conscience cannot live with that, then choose a different
package.
The package compiles on Java 1.2 thru Java 1.4.
JSONObject.java: The JSONObject can parse text from a String or a JSONTokener
to produce a map-like object. The object provides methods for manipulating its
contents, and for producing a JSON compliant object serialization.
JSONArray.java: The JSONObject can parse text from a String or a JSONTokener
to produce a vector-like object. The object provides methods for manipulating
its contents, and for producing a JSON compliant array serialization.
JSONTokener.java: The JSONTokener breaks a text into a sequence of individual
tokens. It can be constructed from a String, Reader, or InputStream.
JSONException.java: The JSONException is the standard exception type thrown
by this package.
JSONString.java: The JSONString interface requires a toJSONString method,
allowing an object to provide its own serialization.
JSONStringer.java: The JSONStringer provides a convenient facility for
building JSON strings.
JSONWriter.java: The JSONWriter provides a convenient facility for building
JSON text through a writer.
CDL.java: CDL provides support for converting between JSON and comma
delimited lists.
Cookie.java: Cookie provides support for converting between JSON and cookies.
CookieList.java: CookieList provides support for converting between JSON and
cookie lists.
HTTP.java: HTTP provides support for converting between JSON and HTTP headers.
HTTPTokener.java: HTTPTokener extends JSONTokener for parsing HTTP headers.
XML.java: XML provides support for converting between JSON and XML.
JSONML.java: JSONML provides support for converting between JSONML and XML.
XMLTokener.java: XMLTokener extends JSONTokener for parsing XML text.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,6 @@
/** Automatically generated file. DO NOT MODIFY */
package com.example.ext;
public final class BuildConfig {
public final static boolean DEBUG = true;
}

View File

@ -0,0 +1,47 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.ext;
public final class R {
public static final class attr {
}
public static final class drawable {
public static int ic_launcher=0x7f020000;
}
public static final class string {
public static int app_name=0x7f030000;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static int AppBaseTheme=0x7f040000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static int AppTheme=0x7f040001;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# 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 *;
#}

View File

@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-17
android.library=true

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,11 @@
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>

View File

@ -0,0 +1,12 @@
<resources>
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>

View File

@ -0,0 +1,5 @@
<resources>
<string name="app_name">Ext</string>
</resources>

View File

@ -0,0 +1,20 @@
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>

1
android/Ext/src/com Symbolic link
View File

@ -0,0 +1 @@
../../../java/ext/jordanzimmerman/src/com

1
android/Ext/src/org/bc Symbolic link
View File

@ -0,0 +1 @@
../../../../java/ext/bouncycastle/src/org/bc

1
android/Ext/src/org/json Symbolic link
View File

@ -0,0 +1 @@
../../../../java/ext/json/src/org/json

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="com.android.toolchain.gcc.2129629315">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.android.toolchain.gcc.2129629315" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.android.toolchain.gcc.2129629315" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="com.android.toolchain.gcc.2129629315.250464844" name="/" resourcePath="">
<toolChain id="com.android.toolchain.gcc.1220756060" name="com.android.toolchain.gcc" superClass="com.android.toolchain.gcc">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.492579735" isAbstract="false" superClass="com.android.targetPlatform"/>
<builder id="com.android.builder.611520053" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="obj"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="libs"/>
</outputEntries>
</builder>
<tool id="com.android.gcc.compiler.40786081" name="Android GCC Compiler" superClass="com.android.gcc.compiler">
<inputType id="com.android.gcc.inputType.1765261595" superClass="com.android.gcc.inputType"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="jni"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="Mailiverse.null.1500974706" name="Mailiverse"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="com.android.toolchain.gcc.2129629315;com.android.toolchain.gcc.2129629315.250464844;com.android.gcc.compiler.40786081;com.android.gcc.inputType.1765261595">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.android.AndroidPerProjectProfile"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="1">
<resource resourceType="PROJECT" workspacePath="/Mailiverse"/>
</storageModule>
</cproject>

View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Mailiverse</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?children?</key>
<value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\||</value>
</dictionary>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>ndk-build</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.benith.mailiverse"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.benith.mailiverse.MainActivity"
android:label="@string/app_name" android:parentActivityName="com.benith.mailiverse.LoginActivity">
</activity>
<activity
android:name="com.benith.mailiverse.LoginActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.benith.mailiverse.ConversationActivity"
android:label="@string/title_activity_conversation" android:parentActivityName="com.benith.mailiverse.MainActivity">
</activity>
</application>
</manifest>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.benith.mailiverse"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.benith.mailiverse.MainActivity"
android:label="@string/app_name" android:parentActivityName="com.benith.mailiverse.LoginActivity">
</activity>
<activity
android:name="com.benith.mailiverse.LoginActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.benith.mailiverse.ConversationActivity"
android:label="@string/title_activity_conversation" android:parentActivityName="com.benith.mailiverse.MainActivity">
</activity>
</application>
</manifest>

View File

@ -0,0 +1,113 @@
int anim back_enter 0x7f040000
int anim back_leave 0x7f040001
int anim forward_enter 0x7f040002
int anim forward_leave 0x7f040003
int attr behindOffset 0x7f010003
int attr behindScrollScale 0x7f010005
int attr behindWidth 0x7f010004
int attr fadeDegree 0x7f01000b
int attr fadeEnabled 0x7f01000a
int attr mode 0x7f010000
int attr selectorDrawable 0x7f01000d
int attr selectorEnabled 0x7f01000c
int attr shadowDrawable 0x7f010008
int attr shadowWidth 0x7f010009
int attr touchModeAbove 0x7f010006
int attr touchModeBehind 0x7f010007
int attr viewAbove 0x7f010001
int attr viewBehind 0x7f010002
int dimen activity_horizontal_margin 0x7f080000
int dimen activity_vertical_margin 0x7f080001
int drawable ic_launcher 0x7f020000
int drawable spiral_galaxy_bg 0x7f020001
int id LinearLayout1 0x7f070017
int id LinearLayout2 0x7f070010
int id RelativeLayout1 0x7f070012
int id action_forgot_password 0x7f070027
int id action_settings 0x7f070026
int id conversationBackButton 0x7f070006
int id conversationBrief 0x7f070016
int id conversationCheck 0x7f070011
int id conversationDate 0x7f070013
int id conversationList 0x7f070019
int id conversationName 0x7f070014
int id conversationSubject 0x7f070015
int id email 0x7f07000c
int id folderList 0x7f070023
int id folderName 0x7f07001a
int id folderQuantity 0x7f07001b
int id folderRevealButton 0x7f070018
int id fullscreen 0x7f070003
int id left 0x7f070000
int id login 0x7f07000e
int id login_background 0x7f070008
int id login_form 0x7f07000b
int id login_status 0x7f070009
int id login_status_message 0x7f07000a
int id mailAuthor 0x7f07001d
int id mailBody 0x7f070020
int id mailDate 0x7f07001e
int id mailList 0x7f070007
int id mailRecipients 0x7f07001f
int id mailSubject 0x7f07001c
int id mails 0x7f070005
int id margin 0x7f070002
int id menu_settings 0x7f070025
int id password 0x7f07000d
int id revealLogout 0x7f070021
int id revealUserName 0x7f070022
int id right 0x7f070001
int id selected_view 0x7f070004
int id sign_in_button 0x7f07000f
int id slidingmenumain 0x7f070024
int layout activity_conversation 0x7f030000
int layout activity_login 0x7f030001
int layout activity_main 0x7f030002
int layout conversation_item 0x7f030003
int layout folder 0x7f030004
int layout folder_item 0x7f030005
int layout mail_header_item 0x7f030006
int layout mail_item 0x7f030007
int layout reveal_folders 0x7f030008
int layout slidingmenumain 0x7f030009
int menu activity_conversation 0x7f090000
int menu activity_folder 0x7f090001
int menu activity_main 0x7f090002
int menu conversation 0x7f090003
int menu login 0x7f090004
int string action_forgot_password 0x7f05000c
int string action_settings 0x7f050006
int string action_sign_in_register 0x7f05000a
int string action_sign_in_short 0x7f05000b
int string app_name 0x7f050000
int string error_field_required 0x7f050011
int string error_incorrect_password 0x7f050010
int string error_invalid_email 0x7f05000e
int string error_invalid_password 0x7f05000f
int string hello_world 0x7f050001
int string login_progress_signing_in 0x7f05000d
int string menu_settings 0x7f050002
int string prompt_email 0x7f050008
int string prompt_password 0x7f050009
int string title_activity_conversation 0x7f050005
int string title_activity_folder 0x7f050003
int string title_activity_login 0x7f050007
int string title_activity_main 0x7f050004
int style AppBaseTheme 0x7f060000
int style AppTheme 0x7f060001
int style LoginFormContainer 0x7f060002
int[] styleable SlidingMenu { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d }
int styleable SlidingMenu_behindOffset 3
int styleable SlidingMenu_behindScrollScale 5
int styleable SlidingMenu_behindWidth 4
int styleable SlidingMenu_fadeDegree 11
int styleable SlidingMenu_fadeEnabled 10
int styleable SlidingMenu_mode 0
int styleable SlidingMenu_selectorDrawable 13
int styleable SlidingMenu_selectorEnabled 12
int styleable SlidingMenu_shadowDrawable 8
int styleable SlidingMenu_shadowWidth 9
int styleable SlidingMenu_touchModeAbove 6
int styleable SlidingMenu_touchModeBehind 7
int styleable SlidingMenu_viewAbove 1
int styleable SlidingMenu_viewBehind 2

View File

@ -0,0 +1,145 @@
package mail.client.core;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import javax.mail.BodyPart;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import com.sun.mail.util.BASE64DecoderStream;
import core.util.Arrays;
import core.util.LogNull;
import core.util.LogNull;
import core.util.Pair;
import core.util.Streams;
import core.util.Triple;
public class Original
{
static LogNull log = new LogNull(Original.class);
String path;
boolean loaded;
Exception exception;
byte[] data;
public Original (String path)
{
this.path = path;
}
public String getPath ()
{
return path;
}
public void setData (byte[] data)
{
this.data = data;
this.loaded = true;
}
public boolean hasData ()
{
return data!=null;
}
public String getDataAsString () throws UnsupportedEncodingException
{
return new String(data);
}
public boolean isLoaded ()
{
return loaded;
}
public boolean hasException()
{
return exception!=null;
}
public void setException(Exception exception)
{
this.exception = exception;
this.loaded = true;
}
public Exception getException()
{
return exception;
}
List<Attachment> attachments;
public void loadAttachments (Attachments attachments) throws Exception
{
log.debug("loadAttachments a ", data.length, " "+ new Date());
Session s = Session.getDefaultInstance(new Properties());
MimeMessage message = new MimeMessage(s, new ByteArrayInputStream(data));
log.debug("loadAttachments b ", new Date());
List<Triple<String, String, Object>> contents = new ArrayList<Triple<String, String, Object>>();
contents.add(new Triple<String,String,Object>(message.getDisposition(), message.getContentID(), message.getContent()));
while (contents.size() > 0)
{
log.debug("loadAttachments c ", new Date());
Triple<String, String, Object> p = contents.get(0);
contents.remove(0);
String disposition = p.first;
String id = p.second;
Object content = p.third;
if (content instanceof InputStream)
{
String attachmentId = Attachment.getAttachmentId(disposition, id);
Attachment attachment = attachments.getAttachment(attachmentId);
if (attachment != null)
{
attachment.setData (Streams.readFullyBytes((InputStream)content));
}
}
else
if (content instanceof MimeMultipart)
{
MimeMultipart m = (MimeMultipart)content;
for (int i=0; i<m.getCount(); ++i)
{
BodyPart b = m.getBodyPart(i);
contents.add(
new Triple<String, String, Object>(
Arrays.firstOrNull(b.getHeader("Content-Disposition")),
Arrays.firstOrNull(b.getHeader("Content-Id")),
b.getContent()
)
);
}
}
}
log.debug("loadAttachments d ", new Date());
attachments.setLoaded(true);
}
public List<Attachment> getAttachments ()
{
log.debug("getAttachments", new Date());
return attachments;
}
}

View File

@ -0,0 +1,6 @@
# cache for current jar dependecy. DO NOT EDIT.
# format is <lastModified> <length> <SHA-1> <path>
# Encoding is UTF-8
1361137686000 385677 b9c504522d97f64025c387493d3989e52bc617bd /Users/tprepscius/Projects/mailiverse/android/Ext/libs/android-support-v4.jar
1360712012000 385677 b9c504522d97f64025c387493d3989e52bc617bd /Users/tprepscius/Projects/mailiverse/android/SlidingMenu/library/libs/android-support-v4.jar
1361130143000 385677 b9c504522d97f64025c387493d3989e52bc617bd /Users/tprepscius/Projects/mailiverse/android/Mailiverse/libs/android-support-v4.jar

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,6 @@
/** Automatically generated file. DO NOT MODIFY */
package com.benith.mailiverse;
public final class BuildConfig {
public final static boolean DEBUG = true;
}

View File

@ -0,0 +1,517 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.benith.mailiverse;
public final class R {
public static final class anim {
public static final int back_enter=0x7f040000;
public static final int back_leave=0x7f040001;
public static final int forward_enter=0x7f040002;
public static final int forward_leave=0x7f040003;
}
public static final class attr {
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int behindOffset=0x7f010003;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int behindScrollScale=0x7f010005;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int behindWidth=0x7f010004;
/** <p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int fadeDegree=0x7f01000b;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int fadeEnabled=0x7f01000a;
/** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>left</code></td><td>0</td><td></td></tr>
<tr><td><code>right</code></td><td>1</td><td></td></tr>
</table>
*/
public static final int mode=0x7f010000;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int selectorDrawable=0x7f01000d;
/** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int selectorEnabled=0x7f01000c;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int shadowDrawable=0x7f010008;
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
*/
public static final int shadowWidth=0x7f010009;
/** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>margin</code></td><td>0</td><td></td></tr>
<tr><td><code>fullscreen</code></td><td>1</td><td></td></tr>
</table>
*/
public static final int touchModeAbove=0x7f010006;
/** <p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>margin</code></td><td>0</td><td></td></tr>
<tr><td><code>fullscreen</code></td><td>1</td><td></td></tr>
</table>
*/
public static final int touchModeBehind=0x7f010007;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int viewAbove=0x7f010001;
/** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
*/
public static final int viewBehind=0x7f010002;
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
*/
public static final int activity_horizontal_margin=0x7f080000;
public static final int activity_vertical_margin=0x7f080001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
public static final int spiral_galaxy_bg=0x7f020001;
}
public static final class id {
public static final int LinearLayout1=0x7f070017;
public static final int LinearLayout2=0x7f070010;
public static final int RelativeLayout1=0x7f070012;
public static final int action_forgot_password=0x7f070027;
public static final int action_settings=0x7f070026;
public static final int conversationBackButton=0x7f070006;
public static final int conversationBrief=0x7f070016;
public static final int conversationCheck=0x7f070011;
public static final int conversationDate=0x7f070013;
public static final int conversationList=0x7f070019;
public static final int conversationName=0x7f070014;
public static final int conversationSubject=0x7f070015;
public static final int email=0x7f07000c;
public static final int folderList=0x7f070023;
public static final int folderName=0x7f07001a;
public static final int folderQuantity=0x7f07001b;
public static final int folderRevealButton=0x7f070018;
public static final int fullscreen=0x7f070003;
public static final int left=0x7f070000;
public static final int login=0x7f07000e;
public static final int login_background=0x7f070008;
public static final int login_form=0x7f07000b;
public static final int login_status=0x7f070009;
public static final int login_status_message=0x7f07000a;
public static final int mailAuthor=0x7f07001d;
public static final int mailBody=0x7f070020;
public static final int mailDate=0x7f07001e;
public static final int mailList=0x7f070007;
public static final int mailRecipients=0x7f07001f;
public static final int mailSubject=0x7f07001c;
public static final int mails=0x7f070005;
public static final int margin=0x7f070002;
public static final int menu_settings=0x7f070025;
public static final int password=0x7f07000d;
public static final int revealLogout=0x7f070021;
public static final int revealUserName=0x7f070022;
public static final int right=0x7f070001;
public static final int selected_view=0x7f070004;
public static final int sign_in_button=0x7f07000f;
public static final int slidingmenumain=0x7f070024;
}
public static final class layout {
public static final int activity_conversation=0x7f030000;
public static final int activity_login=0x7f030001;
public static final int activity_main=0x7f030002;
public static final int conversation_item=0x7f030003;
public static final int folder=0x7f030004;
public static final int folder_item=0x7f030005;
public static final int mail_header_item=0x7f030006;
public static final int mail_item=0x7f030007;
public static final int reveal_folders=0x7f030008;
public static final int slidingmenumain=0x7f030009;
}
public static final class menu {
public static final int activity_conversation=0x7f090000;
public static final int activity_folder=0x7f090001;
public static final int activity_main=0x7f090002;
public static final int conversation=0x7f090003;
public static final int login=0x7f090004;
}
public static final class string {
public static final int action_forgot_password=0x7f05000c;
public static final int action_settings=0x7f050006;
public static final int action_sign_in_register=0x7f05000a;
public static final int action_sign_in_short=0x7f05000b;
public static final int app_name=0x7f050000;
public static final int error_field_required=0x7f050011;
public static final int error_incorrect_password=0x7f050010;
public static final int error_invalid_email=0x7f05000e;
public static final int error_invalid_password=0x7f05000f;
public static final int hello_world=0x7f050001;
public static final int login_progress_signing_in=0x7f05000d;
public static final int menu_settings=0x7f050002;
/** Strings related to login
*/
public static final int prompt_email=0x7f050008;
public static final int prompt_password=0x7f050009;
public static final int title_activity_conversation=0x7f050005;
public static final int title_activity_folder=0x7f050003;
public static final int title_activity_login=0x7f050007;
public static final int title_activity_main=0x7f050004;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f060000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f060001;
public static final int LoginFormContainer=0x7f060002;
}
public static final class styleable {
/** Attributes that can be used with a SlidingMenu.
<p>Includes the following attributes:</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Attribute</th><th>Description</th></tr>
<tr><td><code>{@link #SlidingMenu_behindOffset com.benith.mailiverse:behindOffset}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_behindScrollScale com.benith.mailiverse:behindScrollScale}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_behindWidth com.benith.mailiverse:behindWidth}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_fadeDegree com.benith.mailiverse:fadeDegree}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_fadeEnabled com.benith.mailiverse:fadeEnabled}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_mode com.benith.mailiverse:mode}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_selectorDrawable com.benith.mailiverse:selectorDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_selectorEnabled com.benith.mailiverse:selectorEnabled}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_shadowDrawable com.benith.mailiverse:shadowDrawable}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_shadowWidth com.benith.mailiverse:shadowWidth}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_touchModeAbove com.benith.mailiverse:touchModeAbove}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_touchModeBehind com.benith.mailiverse:touchModeBehind}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_viewAbove com.benith.mailiverse:viewAbove}</code></td><td></td></tr>
<tr><td><code>{@link #SlidingMenu_viewBehind com.benith.mailiverse:viewBehind}</code></td><td></td></tr>
</table>
@see #SlidingMenu_behindOffset
@see #SlidingMenu_behindScrollScale
@see #SlidingMenu_behindWidth
@see #SlidingMenu_fadeDegree
@see #SlidingMenu_fadeEnabled
@see #SlidingMenu_mode
@see #SlidingMenu_selectorDrawable
@see #SlidingMenu_selectorEnabled
@see #SlidingMenu_shadowDrawable
@see #SlidingMenu_shadowWidth
@see #SlidingMenu_touchModeAbove
@see #SlidingMenu_touchModeBehind
@see #SlidingMenu_viewAbove
@see #SlidingMenu_viewBehind
*/
public static final int[] SlidingMenu = {
0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007,
0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b,
0x7f01000c, 0x7f01000d
};
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#behindOffset}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:behindOffset
*/
public static final int SlidingMenu_behindOffset = 3;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#behindScrollScale}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:behindScrollScale
*/
public static final int SlidingMenu_behindScrollScale = 5;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#behindWidth}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:behindWidth
*/
public static final int SlidingMenu_behindWidth = 4;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#fadeDegree}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a floating point value, such as "<code>1.2</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:fadeDegree
*/
public static final int SlidingMenu_fadeDegree = 11;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#fadeEnabled}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:fadeEnabled
*/
public static final int SlidingMenu_fadeEnabled = 10;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#mode}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>left</code></td><td>0</td><td></td></tr>
<tr><td><code>right</code></td><td>1</td><td></td></tr>
</table>
@attr name android:mode
*/
public static final int SlidingMenu_mode = 0;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#selectorDrawable}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name android:selectorDrawable
*/
public static final int SlidingMenu_selectorDrawable = 13;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#selectorEnabled}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>".
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:selectorEnabled
*/
public static final int SlidingMenu_selectorEnabled = 12;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#shadowDrawable}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name android:shadowDrawable
*/
public static final int SlidingMenu_shadowDrawable = 8;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#shadowWidth}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
in (inches), mm (millimeters).
<p>This may also be a reference to a resource (in the form
"<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or
theme attribute (in the form
"<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>")
containing a value of this type.
@attr name android:shadowWidth
*/
public static final int SlidingMenu_shadowWidth = 9;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#touchModeAbove}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>margin</code></td><td>0</td><td></td></tr>
<tr><td><code>fullscreen</code></td><td>1</td><td></td></tr>
</table>
@attr name android:touchModeAbove
*/
public static final int SlidingMenu_touchModeAbove = 6;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#touchModeBehind}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be one of the following constant values.</p>
<table>
<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />
<tr><th>Constant</th><th>Value</th><th>Description</th></tr>
<tr><td><code>margin</code></td><td>0</td><td></td></tr>
<tr><td><code>fullscreen</code></td><td>1</td><td></td></tr>
</table>
@attr name android:touchModeBehind
*/
public static final int SlidingMenu_touchModeBehind = 7;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#viewAbove}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name android:viewAbove
*/
public static final int SlidingMenu_viewAbove = 1;
/**
<p>This symbol is the offset where the {@link com.benith.mailiverse.R.attr#viewBehind}
attribute's value can be found in the {@link #SlidingMenu} array.
<p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>"
or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>".
@attr name android:viewBehind
*/
public static final int SlidingMenu_viewBehind = 2;
};
}

View File

@ -0,0 +1,20 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.ext;
public final class R {
public static final class style {
public static final int AppBaseTheme = 0x7f060000;
public static final int AppTheme = 0x7f060001;
}
public static final class string {
public static final int app_name = 0x7f050000;
}
public static final class drawable {
public static final int ic_launcher = 0x7f020000;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -0,0 +1,11 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := Mailiverse
LOCAL_SRC_FILES := \
Mailiverse.cpp \
core_crypt_PBEPlatformNative.c \
sha256.c
include $(BUILD_SHARED_LIBRARY)

View File

@ -0,0 +1 @@
APP_ABI := all

View File

@ -0,0 +1 @@
#include <jni.h>

View File

@ -0,0 +1,30 @@
#include "core_crypt_PBEPlatformNative.h"
// downloaded from https://github.com/johanns/PBKDF256/tree/master/ext/core
#include "sha256.h"
#include <stdlib.h>
JNIEXPORT jbyteArray JNICALL Java_core_crypt_PBEPlatformNative_generate
(JNIEnv *jenv, jclass jclazz, jstring jpassword, jbyteArray jsalt, jint jiterations, jint jkeyLengthBits)
{
jboolean isCopy;
const char *password = (*jenv)->GetStringUTFChars(jenv, jpassword, 0);
jbyte *salt = (*jenv)->GetByteArrayElements (jenv, jsalt, &isCopy);
jint saltLength = (*jenv)->GetArrayLength(jenv, jsalt);
int keyLengthBytes = jkeyLengthBits/8;
unsigned char *out = malloc(keyLengthBytes);
const uint8_t *ucSalt = (const uint8_t *)salt;
const uint8_t *ucPassword = (const uint8_t *)password;
uint64_t u64Iterations = (uint64_t)jiterations;
s_PBKDF2_SHA256 (password, strlen(password), ucSalt, saltLength, u64Iterations, out, keyLengthBytes);
jbyteArray jout = (*jenv)->NewByteArray (jenv, keyLengthBytes);
(*jenv)->SetByteArrayRegion (jenv, jout, 0, keyLengthBytes, out);
free (out);
(*jenv)->ReleaseByteArrayElements (jenv, jsalt, salt, isCopy);
return jout;
}

View File

@ -0,0 +1,21 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class core_crypt_PBEPlatform */
#ifndef _Included_core_crypt_PBEPlatform
#define _Included_core_crypt_PBEPlatform
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: core_crypt_PBEPlatform
* Method: generate
* Signature: (Ljava/lang/String;[BII)[B
*/
JNIEXPORT jbyteArray JNICALL Java_core_crypt_PBEPlatformNative_generate
(JNIEnv *, jclass, jstring, jbyteArray, jint, jint);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,4 @@
#ifndef _SCRYPT_PLATFORM_H_
#define _SCRYPT_PLATFORM_H_
#endif /* !_SCRYPT_PLATFORM_H_ */

View File

@ -0,0 +1,421 @@
/*-
*
* WOOOHOOO!!!
*
* Sept. 25th 2012: Appending prefix to function prototypes to avoid collision with
* OpenSSL methods when requiring openssl module in Ruby which causes the VM to crash!
*
-*/
/*-
* Copyright 2005,2007,2009 Colin Percival
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "scrypt_platform.h"
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include "sysendian.h"
#include "sha256.h"
/*
* Encode a length len/4 vector of (uint32_t) into a length len vector of
* (unsigned char) in big-endian form. Assumes len is a multiple of 4.
*/
static void
be32enc_vect(unsigned char *dst, const uint32_t *src, size_t len)
{
size_t i;
for (i = 0; i < len / 4; i++)
be32enc(dst + i * 4, src[i]);
}
/*
* Decode a big-endian length len vector of (unsigned char) into a length
* len/4 vector of (uint32_t). Assumes len is a multiple of 4.
*/
static void
be32dec_vect(uint32_t *dst, const unsigned char *src, size_t len)
{
size_t i;
for (i = 0; i < len / 4; i++)
dst[i] = be32dec(src + i * 4);
}
/* Elementary functions used by SHA256 */
#define Ch(x, y, z) ((x & (y ^ z)) ^ z)
#define Maj(x, y, z) ((x & (y | z)) | (y & z))
#define SHR(x, n) (x >> n)
#define ROTR(x, n) ((x >> n) | (x << (32 - n)))
#define S0(x) (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22))
#define S1(x) (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25))
#define s0(x) (ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3))
#define s1(x) (ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10))
/* SHA256 round function */
#define RND(a, b, c, d, e, f, g, h, k) \
t0 = h + S1(e) + Ch(e, f, g) + k; \
t1 = S0(a) + Maj(a, b, c); \
d += t0; \
h = t0 + t1;
/* Adjusted round function for rotating state */
#define RNDr(S, W, i, k) \
RND(S[(64 - i) % 8], S[(65 - i) % 8], \
S[(66 - i) % 8], S[(67 - i) % 8], \
S[(68 - i) % 8], S[(69 - i) % 8], \
S[(70 - i) % 8], S[(71 - i) % 8], \
W[i] + k)
/*
* SHA256 block compression function. The 256-bit state is transformed via
* the 512-bit input block to produce a new state.
*/
static void
SHA256_Transform(uint32_t * state, const unsigned char block[64])
{
uint32_t W[64];
uint32_t S[8];
uint32_t t0, t1;
int i;
/* 1. Prepare message schedule W. */
be32dec_vect(W, block, 64);
for (i = 16; i < 64; i++)
W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16];
/* 2. Initialize working variables. */
memcpy(S, state, 32);
/* 3. Mix. */
RNDr(S, W, 0, 0x428a2f98);
RNDr(S, W, 1, 0x71374491);
RNDr(S, W, 2, 0xb5c0fbcf);
RNDr(S, W, 3, 0xe9b5dba5);
RNDr(S, W, 4, 0x3956c25b);
RNDr(S, W, 5, 0x59f111f1);
RNDr(S, W, 6, 0x923f82a4);
RNDr(S, W, 7, 0xab1c5ed5);
RNDr(S, W, 8, 0xd807aa98);
RNDr(S, W, 9, 0x12835b01);
RNDr(S, W, 10, 0x243185be);
RNDr(S, W, 11, 0x550c7dc3);
RNDr(S, W, 12, 0x72be5d74);
RNDr(S, W, 13, 0x80deb1fe);
RNDr(S, W, 14, 0x9bdc06a7);
RNDr(S, W, 15, 0xc19bf174);
RNDr(S, W, 16, 0xe49b69c1);
RNDr(S, W, 17, 0xefbe4786);
RNDr(S, W, 18, 0x0fc19dc6);
RNDr(S, W, 19, 0x240ca1cc);
RNDr(S, W, 20, 0x2de92c6f);
RNDr(S, W, 21, 0x4a7484aa);
RNDr(S, W, 22, 0x5cb0a9dc);
RNDr(S, W, 23, 0x76f988da);
RNDr(S, W, 24, 0x983e5152);
RNDr(S, W, 25, 0xa831c66d);
RNDr(S, W, 26, 0xb00327c8);
RNDr(S, W, 27, 0xbf597fc7);
RNDr(S, W, 28, 0xc6e00bf3);
RNDr(S, W, 29, 0xd5a79147);
RNDr(S, W, 30, 0x06ca6351);
RNDr(S, W, 31, 0x14292967);
RNDr(S, W, 32, 0x27b70a85);
RNDr(S, W, 33, 0x2e1b2138);
RNDr(S, W, 34, 0x4d2c6dfc);
RNDr(S, W, 35, 0x53380d13);
RNDr(S, W, 36, 0x650a7354);
RNDr(S, W, 37, 0x766a0abb);
RNDr(S, W, 38, 0x81c2c92e);
RNDr(S, W, 39, 0x92722c85);
RNDr(S, W, 40, 0xa2bfe8a1);
RNDr(S, W, 41, 0xa81a664b);
RNDr(S, W, 42, 0xc24b8b70);
RNDr(S, W, 43, 0xc76c51a3);
RNDr(S, W, 44, 0xd192e819);
RNDr(S, W, 45, 0xd6990624);
RNDr(S, W, 46, 0xf40e3585);
RNDr(S, W, 47, 0x106aa070);
RNDr(S, W, 48, 0x19a4c116);
RNDr(S, W, 49, 0x1e376c08);
RNDr(S, W, 50, 0x2748774c);
RNDr(S, W, 51, 0x34b0bcb5);
RNDr(S, W, 52, 0x391c0cb3);
RNDr(S, W, 53, 0x4ed8aa4a);
RNDr(S, W, 54, 0x5b9cca4f);
RNDr(S, W, 55, 0x682e6ff3);
RNDr(S, W, 56, 0x748f82ee);
RNDr(S, W, 57, 0x78a5636f);
RNDr(S, W, 58, 0x84c87814);
RNDr(S, W, 59, 0x8cc70208);
RNDr(S, W, 60, 0x90befffa);
RNDr(S, W, 61, 0xa4506ceb);
RNDr(S, W, 62, 0xbef9a3f7);
RNDr(S, W, 63, 0xc67178f2);
/* 4. Mix local working variables into global state */
for (i = 0; i < 8; i++)
state[i] += S[i];
/* Clean the stack. */
memset(W, 0, 256);
memset(S, 0, 32);
t0 = t1 = 0;
}
static unsigned char PAD[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/* Add padding and terminating bit-count. */
static void
SHA256_Pad(SHA256_CTX * ctx)
{
unsigned char len[8];
uint32_t r, plen;
/*
* Convert length to a vector of bytes -- we do this now rather
* than later because the length will change after we pad.
*/
be32enc_vect(len, ctx->count, 8);
/* Add 1--64 bytes so that the resulting length is 56 mod 64 */
r = (ctx->count[1] >> 3) & 0x3f;
plen = (r < 56) ? (56 - r) : (120 - r);
s_SHA256_Update(ctx, PAD, (size_t)plen);
/* Add the terminating bit-count */
s_SHA256_Update(ctx, len, 8);
}
/* SHA-256 initialization. Begins a SHA-256 operation. */
void
s_SHA256_Init(SHA256_CTX * ctx)
{
/* Zero bits processed so far */
ctx->count[0] = ctx->count[1] = 0;
/* Magic initialization constants */
ctx->state[0] = 0x6A09E667;
ctx->state[1] = 0xBB67AE85;
ctx->state[2] = 0x3C6EF372;
ctx->state[3] = 0xA54FF53A;
ctx->state[4] = 0x510E527F;
ctx->state[5] = 0x9B05688C;
ctx->state[6] = 0x1F83D9AB;
ctx->state[7] = 0x5BE0CD19;
}
/* Add bytes into the hash */
void
s_SHA256_Update(SHA256_CTX * ctx, const void *in, size_t len)
{
uint32_t bitlen[2];
uint32_t r;
const unsigned char *src = in;
/* Number of bytes left in the buffer from previous updates */
r = (ctx->count[1] >> 3) & 0x3f;
/* Convert the length into a number of bits */
bitlen[1] = ((uint32_t)len) << 3;
bitlen[0] = (uint32_t)(len >> 29);
/* Update number of bits */
if ((ctx->count[1] += bitlen[1]) < bitlen[1])
ctx->count[0]++;
ctx->count[0] += bitlen[0];
/* Handle the case where we don't need to perform any transforms */
if (len < 64 - r) {
memcpy(&ctx->buf[r], src, len);
return;
}
/* Finish the current block */
memcpy(&ctx->buf[r], src, 64 - r);
SHA256_Transform(ctx->state, ctx->buf);
src += 64 - r;
len -= 64 - r;
/* Perform complete blocks */
while (len >= 64) {
SHA256_Transform(ctx->state, src);
src += 64;
len -= 64;
}
/* Copy left over data into buffer */
memcpy(ctx->buf, src, len);
}
/*
* SHA-256 finalization. Pads the input data, exports the hash value,
* and clears the context state.
*/
void
s_SHA256_Final(unsigned char digest[32], SHA256_CTX * ctx)
{
/* Add padding */
SHA256_Pad(ctx);
/* Write the hash */
be32enc_vect(digest, ctx->state, 32);
/* Clear the context state */
memset((void *)ctx, 0, sizeof(*ctx));
}
/* Initialize an HMAC-SHA256 operation with the given key. */
void
s_HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen)
{
unsigned char pad[64];
unsigned char khash[32];
const unsigned char * K = _K;
size_t i;
/* If Klen > 64, the key is really SHA256(K). */
if (Klen > 64) {
s_SHA256_Init(&ctx->ictx);
s_SHA256_Update(&ctx->ictx, K, Klen);
s_SHA256_Final(khash, &ctx->ictx);
K = khash;
Klen = 32;
}
/* Inner SHA256 operation is SHA256(K xor [block of 0x36] || data). */
s_SHA256_Init(&ctx->ictx);
memset(pad, 0x36, 64);
for (i = 0; i < Klen; i++)
pad[i] ^= K[i];
s_SHA256_Update(&ctx->ictx, pad, 64);
/* Outer SHA256 operation is SHA256(K xor [block of 0x5c] || hash). */
s_SHA256_Init(&ctx->octx);
memset(pad, 0x5c, 64);
for (i = 0; i < Klen; i++)
pad[i] ^= K[i];
s_SHA256_Update(&ctx->octx, pad, 64);
/* Clean the stack. */
memset(khash, 0, 32);
}
/* Add bytes to the HMAC-SHA256 operation. */
void
s_HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void *in, size_t len)
{
/* Feed data to the inner SHA256 operation. */
s_SHA256_Update(&ctx->ictx, in, len);
}
/* Finish an HMAC-SHA256 operation. */
void
s_HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX * ctx)
{
unsigned char ihash[32];
/* Finish the inner SHA256 operation. */
s_SHA256_Final(ihash, &ctx->ictx);
/* Feed the inner hash to the outer SHA256 operation. */
s_SHA256_Update(&ctx->octx, ihash, 32);
/* Finish the outer SHA256 operation. */
s_SHA256_Final(digest, &ctx->octx);
/* Clean the stack. */
memset(ihash, 0, 32);
}
/**
* s_PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):
* Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and
* write the output to buf. The value dkLen must be at most 32 * (2^32 - 1).
*/
void
s_PBKDF2_SHA256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt,
size_t saltlen, uint64_t c, uint8_t * buf, size_t dkLen)
{
HMAC_SHA256_CTX PShctx, hctx;
size_t i;
uint8_t ivec[4];
uint8_t U[32];
uint8_t T[32];
uint64_t j;
int k;
size_t clen;
/* Compute HMAC state after processing P and S. */
s_HMAC_SHA256_Init(&PShctx, passwd, passwdlen);
s_HMAC_SHA256_Update(&PShctx, salt, saltlen);
/* Iterate through the blocks. */
for (i = 0; i * 32 < dkLen; i++) {
/* Generate INT(i + 1). */
be32enc(ivec, (uint32_t)(i + 1));
/* Compute U_1 = PRF(P, S || INT(i)). */
memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX));
s_HMAC_SHA256_Update(&hctx, ivec, 4);
s_HMAC_SHA256_Final(U, &hctx);
/* T_i = U_1 ... */
memcpy(T, U, 32);
for (j = 2; j <= c; j++) {
/* Compute U_j. */
s_HMAC_SHA256_Init(&hctx, passwd, passwdlen);
s_HMAC_SHA256_Update(&hctx, U, 32);
s_HMAC_SHA256_Final(U, &hctx);
/* ... xor U_j ... */
for (k = 0; k < 32; k++)
T[k] ^= U[k];
}
/* Copy as many bytes as necessary into buf. */
clen = dkLen - i * 32;
if (clen > 32)
clen = 32;
memcpy(&buf[i * 32], T, clen);
}
/* Clean PShctx, since we never called _Final on it. */
memset(&PShctx, 0, sizeof(HMAC_SHA256_CTX));
}

View File

@ -0,0 +1,71 @@
/*-
*
* WOOOHOOO!!!
*
* Sept. 25th 2012: Appending prefix to function prototypes to avoid collision with
* OpenSSL methods when requiring openssl module in Ruby which causes the VM to crash!
*
-*/
/*-
* Copyright 2005,2007,2009 Colin Percival
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libmd/sha256.h,v 1.2 2006/01/17 15:35:56 phk Exp $
*/
#ifndef _SHA256_H_
#define _SHA256_H_
#include <sys/types.h>
#include <stdint.h>
typedef struct SHA256Context {
uint32_t state[8];
uint32_t count[2];
unsigned char buf[64];
} SHA256_CTX;
typedef struct HMAC_SHA256Context {
SHA256_CTX ictx;
SHA256_CTX octx;
} HMAC_SHA256_CTX;
void s_SHA256_Init(SHA256_CTX *);
void s_SHA256_Update(SHA256_CTX *, const void *, size_t);
void s_SHA256_Final(unsigned char [32], SHA256_CTX *);
void s_HMAC_SHA256_Init(HMAC_SHA256_CTX *, const void *, size_t);
void s_HMAC_SHA256_Update(HMAC_SHA256_CTX *, const void *, size_t);
void s_HMAC_SHA256_Final(unsigned char [32], HMAC_SHA256_CTX *);
/**
* s_PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):
* Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and
* write the output to buf. The value dkLen must be at most 32 * (2^32 - 1).
*/
void s_PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t,
uint64_t, uint8_t *, size_t);
#endif /* !_SHA256_H_ */

View File

@ -0,0 +1,140 @@
/*-
* Copyright 2007-2009 Colin Percival
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file was originally written by Colin Percival as part of the Tarsnap
* online backup system.
*/
#ifndef _SYSENDIAN_H_
#define _SYSENDIAN_H_
#include "scrypt_platform.h"
/* If we don't have be64enc, the <sys/endian.h> we have isn't usable. */
#if !HAVE_DECL_BE64ENC
#undef HAVE_SYS_ENDIAN_H
#endif
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#else
#include <stdint.h>
static inline uint32_t
be32dec(const void *pp)
{
const uint8_t *p = (uint8_t const *)pp;
return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
}
static inline void
be32enc(void *pp, uint32_t x)
{
uint8_t * p = (uint8_t *)pp;
p[3] = x & 0xff;
p[2] = (x >> 8) & 0xff;
p[1] = (x >> 16) & 0xff;
p[0] = (x >> 24) & 0xff;
}
static inline uint64_t
be64dec(const void *pp)
{
const uint8_t *p = (uint8_t const *)pp;
return ((uint64_t)(p[7]) + ((uint64_t)(p[6]) << 8) +
((uint64_t)(p[5]) << 16) + ((uint64_t)(p[4]) << 24) +
((uint64_t)(p[3]) << 32) + ((uint64_t)(p[2]) << 40) +
((uint64_t)(p[1]) << 48) + ((uint64_t)(p[0]) << 56));
}
static inline void
be64enc(void *pp, uint64_t x)
{
uint8_t * p = (uint8_t *)pp;
p[7] = x & 0xff;
p[6] = (x >> 8) & 0xff;
p[5] = (x >> 16) & 0xff;
p[4] = (x >> 24) & 0xff;
p[3] = (x >> 32) & 0xff;
p[2] = (x >> 40) & 0xff;
p[1] = (x >> 48) & 0xff;
p[0] = (x >> 56) & 0xff;
}
static inline uint32_t
le32dec(const void *pp)
{
const uint8_t *p = (uint8_t const *)pp;
return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) +
((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24));
}
static inline void
le32enc(void *pp, uint32_t x)
{
uint8_t * p = (uint8_t *)pp;
p[0] = x & 0xff;
p[1] = (x >> 8) & 0xff;
p[2] = (x >> 16) & 0xff;
p[3] = (x >> 24) & 0xff;
}
static inline uint64_t
le64dec(const void *pp)
{
const uint8_t *p = (uint8_t const *)pp;
return ((uint64_t)(p[0]) + ((uint64_t)(p[1]) << 8) +
((uint64_t)(p[2]) << 16) + ((uint64_t)(p[3]) << 24) +
((uint64_t)(p[4]) << 32) + ((uint64_t)(p[5]) << 40) +
((uint64_t)(p[6]) << 48) + ((uint64_t)(p[7]) << 56));
}
static inline void
le64enc(void *pp, uint64_t x)
{
uint8_t * p = (uint8_t *)pp;
p[0] = x & 0xff;
p[1] = (x >> 8) & 0xff;
p[2] = (x >> 16) & 0xff;
p[3] = (x >> 24) & 0xff;
p[4] = (x >> 32) & 0xff;
p[5] = (x >> 40) & 0xff;
p[6] = (x >> 48) & 0xff;
p[7] = (x >> 56) & 0xff;
}
#endif /* !HAVE_SYS_ENDIAN_H */
#endif /* !_SYSENDIAN_H_ */

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
</lint>

View File

@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# 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 *;
#}

View File

@ -0,0 +1,16 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-17
android.library.reference.1=../SlidingMenu/library
android.library.reference.2=../Ext

View File

@ -0,0 +1,9 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"
android:fillBefore="true" android:fillAfter="true"
>
<translate
android:fromXDelta="-100%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="300" />
</set>

View File

@ -0,0 +1,10 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"
android:fillBefore="true" android:fillAfter="true"
>
<translate
android:fromXDelta="0%" android:toXDelta="100%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="300" />
</set>

View File

@ -0,0 +1,11 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"
android:fillBefore="true" android:fillAfter="true"
>
<translate
android:fromXDelta="100%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="300" />
</set>

View File

@ -0,0 +1,12 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false"
android:fillBefore="true" android:fillAfter="true"
>
<translate android:fromXDelta="0%" android:toXDelta="-100%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="300"/>
</set>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,28 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mails"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#000000" >
<Button
android:id="@+id/conversationBackButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Back" />
</LinearLayout>
<ListView
android:id="@+id/mailList"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ConversationActivity" >
</ListView>
</LinearLayout>

View File

@ -0,0 +1,87 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".LoginActivity" >
<!-- Login progress -->
<AbsoluteLayout
android:id="@+id/login_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF" >
</AbsoluteLayout>
<LinearLayout
android:id="@+id/login_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="gone" >
<ProgressBar
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" />
<TextView
android:id="@+id/login_status_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:fontFamily="sans-serif-light"
android:text="@string/login_progress_signing_in"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<!-- Login form -->
<ScrollView
android:id="@+id/login_form"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
style="@style/LoginFormContainer"
android:orientation="vertical" >
<EditText
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/prompt_email"
android:inputType="textEmailAddress"
android:maxLines="1"
android:singleLine="true"
android:textColor="#000000"
android:textColorHint="#000000" />
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/prompt_password"
android:imeActionId="@+id/login"
android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionUnspecified"
android:inputType="textPassword"
android:maxLines="1"
android:singleLine="true"
android:textColor="#000000"
android:textColorHint="#000000" />
<Button
android:id="@+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="16dp"
android:paddingLeft="32dp"
android:paddingRight="32dp"
android:text="@string/action_sign_in_register" />
</LinearLayout>
</ScrollView>
</merge>

View File

@ -0,0 +1,16 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</RelativeLayout>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="false"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical" >
<CheckBox
android:id="@+id/conversationCheck"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:focusable="false" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/RelativeLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/conversationDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#4444FF" />
<TextView
android:id="@+id/conversationName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/conversationDate"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/conversationDate"
android:ellipsize="end"
android:maxLines="1"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
</RelativeLayout>
<TextView
android:id="@+id/conversationSubject"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#333333" />
<TextView
android:id="@+id/conversationBrief"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#888888" />
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,27 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:background="#000000" >
<Button
android:id="@+id/folderRevealButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reveal" />
</LinearLayout>
<ListView
android:id="@+id/conversationList"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/folderName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/folderQuantity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/folderName"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/mailSubject"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/mailAuthor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/mailDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/mailAuthor"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
<TextView
android:id="@+id/mailRecipients"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView android:text="TextView"
android:id="@+id/mailBody"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#000000" >
<Button
android:id="@+id/revealLogout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Exit" />
<TextView
android:id="@+id/revealUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="User name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF" />
</LinearLayout>
<ListView
android:id="@+id/folderList"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>

View File

@ -0,0 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/menu_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/menu_settings"/>
</menu>

View File

@ -0,0 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/menu_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/menu_settings"/>
</menu>

View File

@ -0,0 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/menu_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/menu_settings"/>
</menu>

View File

@ -0,0 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>

View File

@ -0,0 +1,8 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/action_forgot_password"
android:showAsAction="never"
android:title="@string/action_forgot_password"/>
</menu>

View File

@ -0,0 +1,10 @@
<resources>
<style name="LoginFormContainer">
<item name="android:layout_width">400dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_gravity">center</item>
<item name="android:padding">16dp</item>
</style>
</resources>

View File

@ -0,0 +1,8 @@
<resources>
<!--
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw600dp devices (e.g. 7" tablets) here.
-->
</resources>

View File

@ -0,0 +1,9 @@
<resources>
<!--
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
-->
<dimen name="activity_horizontal_margin">128dp</dimen>
</resources>

View File

@ -0,0 +1,11 @@
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light.NoTitleBar">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>

View File

@ -0,0 +1,12 @@
<resources>
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light.NoTitleBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>

View File

@ -0,0 +1,7 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Mailiverse</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_folder">FolderActivity</string>
<string name="title_activity_main">MainActivity</string>
<string name="title_activity_conversation">ConversationActivity</string>
<string name="action_settings">Settings</string>
</resources>

View File

@ -0,0 +1,17 @@
<resources>
<string name="title_activity_login">Sign in</string>
<!-- Strings related to login -->
<string name="prompt_email">Email</string>
<string name="prompt_password">Password</string>
<string name="action_sign_in_register"><b>Sign in</b> or register</string>
<string name="action_sign_in_short">Sign in</string>
<string name="action_forgot_password">Recover lost password</string>
<string name="login_progress_signing_in">Signing in&#8230;</string>
<string name="error_invalid_email">This email address is invalid</string>
<string name="error_invalid_password">This password is too short</string>
<string name="error_incorrect_password">This password is incorrect</string>
<string name="error_field_required">This field is required</string>
</resources>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light.NoTitleBar">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
<style name="LoginFormContainer">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:padding">16dp</item>
</style>
</resources>

View File

@ -0,0 +1,41 @@
package com.benith.mailiverse;
import java.util.Timer;
import java.util.TimerTask;
import android.os.Handler;
import android.os.Message;
import mail.client.Client;
import mail.client.model.Conversation;
import core.util.Environment;
public class Application
{
protected static Application instance = null;
public static Application getInstance ()
{
if (instance == null)
instance = new Application();
return instance;
}
protected Application()
{
System.loadLibrary("Mailiverse");
}
public static class RunState
{
public String name;
public Environment environment;
public Client client;
public Conversation conversation;
};
RunState state = new RunState();
}

View File

@ -0,0 +1,68 @@
package com.benith.mailiverse;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ListView;
import android.support.v4.app.NavUtils;
public class ConversationActivity extends Activity {
MailListAdapter mailListAdapter;
ListView list;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_conversation);
overridePendingTransition(R.anim.forward_enter, R.anim.forward_leave);
mailListAdapter = new MailListAdapter(this);
mailListAdapter.setConversation(Application.getInstance().state.conversation);
list = (ListView) findViewById(R.id.mailList);
list.setAdapter(mailListAdapter);
Button backButton = (Button) findViewById(R.id.conversationBackButton);
backButton.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
// i need to load the animation, add a listener that sets the view to gone.. or something
ConversationActivity.this.finish();
overridePendingTransition(R.anim.back_leave,R.anim.back_enter);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_conversation, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of this
// activity, the Up button is shown. Use NavUtils to allow users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
// http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
}

View File

@ -0,0 +1,133 @@
package com.benith.mailiverse;
import java.util.ArrayList;
import java.util.List;
import core.callback.CallbackDefault;
import core.util.Arrays;
import core.util.Strings;
import mail.client.Events;
import mail.client.model.Conversation;
import mail.client.model.Folder;
import mail.client.model.FolderSet;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.TextView;
public class ConversationListAdapter extends BaseAdapter
{
Object NOTLOADED = new Object();
Context context;
FolderSet folder;
List<Conversation> buffer;
String filter;
public ConversationListAdapter (Context context)
{
this.context = context;
Application.getInstance().state.client.getMaster().getEventPropagator().add(
Events.LoadConversation, this,
new CallbackDefault () {
public void onSuccess(Object... arguments) throws Exception {
updateData();
}
}
);
Application.getInstance().state.client.getMaster().getEventPropagator().add(
Events.LoadFolderPart, this,
new CallbackDefault () {
public void onSuccess(Object... arguments) throws Exception {
updateData();
}
}
);
}
public void updateData ()
{
notifyDataSetChanged();
}
public void setFolder(FolderSet folder)
{
buffer = new ArrayList<Conversation>();
this.folder = folder;
notifyDataSetChanged();
}
@Override
public int getCount()
{
if (folder != null)
return folder.getNumConversations();
return 0;
}
@Override
public Object getItem(int pos)
{
if (pos >= buffer.size())
buffer.addAll(folder.getConversations(buffer.size(), Math.min(pos+20, getCount()), filter));
if (pos >= buffer.size())
return NOTLOADED;
return buffer.get(pos);
}
@Override
public long getItemId(int pos)
{
return pos;
}
@Override
public boolean hasStableIds ()
{
return false;
}
@Override
public View getView(int pos, View view, ViewGroup parent)
{
Object item = getItem(pos);
if (view == null)
{
LayoutInflater inflater = LayoutInflater.from(context);
view = inflater.inflate(R.layout.conversation_item, null);
}
TextView name = (TextView) view.findViewById(R.id.conversationName);
TextView date = (TextView) view.findViewById(R.id.conversationDate);
TextView subject = (TextView) view.findViewById(R.id.conversationSubject);
TextView brief = (TextView) view.findViewById(R.id.conversationBrief);
if (item != NOTLOADED && ((Conversation)item).isLoaded())
{
Conversation conversation = (Conversation)item;
name.setText(conversation.getHeader().getAuthorsShortList());
date.setText(conversation.getHeader().getRelativeDate());
subject.setText(conversation.getHeader().getSubjectExcludingReplyPrefix());
brief.setText(conversation.getHeader().getBrief());
}
else
{
name.setText("Loading...");
date.setText("");
subject.setText("");
brief.setText("");
}
return view;
}
}

View File

@ -0,0 +1,40 @@
package com.benith.mailiverse;
import java.util.Timer;
import java.util.TimerTask;
import android.os.Handler;
import android.os.Message;
import mail.client.EventDispatcher;
public class EventDispatcherAndroid extends EventDispatcher {
Timer timer;
public EventDispatcherAndroid ()
{
setupTimer();
}
public void setupTimer ()
{
final Handler h = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
dispatchEvents();
return false;
}
});
class Messager extends TimerTask {
public void run() {
h.sendEmptyMessage(0);
}
};
timer = new Timer();
timer.schedule(new Messager(), 0, 500);
}
}

View File

@ -0,0 +1,91 @@
package com.benith.mailiverse;
import java.util.ArrayList;
import java.util.List;
import core.callback.CallbackDefault;
import mail.client.Events;
import mail.client.model.Folder;
import mail.client.model.FolderSet;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.TextView;
public class FolderListAdapter extends BaseAdapter
{
Application application;
Context context;
List<Folder> folders = new ArrayList<Folder>();
public FolderListAdapter (Context context)
{
application = Application.getInstance();
this.context = context;
application.state.client.getMaster().getEventPropagator().add(
Events.LoadFolder, this,
new CallbackDefault () {
public void onSuccess(Object... arguments) throws Exception {
updateData();
}
}
);
}
public void updateData ()
{
folders = application.state.client.getMaster().getIndexer().getSystemFolders();
FolderListAdapter.this.notifyDataSetChanged();
}
@Override
public int getCount()
{
return folders.size();
}
@Override
public Object getItem(int pos)
{
return folders.get(pos);
}
@Override
public long getItemId(int pos)
{
return pos;
}
@Override
public boolean hasStableIds ()
{
return false;
}
@Override
public View getView(int pos, View view, ViewGroup parent)
{
if (view == null)
{
LayoutInflater inflater = LayoutInflater.from(context);
view = inflater.inflate(R.layout.folder_item, null);
}
TextView name = (TextView) view.findViewById(R.id.folderName);
TextView quantity = (TextView) view.findViewById(R.id.folderQuantity);
FolderSet folder = (FolderSet)folders.get(pos);
name.setText(folder.getName());
quantity.setText("" + folder.getNumConversations());
return view;
}
}

View File

@ -0,0 +1,82 @@
package com.benith.mailiverse;
import core.callback.CallbackDefault;
import mail.client.Events;
import mail.client.model.Conversation;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ListView;
public class FolderView extends ViewContainer
{
ListView list;
MainActivity context;
ConversationListAdapter conversationListAdapter;
public FolderView(MainActivity context)
{
this.context = context;
LayoutInflater inflater = LayoutInflater.from(context);
view = inflater.inflate(R.layout.folder, null);
conversationListAdapter = new ConversationListAdapter(view.getContext());
list = (ListView) view.findViewById(R.id.conversationList);
list.setOnItemClickListener(listener);
list.setAdapter(conversationListAdapter);
Button backButton = (Button) view.findViewById(R.id.folderRevealButton);
backButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
FolderView.this.context.getSlidingMenu().showMenu(true);
}
});
setupEvents();
}
public void setupEvents ()
{
Application.getInstance().state.client.getMaster().getEventPropagator().add(
Events.Initialized, this, new CallbackDefault() {
public void onSuccess(Object... arguments) throws Exception {
chooseInitialFolder();
}
}
);
}
public void chooseInitialFolder ()
{
conversationListAdapter.setFolder(
Application.getInstance().state.client.getMaster().getIndexer().getInbox()
);
}
public View getView ()
{
return view;
}
OnItemClickListener listener = new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View v, int position, long id)
{
Application.getInstance().state.conversation =
(Conversation)conversationListAdapter.getItem(position);
Intent intent = new Intent(context, ConversationActivity.class);
context.startActivity(intent);
}
};
}

View File

@ -0,0 +1,45 @@
package com.benith.mailiverse;
import android.os.AsyncTask;
import core.callback.Callback;
import core.util.HttpDelegate;
import core.util.HttpDelegateJava;
public class HttpDelegateAndroid extends HttpDelegate
{
HttpDelegate delegate = new HttpDelegateJava();
protected class Request
{
String action;
String url;
String[][] headers;
boolean binaryInput, binaryOutput;
byte[] contents;
Callback callback;
}
@Override
public void execute(String action, String url, String[][] headers,
boolean binaryInput, boolean binaryOutput, byte[] contents,
Callback callback) {
Request request = new Request();
request.action = action;
request.url = url;
request.headers = headers;
request.binaryInput = binaryInput;
request.binaryOutput = binaryOutput;
request.contents = contents;
request.callback = callback;
new AsyncTask<Request, Void, Void>() {
protected Void doInBackground(Request... params) {
Request r = params[0];
delegate.execute(r.action, r.url, r.headers, r.binaryInput, r.binaryOutput, r.contents, r.callback);
return null;
}
}.execute(request);
}
}

View File

@ -0,0 +1,54 @@
package com.benith.mailiverse;
import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.BaseAdapter;
import android.widget.TextView;
public class InfiniteList extends ListActivity implements OnScrollListener
{
Aleph0 adapter = new Aleph0();
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setListAdapter(adapter);
getListView().setOnScrollListener(this);
}
public void onScroll(AbsListView view, int firstVisible, int visibleCount, int totalCount) {
/*
boolean loadMore =
firstVisible + visibleCount >= totalCount;
if(loadMore) {
adapter.count += visibleCount; // or any other amount
adapter.notifyDataSetChanged();
}
*/
}
public void onScrollStateChanged(AbsListView v, int s)
{
}
class Aleph0 extends BaseAdapter {
int count = 40; /* starting amount */
public int getCount() { return count; }
public Object getItem(int pos) { return pos; }
public long getItemId(int pos) { return pos; }
public View getView(int pos, View v, ViewGroup p) {
TextView view = new TextView(InfiniteList.this);
view.setText("entry " + pos);
return view;
}
}
}

View File

@ -0,0 +1,276 @@
package com.benith.mailiverse;
import core.constants.ConstantsClient;
import core.util.Environment;
import key.auth.KeyServerAuthenticatorSync;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.view.inputmethod.EditorInfo;
import android.widget.AbsoluteLayout;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
/**
* Activity which displays a login screen to the user, offering registration as
* well.
*/
public class LoginActivity extends Activity
{
/**
* The default email to populate the email field with.
*/
public static final String EXTRA_NAME = "com.benith.mailiverse.NAME";
/**
* Keep track of the login task to ensure we can cancel it if requested.
*/
private UserLoginTask mAuthTask = null;
protected Application application;
// Values for email and password at the time of the login attempt.
private String mName;
private String mPassword;
// UI references.
private EditText mNameView;
private EditText mPasswordView;
private View mLoginFormView;
private View mLoginStatusView;
private TextView mLoginStatusMessageView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
application = Application.getInstance();
setContentView(R.layout.activity_login);
// Set up the login form.
mName = getIntent().getStringExtra(EXTRA_NAME);
mNameView = (EditText) findViewById(R.id.email);
mNameView.setText(mName);
mPasswordView = (EditText) findViewById(R.id.password);
mPasswordView
.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int id,
KeyEvent keyEvent) {
if (id == R.id.login || id == EditorInfo.IME_NULL) {
attemptLogin();
return true;
}
return false;
}
});
mLoginFormView = findViewById(R.id.login_form);
mLoginStatusView = findViewById(R.id.login_status);
mLoginStatusMessageView = (TextView) findViewById(R.id.login_status_message);
findViewById(R.id.sign_in_button).setOnClickListener(
new View.OnClickListener() {
@Override
public void onClick(View view) {
attemptLogin();
}
});
// makeBackgroundRotateForever();
}
public void makeBackgroundRotateForever ()
{
AbsoluteLayout backgroundContainer = (AbsoluteLayout) findViewById(R.id.login_background);
ImageView background = new ImageView(this);
background.setImageResource(R.drawable.spiral_galaxy_bg);
WindowManager manager = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
int width = manager.getDefaultDisplay().getWidth();
AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams(
width*2, width*2, 0, 0
// backgroundContainer.getWidth() * 2, backgroundContainer.getHeight() * 2
);
backgroundContainer.addView(background, params);
Animation rotateAnim = new RotateAnimation(
0, 360,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f
);
rotateAnim.setDuration(80000);
rotateAnim.setRepeatCount(Animation.INFINITE);
rotateAnim.setInterpolator(new LinearInterpolator());
background.startAnimation(rotateAnim);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.login, menu);
return true;
}
/**
* Attempts to sign in or register the account specified by the login form.
* If there are form errors (invalid email, missing fields, etc.), the
* errors are presented and no actual login attempt is made.
*/
public void attemptLogin() {
if (mAuthTask != null) {
return;
}
// Reset errors.
mNameView.setError(null);
mPasswordView.setError(null);
// Store values at the time of the login attempt.
mName = mNameView.getText().toString();
mPassword = mPasswordView.getText().toString();
boolean cancel = false;
View focusView = null;
// Check for a valid password.
if (TextUtils.isEmpty(mPassword)) {
mPasswordView.setError(getString(R.string.error_field_required));
focusView = mPasswordView;
cancel = true;
}
// Check for a valid email address.
if (TextUtils.isEmpty(mName)) {
mNameView.setError(getString(R.string.error_field_required));
focusView = mNameView;
cancel = true;
}
if (cancel) {
// There was an error; don't attempt login and focus the first
// form field with an error.
focusView.requestFocus();
} else {
// Show a progress spinner, and kick off a background task to
// perform the user login attempt.
mLoginStatusMessageView.setText(R.string.login_progress_signing_in);
showProgress(true);
mAuthTask = new UserLoginTask();
mAuthTask.execute(mName, mPassword);
}
}
/**
* Shows the progress UI and hides the login form.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
private void showProgress(final boolean show) {
// On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
// for very easy animations. If available, use these APIs to fade-in
// the progress spinner.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
int shortAnimTime = getResources().getInteger(
android.R.integer.config_shortAnimTime);
mLoginStatusView.setVisibility(View.VISIBLE);
mLoginStatusView.animate().setDuration(shortAnimTime)
.alpha(show ? 1 : 0)
.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
mLoginStatusView.setVisibility(show ? View.VISIBLE
: View.GONE);
}
});
mLoginFormView.setVisibility(View.VISIBLE);
mLoginFormView.animate().setDuration(shortAnimTime)
.alpha(show ? 0 : 1)
.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
mLoginFormView.setVisibility(show ? View.GONE
: View.VISIBLE);
}
});
} else {
// The ViewPropertyAnimator APIs are not available, so simply show
// and hide the relevant UI components.
mLoginStatusView.setVisibility(show ? View.VISIBLE : View.GONE);
mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
}
}
/**
* Represents an asynchronous login/registration task used to authenticate
* the user.
*/
public class UserLoginTask extends AsyncTask<String, Void, Environment> {
@Override
protected Environment doInBackground(String... params)
{
try
{
String name = params[0];
String password = params[1];
KeyServerAuthenticatorSync auth = new KeyServerAuthenticatorSync();
return auth.get(name + ConstantsClient.ATHOST, password, null);
}
catch (Exception e)
{
return null;
}
}
@Override
protected void onPostExecute(final Environment success) {
mAuthTask = null;
showProgress(false);
if (success != null) {
application.state.name = mName;
application.state.environment = success;
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
startActivity(intent);
finish();
} else {
mPasswordView
.setError(getString(R.string.error_incorrect_password));
mPasswordView.requestFocus();
}
}
@Override
protected void onCancelled() {
mAuthTask = null;
showProgress(false);
}
}
}

View File

@ -0,0 +1,162 @@
package com.benith.mailiverse;
import core.callback.CallbackDefault;
import mail.client.Events;
import mail.client.model.Conversation;
import mail.client.model.Mail;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.BaseAdapter;
import android.widget.TextView;
public class MailListAdapter extends BaseAdapter
{
static final int TYPE_HEADER = 0, TYPE_MAIL = 1;
Object HEADER = new Object();
Conversation conversation;
Context context;
public MailListAdapter (Context context)
{
this.context = context;
Application.getInstance().state.client.getMaster().getEventPropagator().add(
Events.LoadMail, this,
new CallbackDefault () {
public void onSuccess(Object... arguments) throws Exception {
updateData();
}
}
);
}
public void updateData()
{
notifyDataSetChanged();
}
public void setConversation(Conversation conversation)
{
this.conversation = conversation;
notifyDataSetChanged();
}
@Override
public int getCount()
{
if (conversation != null)
return conversation.getNumItems()+1;
return 0;
}
@Override
public int getItemViewType(int position) {
if (position == 0)
return TYPE_HEADER;
return TYPE_MAIL;
}
@Override
public Object getItem(int pos)
{
if (pos == 0)
return HEADER;
return conversation.getItems().get(pos-1);
}
@Override
public long getItemId(int pos)
{
return pos;
}
@Override
public boolean hasStableIds ()
{
return false;
}
@Override
public View getView(int pos, View view, ViewGroup parent)
{
if (view == null)
{
LayoutInflater inflater = LayoutInflater.from(context);
switch (getItemViewType(pos))
{
case TYPE_HEADER:
view = inflater.inflate(R.layout.mail_header_item, null);
break;
case TYPE_MAIL:
view = inflater.inflate(R.layout.mail_item, null);
break;
}
}
switch (getItemViewType(pos))
{
case TYPE_HEADER:
TextView subject = (TextView)view.findViewById(R.id.mailSubject);
subject.setText(conversation.getHeader().getSubject());
break;
case TYPE_MAIL:
Mail mail = (Mail)getItem(pos);
TextView author = (TextView)view.findViewById(R.id.mailAuthor);
TextView date = (TextView)view.findViewById(R.id.mailDate);
TextView recipients = (TextView)view.findViewById(R.id.mailRecipients);
TextView body = (TextView)view.findViewById(R.id.mailBody);
if (mail.isLoaded())
{
author.setText("" + mail.getHeader().getAuthor());
date.setText(mail.getHeader().getRelativeDate());
recipients.setText(mail.getHeader().getRecipients().shortList());
String html, mimeType;
if (mail.getBody().hasHTML())
{
mimeType = "text/html";
html = mail.getBody().getStrippedHTML();
}
else
if (mail.getBody().hasText())
{
mimeType = "text/plain";
html = mail.getBody().getStrippedText();
}
else
{
mimeType = "text/plain";
html = "";
}
String encoding = "utf-8";
body.setText(html);
// body.loadData(html, mimeType, encoding);
}
else
{
author.setText("Loading...");
date.setText("");
recipients.setText("");
body.setText("");
// body.clearView();
}
break;
}
return view;
}
}

View File

@ -0,0 +1,57 @@
package com.benith.mailiverse;
import com.slidingmenu.lib.SlidingMenu;
import com.slidingmenu.lib.app.SlidingActivity;
import core.util.HttpDelegateJava;
import core.util.LogOut;
import android.os.Bundle;
import android.view.Menu;
import mail.client.Client;
import mail.client.EventDispatcher;
public class MainActivity extends SlidingActivity {
static LogOut log = new LogOut(MainActivity.class);
RevealFoldersView revealFoldersView;
FolderView folderView;
public Client client;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Application application = Application.getInstance();
try
{
application.state.client = Client.start(
application.state.environment,
application.state.name,
new HttpDelegateAndroid(),
new EventDispatcherAndroid()
);
}
catch (Exception e)
{
log.exception(e);
}
folderView = new FolderView(this);
revealFoldersView = new RevealFoldersView(this);
setContentView(folderView.getView());
setBehindContentView(revealFoldersView.getView());
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}

Some files were not shown because too many files have changed in this diff Show More