Commit 492ad980 authored by Grigory Fedorov's avatar Grigory Fedorov

Merge branch 'release/1.0.23'

parents 65a21109 ce018ce1
...@@ -72,14 +72,6 @@ app/src/main/res/layout/preference.xml ...@@ -72,14 +72,6 @@ app/src/main/res/layout/preference.xml
Also source code of following components is included in repository (see the source code or official sites for license details): Also source code of following components is included in repository (see the source code or official sites for license details):
ZXing
app/src/main/java/com/google/zxing/*
Apache License, Version 2.0 (the "License").
JZLib
app/src/main/java/com/jcraft/jzlib/*
BSD license.
Novel sasl client Novel sasl client
app/src/main/java/com/novell/sasl/* app/src/main/java/com/novell/sasl/*
The OpenLDAP Public License. The OpenLDAP Public License.
......
...@@ -7,8 +7,8 @@ android { ...@@ -7,8 +7,8 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 22 targetSdkVersion 22
versionCode 194 versionCode 195
versionName '1.0.22' versionName '1.0.23'
} }
compileOptions { compileOptions {
...@@ -49,5 +49,7 @@ dependencies { ...@@ -49,5 +49,7 @@ dependencies {
compile 'com.melnykov:floatingactionbutton:1.2.0' compile 'com.melnykov:floatingactionbutton:1.2.0'
compile 'dnsjava:dnsjava:2.1.7' compile 'dnsjava:dnsjava:2.1.7'
compile 'com.github.bumptech.glide:glide:3.6.0' compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'com.google.zxing:android-integration:3.1.0'
compile 'com.jcraft:jzlib:1.1.3'
compile project('otr4j') compile project('otr4j')
} }
/*
* Copyright 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.zxing.integration.android;
/**
* <p>Encapsulates the result of a barcode scan invoked through {@link IntentIntegrator}.</p>
*
* @author Sean Owen
*/
public final class IntentResult {
private final String contents;
private final String formatName;
private final byte[] rawBytes;
private final Integer orientation;
private final String errorCorrectionLevel;
IntentResult() {
this(null, null, null, null, null);
}
IntentResult(String contents,
String formatName,
byte[] rawBytes,
Integer orientation,
String errorCorrectionLevel) {
this.contents = contents;
this.formatName = formatName;
this.rawBytes = rawBytes;
this.orientation = orientation;
this.errorCorrectionLevel = errorCorrectionLevel;
}
/**
* @return raw content of barcode
*/
public String getContents() {
return contents;
}
/**
* @return name of format, like "QR_CODE", "UPC_A". See {@code BarcodeFormat} for more format names.
*/
public String getFormatName() {
return formatName;
}
/**
* @return raw bytes of the barcode content, if applicable, or null otherwise
*/
public byte[] getRawBytes() {
return rawBytes;
}
/**
* @return rotation of the image, in degrees, which resulted in a successful scan. May be null.
*/
public Integer getOrientation() {
return orientation;
}
/**
* @return name of the error correction level used in the barcode, if applicable
*/
public String getErrorCorrectionLevel() {
return errorCorrectionLevel;
}
@Override
public String toString() {
StringBuilder dialogText = new StringBuilder(100);
dialogText.append("Format: ").append(formatName).append('\n');
dialogText.append("Contents: ").append(contents).append('\n');
int rawBytesLength = rawBytes == null ? 0 : rawBytes.length;
dialogText.append("Raw bytes: (").append(rawBytesLength).append(" bytes)\n");
dialogText.append("Orientation: ").append(orientation).append('\n');
dialogText.append("EC level: ").append(errorCorrectionLevel).append('\n');
return dialogText.toString();
}
}
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. 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.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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 program is based on zlib-1.1.3, so all credit should go authors
* Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)
* and contributors of zlib.
*/
package com.jcraft.jzlib;
final class Adler32 {
// largest prime smaller than 65536
static final private int BASE = 65521;
// NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1
static final private int NMAX = 5552;
long adler32(long adler, byte[] buf, int index, int len) {
if (buf == null) {
return 1L;
}
long s1 = adler & 0xffff;
long s2 = (adler >> 16) & 0xffff;
int k;
while (len > 0) {
k = len < NMAX ? len : NMAX;
len -= k;
while (k >= 16) {
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
s1 += buf[index++] & 0xff;
s2 += s1;
k -= 16;
}
if (k != 0) {
do {
s1 += buf[index++] & 0xff;
s2 += s1;
}
while (--k != 0);
}
s1 %= BASE;
s2 %= BASE;
}
return (s2 << 16) | s1;
}
/*
private java.util.zip.Adler32 adler=new java.util.zip.Adler32();
long adler32(long value, byte[] buf, int index, int len){
if(value==1) {adler.reset();}
if(buf==null) {adler.reset();}
else{adler.update(buf, index, len);}
return adler.getValue();
}
*/
}
ChangeLog of JZlib
====================================================================
Last modified: Thu Aug 18 16:16:06 UTC 2005
Changes since version 1.0.6:
- change: memory and performance optimizations in the inflate operation.
Many thanks to Paul Wakefield at platx.org(http://www.platx.org), who
suggested above improvements.
- change: added the nowrap argument to Z{Input,Output}?Stream.
Changes since version 1.0.5:
- ZInputStream.read(byte[], int, int) method return sometimes zero
instead of -1 at the end of stream.
- ZOutputStream.end() method should not declare IOException.
- It should be possible to call ZOutputStream.end() method more times
(because you can call close() method and after it end() method in
finally block).
- ZOutputStream.finish() method should not ignore IOException from flush().
Many thanks to Matej Kraus at seznam.cz , who pointed out above problems.
Changes since version 1.0.4:
- a minor bug fix in ZInputStream
Changes since version 1.0.3:
- fixed a bug in closing ZOutputStream.
The inflating and deflating processes were not finished successfully.
- added 'finish' and 'end' methods to ZOutputStream.java
- added 'example/test_stream_deflate_inflate.java'
Changes since version 1.0.2:
- enabled pure Java implementation of adler32 and
commented out the dependency on J2SE in Adler32.java for J2ME users.
Changes since version 1.0.1:
- fixed a bug in deflating some trivial data, for example,
large data chunk filled with zero.
- added 'version' method to JZlib class.
Changes since version 1.0.0:
- added ZInputStream and ZOutputStream classes.
- fixed a typo in LICENSE.txt.
Changes since version 0.0.9:
- fixed a bug in setting a dictionary in the inflation process.
- The license was changed to a BSD style license.
- Z{Input,Output}Stream classes were deleted.
Changes since version 0.0.8:
- fixed a bug in handling a preset dictionary in the inflation process.
Changes since version 0.0.7:
- added methods to control the window size (the size of the history
buffer) and to handle the no-wrap option (no zlib header or check),
which is the undocumented functionality of zlib.
Changes since version 0.0.6:
- updated InfBlocks.java as zlib did to fix the vulnerability related to
the 'double free'. Of course, JZlib is free from such a vulnerability
like the 'double free', but JZlib had crashed with NullPointerException
by a specially-crafted block of invalid deflated data.
Changes since version 0.0.5:
- added 'flush()' method to com.jcraft.jzlib.ZOutputStream.
- fixed to take care when occurring the buffer overflow in
com.jcraft.jzlib.ZOutputStream.
Many thanks to Tim Bendfelt at cs.wisc.edu , who pointed out above problems.
Changes since version 0.0.4:
............................
- fixed a bug in Adler32 class.
- fixed a bug in ZInputStream class
- modified ZInputStream to be extended from InputStream
instead of FileInputStream.
- modified ZOutputStream to be extended from OutputStream
instead of FileOutputStream.
- modified ZStream to be changeable wbits. Give wbits value to
the method 'deflateInit' of ZStream.
Many thanks to Bryan Keller<keller@neomar.com>, who reported bugs
and made suggestions.
Changes since version 0.0.3:
............................
- fixed a bug in the compression level 0.
- modified to be compatible with JIKES's bug.
- added Z[Input,Output]Stream written by Lapo Luchini<lapo@lapo.it>.
Changes since version 0.0.2:
............................
- fixed a critical bug, which had arisen in the deflating operation with
NO_FLUSH and DEFAULT_COMPRESSION mode.
Many thanks to Bryan Keller(keller@neomar.com), who reported this glitch.
Changes since version 0.0.1:
............................
- fixed the bad compression ratio problem, which is reported from
Martin Smith(martin@spamcop.net). The compression ratio was not so good
compared with the compression ration of zlib. Now, this problem has been
fixed and, I hope, that deflated files by JZlib and zlib are completely
same bit by bit.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* -*-mode:java; c-basic-offset:2; -*- */
/*
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. 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.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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 program is based on zlib-1.1.3, so all credit should go authors
* Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)
* and contributors of zlib.
*/
package com.jcraft.jzlib;
final public class JZlib {
private static final String version = "1.0.2";
public static String version() {
return version;
}
// compression levels
static final public int Z_NO_COMPRESSION = 0;
static final public int Z_BEST_SPEED = 1;
static final public int Z_BEST_COMPRESSION = 9;
static final public int Z_DEFAULT_COMPRESSION = (-1);
// compression strategy
static final public int Z_FILTERED = 1;
static final public int Z_HUFFMAN_ONLY = 2;
static final public int Z_DEFAULT_STRATEGY = 0;
static final public int Z_NO_FLUSH = 0;
static final public int Z_PARTIAL_FLUSH = 1;
static final public int Z_SYNC_FLUSH = 2;
static final public int Z_FULL_FLUSH = 3;
static final public int Z_FINISH = 4;
static final public int Z_OK = 0;
static final public int Z_STREAM_END = 1;
static final public int Z_NEED_DICT = 2;
static final public int Z_ERRNO = -1;
static final public int Z_STREAM_ERROR = -2;
static final public int Z_DATA_ERROR = -3;
static final public int Z_MEM_ERROR = -4;
static final public int Z_BUF_ERROR = -5;
static final public int Z_VERSION_ERROR = -6;
}
JZlib 0.0.* were released under the GNU LGPL license. Later, we have switched
over to a BSD-style license.
------------------------------------------------------------------------------
Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. 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.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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.
JZlib
zlib in pure Java(TM)
by ymnk@jcraft.com, JCraft,Inc.
http://www.jcraft.com/jzlib/
Last modified: Fri Feb 14 13:31:26 UTC 2003
Description
===========
JZlib is a re-implementation of zlib in pure Java.
The first and final aim for hacking this stuff is
to add the packet compression support to pure Java SSH systems.
Documentation
=============
* README files all over the source tree have info related to the stuff
in the directories.
* ChangeLog: what changed from the previous version?
* LICENSE.txt
Directories & Files in the Source Tree
======================================
* com/ has source trees of JZlib.
* example/ has some samples, which demonstrate the usages.
* misc/ has some stuffs. At present, this directory includes
a patch file for MindTerm v.1.2.1, which adds the packet compression
functionality.
Features
========
* Needless to say, JZlib can inflate data, which is deflated by zlib and
JZlib can generate deflated data, which is acceptable and inflated by zlib.
* JZlib supports all compression level and all flushing mode in zlib.
* JZlib does not support gzip file handling supports.
* The performance has not been estimated yet, but it will be not so bad
in deflating/inflating data stream on the low bandwidth network.
* JZlib is licensed under BSD style license.
* Any invention has not been done in developing JZlib.
So, if zlib is patent free, JZlib is also not covered by any patents.
Why JZlib?
==========
Java Platform API provides packages 'java.util.zip.*' for
accessing to zlib, but that support is very limited
if you need to use the essence of zlib. For example,
we needed to full access to zlib to add the packet compression
support to pure Java SSH system, but they are useless for our requirements.
The Internet draft, SSH Transport Layer Protocol, says in the section '4.2 Compression' as follows,
The following compression methods are currently defined:
none REQUIRED no compression
zlib OPTIONAL GNU ZLIB (LZ77) compression
The "zlib" compression is described in [RFC-1950] and in [RFC-1951]. The
compression context is initialized after each key exchange, and is
passed from one packet to the next with only a partial flush being
performed at the end of each packet. A partial flush means that all data
will be output, but the next packet will continue using compression
tables from the end of the previous packet.
To implement this functionality, the Z_PARTIAL_FLUSH mode of zlib must be
used, however JDK does not permit us to do so. It seems that this problem has
been well known and some people have already reported to
JavaSoft's BugParade(for example, BugId:4255743),
but any positive response has not been returned from JavaSoft,
so this problem will not be solved forever.
This is our motivation to hack JZlib.
A unofficial patch for MindTerm v.1.2.1
=======================================
A unofficial patch file for MindTerm v.1.2.1 has included in 'misc' directory.
It adds the packet compression support to MindTerm.
Please refer to 'misc/README' file.
Copyrights & Disclaimers
========================
JZlib is copyrighted by ymnk, JCraft,Inc. and is licensed through BSD
style license. Read the LICENSE.txt file for the complete license.
ZInputStream and ZOutputStream classes were contributed by Lapo Luchini.
Credits
=======
JZlib has been developed by ymnk@jcraft.com,
but he has just re-implemented zlib in pure Java.
So, all credit should go to authors Jean-loup Gailly and Mark Adler
and contributors of zlib. Here is the copyright notice of zlib version 1.1.3,
|Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
|
|This software is provided 'as-is', without any express or implied
|warranty. In no event will the authors be held liable for any damages
|arising from the use of this software.
|
|Permission is granted to anyone to use this software for any purpose,
|including commercial applications, and to alter it and redistribute it
|freely, subject to the following restrictions:
|
|1. The origin of this software must not be misrepresented; you must not
| claim that you wrote the original software. If you use this software
| in a product, an acknowledgment in the product documentation would be
| appreciated but is not required.
|2. Altered source versions must be plainly marked as such, and must not be
| misrepresented as being the original software.
|3. This notice may not be removed or altered from any source distribution.
|
|Jean-loup Gailly Mark Adler
|jloup@gzip.org madler@alumni.caltech.edu
If you have any comments, suggestions and questions, write us
at jzlib@jcraft.com
``SSH is a registered trademark and Secure Shell is a trademark of
SSH Communications Security Corp (www.ssh.com)''.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -91,8 +91,9 @@ public class Occupant implements Comparable<Occupant> { ...@@ -91,8 +91,9 @@ public class Occupant implements Comparable<Occupant> {
@Override @Override
public int compareTo(Occupant another) { public int compareTo(Occupant another) {
int result = another.role.ordinal() - role.ordinal(); int result = another.role.ordinal() - role.ordinal();
if (result != 0) if (result != 0) {
return result; return result;
}
return nickname.compareTo(another.nickname); return nickname.compareTo(another.nickname);
} }
......
...@@ -77,7 +77,7 @@ public class ContactAdd extends ManagedActivity implements ContactAddFragment.Li ...@@ -77,7 +77,7 @@ public class ContactAdd extends ManagedActivity implements ContactAddFragment.Li
} }
private void addContact() { private void addContact() {
((ContactAddFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_container)).addContact(); ((ContactAdder) getSupportFragmentManager().findFragmentById(R.id.fragment_container)).addContact();
} }
@Override @Override
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment