Skip to content

Commit 08ed90c

Browse files
committed
Split out Util functions.
1 parent 0d102f7 commit 08ed90c

86 files changed

Lines changed: 2776 additions & 433 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

androidTest/java/org/thoughtcrime/securesms/util/PhoneNumberFormatterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import junit.framework.AssertionFailedError;
66

7-
import org.whispersystems.textsecure.util.InvalidNumberException;
8-
import org.whispersystems.textsecure.util.PhoneNumberFormatter;
7+
import org.whispersystems.textsecure.api.util.InvalidNumberException;
8+
import org.whispersystems.textsecure.api.util.PhoneNumberFormatter;
99
import static org.fest.assertions.api.Assertions.assertThat;
1010

1111
public class PhoneNumberFormatterTest extends AndroidTestCase {

libtextsecure/src/main/java/org/whispersystems/textsecure/api/TextSecureAccountManager.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* Copyright (C) 2014 Open Whisper Systems
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
117
package org.whispersystems.textsecure.api;
218

319
import org.whispersystems.libaxolotl.IdentityKey;

libtextsecure/src/main/java/org/whispersystems/textsecure/api/TextSecureMessageReceiver.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* Copyright (C) 2014 Open Whisper Systems
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
117
package org.whispersystems.textsecure.api;
218

319
import org.whispersystems.libaxolotl.InvalidMessageException;

libtextsecure/src/main/java/org/whispersystems/textsecure/api/TextSecureMessageSender.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* Copyright (C) 2014 Open Whisper Systems
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
117
package org.whispersystems.textsecure.api;
218

319
import android.util.Log;
@@ -28,7 +44,7 @@
2844
import org.whispersystems.textsecure.push.exceptions.EncapsulatedExceptions;
2945
import org.whispersystems.textsecure.push.exceptions.MismatchedDevicesException;
3046
import org.whispersystems.textsecure.push.exceptions.StaleDevicesException;
31-
import org.whispersystems.textsecure.util.Util;
47+
import org.whispersystems.textsecure.internal.util.Util;
3248

3349
import java.io.IOException;
3450
import java.util.LinkedList;

libtextsecure/src/main/java/org/whispersystems/textsecure/api/crypto/AttachmentCipherInputStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (C) 2013 Open Whisper Systems
2+
* Copyright (C) 2013-2014 Open Whisper Systems
33
*
44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
2020

2121
import org.whispersystems.libaxolotl.InvalidMacException;
2222
import org.whispersystems.libaxolotl.InvalidMessageException;
23-
import org.whispersystems.textsecure.util.Util;
23+
import org.whispersystems.textsecure.internal.util.Util;
2424

2525
import java.io.File;
2626
import java.io.FileInputStream;

libtextsecure/src/main/java/org/whispersystems/textsecure/api/crypto/AttachmentCipherOutputStream.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
/**
2+
* Copyright (C) 2014 Open Whisper Systems
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
117
package org.whispersystems.textsecure.api.crypto;
218

3-
import org.whispersystems.textsecure.util.Util;
19+
import org.whispersystems.textsecure.internal.util.Util;
420

521
import java.io.IOException;
622
import java.io.OutputStream;

libtextsecure/src/main/java/org/whispersystems/textsecure/api/crypto/TextSecureCipher.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1+
/**
2+
* Copyright (C) 2014 Open Whisper Systems
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
117
package org.whispersystems.textsecure.api.crypto;
218

3-
import android.util.Log;
4-
519
import com.google.protobuf.InvalidProtocolBufferException;
620

721
import org.whispersystems.libaxolotl.DuplicateMessageException;

libtextsecure/src/main/java/org/whispersystems/textsecure/api/crypto/UntrustedIdentityException.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* Copyright (C) 2014 Open Whisper Systems
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
117
package org.whispersystems.textsecure.api.crypto;
218

319
import org.whispersystems.libaxolotl.IdentityKey;

libtextsecure/src/main/java/org/whispersystems/textsecure/api/messages/TextSecureAttachment.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package org.whispersystems.textsecure.api.messages;
22

3-
import java.io.InputStream;
4-
53
public abstract class TextSecureAttachment {
64

75
private final String contentType;

libtextsecure/src/main/java/org/whispersystems/textsecure/api/messages/TextSecureEnvelope.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* Copyright (C) 2014 Open Whisper Systems
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*/
117
package org.whispersystems.textsecure.api.messages;
218

319
import android.util.Log;
@@ -6,8 +22,8 @@
622

723
import org.whispersystems.libaxolotl.InvalidVersionException;
824
import org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal;
9-
import org.whispersystems.textsecure.util.Base64;
10-
import org.whispersystems.textsecure.util.Hex;
25+
import org.whispersystems.textsecure.internal.util.Base64;
26+
import org.whispersystems.textsecure.internal.util.Hex;
1127

1228
import java.io.IOException;
1329
import java.security.InvalidAlgorithmParameterException;

0 commit comments

Comments
 (0)