version upgrade, raised minimum android version to 5.0, removed support classes, dependency update

This commit is contained in:
nuclearfog 2022-08-19 22:21:29 +02:00
parent 5a48fdb7a2
commit 01057c7676
No known key found for this signature in database
GPG Key ID: AA0271FBE406DB98
22 changed files with 94 additions and 366 deletions

View File

@ -10,13 +10,11 @@ android {
defaultConfig {
applicationId 'org.nuclearfog.twidda'
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 32
versionCode 60
versionName '2.0.7'
// limiting language support for smaller APK size
versionCode 61
versionName '2.1'
resConfigs 'en', 'de-rDE', 'zh-rCN'
vectorDrawables.useSupportLibrary true
}
buildTypes {
@ -28,7 +26,6 @@ android {
proguardFile 'proguard-rules.pro'
}
debug {
multiDexEnabled true
proguardFile 'proguard-debug.pro'
applicationIdSuffix '.debug'
versionNameSuffix '.DEBUG'
@ -52,20 +49,18 @@ proguardDictionaries {
dictionaryNames = ['dict/class-dictionary', 'dict/package-dictionary', 'dict/obfuscation-dictionary']
minLineLength 4
maxLineLength 8
linesCountInDictionary 12000
linesCountInDictionary 12500
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
//noinspection GradleDependency
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
//noinspection GradleDependency
implementation 'com.squareup.picasso:picasso:2.8'
implementation 'com.github.open-android:Picasso-transformations:0.1.0'

View File

@ -14,7 +14,6 @@
tools:ignore="ScopedStorage" />
<application
android:name=".CompatApplication"
android:allowBackup="false"
android:fullBackupContent="false"
android:dataExtractionRules="@xml/rules"

View File

@ -1,31 +0,0 @@
package org.nuclearfog.twidda;
import android.os.Build;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.multidex.MultiDexApplication;
import org.nuclearfog.twidda.backend.utils.TLSSocketFactory;
/**
* custom application class to to add support for Android devices below API 21
*
* @author nuclearfog
*/
public class CompatApplication extends MultiDexApplication {
@Override
public void onCreate() {
super.onCreate();
// enable support for vector drawables
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
// check if TLS 1.2 is supported
// enable experimental TLS 1.2 support
TLSSocketFactory.setSupportTLS();
}
}

View File

@ -2,7 +2,6 @@ package org.nuclearfog.twidda.backend.api;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import androidx.annotation.NonNull;
@ -28,7 +27,6 @@ import org.nuclearfog.twidda.backend.lists.Users;
import org.nuclearfog.twidda.backend.proxy.ProxyAuthenticator;
import org.nuclearfog.twidda.backend.proxy.UserProxy;
import org.nuclearfog.twidda.backend.utils.StringTools;
import org.nuclearfog.twidda.backend.utils.TLSSocketFactory;
import org.nuclearfog.twidda.backend.utils.Tokens;
import org.nuclearfog.twidda.database.FilterDatabase;
import org.nuclearfog.twidda.database.GlobalSettings;
@ -41,7 +39,6 @@ import org.nuclearfog.twidda.model.UserList;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyStore;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
@ -51,17 +48,13 @@ import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
import okhttp3.ConnectionSpec;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okio.BufferedSink;
import okio.Okio;
@ -190,23 +183,6 @@ public class Twitter implements GlobalSettings.SettingsListener {
// setup proxy
builder.proxy(UserProxy.get(settings));
builder.proxyAuthenticator(new ProxyAuthenticator(settings));
// enable experimental TLS 1.2 support for old android versions
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
try {
TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
factory.init((KeyStore) null);
X509TrustManager manager = (X509TrustManager) factory.getTrustManagers()[0];
builder.sslSocketFactory(new TLSSocketFactory(), manager);
// quick fix because of handshake error on pre lollipop devices
List<ConnectionSpec> supportTls = new ArrayList<>();
supportTls.add(new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS).allEnabledTlsVersions().allEnabledCipherSuites().build());
builder.connectionSpecs(supportTls);
} catch (Exception e) {
e.printStackTrace();
// ignore, try with default setting
}
}
client = builder.build();
notifySettingsChange = false;
}
@ -237,8 +213,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
public String getRequestToken() throws TwitterException {
try {
Response response = post(REQUEST_TOKEN, new ArrayList<>());
if (response.code() == 200 && response.body() != null) {
String res = response.body().string();
ResponseBody body = response.body();
if (response.code() == 200 && body != null) {
String res = body.string();
// extract oauth_token from url
Uri uri = Uri.parse(AUTHENTICATE + "?" + res);
return uri.getQueryParameter("oauth_token");
@ -260,8 +237,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
params.add("oauth_verifier=" + pin);
params.add("oauth_token=" + oauth_token);
Response response = post(OAUTH_VERIFIER, params);
if (response.code() == 200 && response.body() != null) {
String res = response.body().string();
ResponseBody body = response.body();
if (response.code() == 200 && body != null) {
String res = body.string();
// extract tokens from link
Uri uri = Uri.parse(OAUTH_VERIFIER + "?" + res);
settings.setAccessToken(uri.getQueryParameter("oauth_token"));
@ -284,14 +262,13 @@ public class Twitter implements GlobalSettings.SettingsListener {
public User getCredentials() throws TwitterException {
try {
Response response = get(CREDENTIALS, new ArrayList<>());
if (response.body() != null && response.code() == 200) {
JSONObject json = new JSONObject(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONObject json = new JSONObject(body.string());
return new UserV1(json);
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -501,14 +478,13 @@ public class Twitter implements GlobalSettings.SettingsListener {
params.add("target_id=" + userId);
try {
Response response = get(RELATION, params);
if (response.body() != null && response.code() == 200) {
JSONObject json = new JSONObject(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONObject json = new JSONObject(body.string());
return new RelationV1(json);
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -650,8 +626,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
params.add("id=" + id);
try {
Response response = get(TRENDS, params);
if (response.body() != null && response.code() == 200) {
JSONArray json = new JSONArray(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONArray json = new JSONArray(body.string());
JSONArray trends = json.getJSONObject(0).getJSONArray("trends");
List<Trend> result = new ArrayList<>(trends.length() + 1);
for (int pos = 0; pos < trends.length(); pos++) {
@ -661,9 +638,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
return result;
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -676,8 +651,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
public List<Location> getLocations() throws TwitterException {
try {
Response response = get(LOCATIONS, new ArrayList<>(0));
if (response.body() != null && response.code() == 200) {
JSONArray locations = new JSONArray(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONArray locations = new JSONArray(body.string());
List<Location> result = new ArrayList<>(locations.length() + 1);
for (int pos = 0; pos < locations.length(); pos++) {
JSONObject location = locations.getJSONObject(pos);
@ -686,9 +662,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
return result;
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -920,19 +894,17 @@ public class Twitter implements GlobalSettings.SettingsListener {
*/
public void hideReply(long tweetId, boolean hide) throws TwitterException {
try {
RequestBody body = RequestBody.create(TYPE_JSON, "{\"hidden\":" + hide + "}");
Response response = put(TWEET_UNI + tweetId + "/hidden", new ArrayList<>(), body);
if (response.body() != null && response.code() == 200) {
JSONObject json = new JSONObject(response.body().string());
RequestBody request = RequestBody.create("{\"hidden\":" + hide + "}", TYPE_JSON);
Response response = put(TWEET_UNI + tweetId + "/hidden", new ArrayList<>(), request);
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONObject json = new JSONObject(body.string());
if (json.getJSONObject("data").getBoolean("hidden") == hide) {
return; // successfull if result equals request
}
}
throw new TwitterException(response);
} catch (IOException e) {
throw new TwitterException(e);
} catch (JSONException e) {
} catch (IOException | JSONException e) {
throw new TwitterException(e);
}
}
@ -1159,9 +1131,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
if (response.code() != 200) {
throw new TwitterException(response);
}
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -1197,10 +1167,11 @@ public class Twitter implements GlobalSettings.SettingsListener {
params.add("cursor=" + cursor);
try {
Response response = get(DIRECTMESSAGE, params);
if (response.body() != null && response.code() == 200) {
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
// init user cache to re-use instances
Map<Long, User> userCache = new TreeMap<>();
JSONObject json = new JSONObject(response.body().string());
JSONObject json = new JSONObject(body.string());
String nextCursor = json.optString("next_cursor");
JSONArray array = json.getJSONArray("events");
Directmessages result = new Directmessages(cursor, nextCursor);
@ -1233,9 +1204,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
return result;
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -1265,9 +1234,11 @@ public class Twitter implements GlobalSettings.SettingsListener {
enableChunk = false;
}
Response response = post(MEDIA_UPLOAD, params);
if (response.code() < 200 || response.code() >= 300 || response.body() == null)
ResponseBody body = response.body();
if (response.code() < 200 || response.code() >= 300 || body == null)
throw new TwitterException(response);
JSONObject jsonResponse = new JSONObject(response.body().string());
JSONObject jsonResponse = new JSONObject(body.string());
final long mediaId = Long.parseLong(jsonResponse.getString("media_id_string"));
// step 2 APPEND
@ -1309,11 +1280,12 @@ public class Twitter implements GlobalSettings.SettingsListener {
// this type of link requires authentication
if (link.startsWith(DOWNLOAD)) {
Response response = get(link, new ArrayList<>(0));
if (response.code() == 200 && response.body() != null) {
MediaType type = response.body().contentType();
ResponseBody body = response.body();
if (response.code() == 200 && body != null) {
MediaType type = body.contentType();
if (type != null) {
String mime = type.toString();
InputStream stream = response.body().byteStream();
InputStream stream = body.byteStream();
return new MediaUpdate(stream, mime);
}
}
@ -1323,11 +1295,12 @@ public class Twitter implements GlobalSettings.SettingsListener {
else {
Request request = new Request.Builder().url(link).get().build();
Response response = client.newCall(request).execute();
if (response.code() == 200 && response.body() != null) {
MediaType type = response.body().contentType();
ResponseBody body = response.body();
if (response.code() == 200 && body != null) {
MediaType type = body.contentType();
if (type != null) {
String mime = type.toString();
InputStream stream = response.body().byteStream();
InputStream stream = body.byteStream();
return new MediaUpdate(stream, mime);
}
}
@ -1416,13 +1389,13 @@ public class Twitter implements GlobalSettings.SettingsListener {
params.add(TweetV1.INCL_ENTITIES);
params.add("count=" + settings.getListSize());
Response response = get(endpoint, params);
if (response.body() != null && response.code() == 200) {
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONArray array;
String body = response.body().string();
if (endpoint.equals(TWEET_SEARCH)) // twitter search uses another structure
array = new JSONObject(body).getJSONArray("statuses");
array = new JSONObject(body.string()).getJSONArray("statuses");
else
array = new JSONArray(body);
array = new JSONArray(body.string());
long homeId = settings.getCurrentUserId();
List<Tweet> tweets = new ArrayList<>(array.length() + 1);
for (int i = 0; i < array.length(); i++) {
@ -1435,9 +1408,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
return tweets;
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -1459,8 +1430,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
} else {
response = post(endpoint, params);
}
if (response.body() != null && response.code() == 200) {
JSONObject json = new JSONObject(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONObject json = new JSONObject(body.string());
long currentId = settings.getCurrentUserId();
TweetV1 result = new TweetV1(json, currentId);
// fix: embedded tweet information doesn't match with the parent tweet
@ -1472,9 +1444,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
return result;
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -1491,8 +1461,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
List<String> params = new ArrayList<>();
params.add("cursor=" + cursor);
Response response = get(endpoint, params);
if (response.body() != null && response.code() == 200) {
JSONObject json = new JSONObject(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONObject json = new JSONObject(body.string());
JSONArray idArray = json.getJSONArray("ids");
cursor = Long.parseLong(json.optString("next_cursor_str", "0"));
long[] result = new long[idArray.length() + 1];
@ -1504,11 +1475,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
} else {
throw new TwitterException(response);
}
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
throw new TwitterException(err);
} catch (NumberFormatException err) {
} catch (IOException | JSONException | NumberFormatException err) {
throw new TwitterException(err);
}
}
@ -1549,8 +1516,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
params.add("count=" + settings.getListSize());
response = get(endpoint, params);
}
if (response.body() != null && response.code() == 200) {
String jsonResult = response.body().string();
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
String jsonResult = body.string();
if (!jsonResult.startsWith("{\"users\":")) // convert to users JSON object
jsonResult = "{\"users\":" + jsonResult + '}';
JSONObject json = new JSONObject(jsonResult);
@ -1569,11 +1537,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
return users;
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
throw new TwitterException(err);
} catch (NumberFormatException err) {
} catch (IOException | JSONException | NumberFormatException err) {
throw new TwitterException(err);
}
}
@ -1589,8 +1553,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
List<String> params = new ArrayList<>();
params.add(UserV2.PARAMS);
Response response = get(endpoint, params);
if (response.body() != null && response.code() == 200) {
JSONObject json = new JSONObject(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONObject json = new JSONObject(body.string());
Users users = new Users(0L, 0L);
// check if result is not empty
if (json.has("data")) {
@ -1607,9 +1572,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
return users;
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -1630,15 +1593,14 @@ public class Twitter implements GlobalSettings.SettingsListener {
response = get(endpoint, params);
else
response = post(endpoint, params);
if (response.body() != null && response.code() == 200) {
JSONObject json = new JSONObject(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONObject json = new JSONObject(body.string());
long currentId = settings.getCurrentUserId();
return new UserV1(json, currentId);
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -1657,15 +1619,14 @@ public class Twitter implements GlobalSettings.SettingsListener {
response = get(endpoint, params);
else
response = post(endpoint, params);
if (response.body() != null && response.code() == 200) {
JSONObject json = new JSONObject(response.body().string());
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONObject json = new JSONObject(body.string());
long currentId = settings.getCurrentUserId();
return new UserListV1(json, currentId);
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
} catch (IOException | JSONException err) {
throw new TwitterException(err);
}
}
@ -1681,19 +1642,20 @@ public class Twitter implements GlobalSettings.SettingsListener {
params.add("include_entities=true");
try {
Response response = get(endpoint, params);
if (response.body() != null && response.code() == 200) {
ResponseBody body = response.body();
if (body != null && response.code() == 200) {
JSONArray array;
UserLists result;
String body = response.body().string();
String bodyStr = body.string();
// add cursors if available
if (body.startsWith("{")) {
JSONObject json = new JSONObject(body);
if (bodyStr.startsWith("{")) {
JSONObject json = new JSONObject(bodyStr);
array = json.getJSONArray("lists");
long prevCursor = Long.parseLong(json.optString("previous_cursor_str", "0"));
long nextCursor = Long.parseLong(json.optString("next_cursor_str", "0"));
result = new UserLists(prevCursor, nextCursor);
} else {
array = new JSONArray(body);
array = new JSONArray(bodyStr);
result = new UserLists(0L, 0L);
}
long currentId = settings.getCurrentUserId();
@ -1707,11 +1669,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
return result;
}
throw new TwitterException(response);
} catch (IOException err) {
throw new TwitterException(err);
} catch (JSONException err) {
throw new TwitterException(err);
} catch (NumberFormatException err) {
} catch (IOException | JSONException | NumberFormatException err) {
throw new TwitterException(err);
}
}
@ -1794,7 +1752,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
* @return http response
*/
private Response post(String endpoint, List<String> params) throws IOException {
RequestBody body = RequestBody.create(TYPE_TEXT, "");
RequestBody body = RequestBody.create("", TYPE_TEXT);
return post(endpoint, params, body);
}
@ -1807,7 +1765,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
*/
@SuppressWarnings("SameParameterValue")
private Response post(String endpoint, List<String> params, JSONObject json) throws IOException {
RequestBody body = RequestBody.create(TYPE_JSON, json.toString());
RequestBody body = RequestBody.create(json.toString(), TYPE_JSON);
return post(endpoint, params, body);
}

View File

@ -9,6 +9,7 @@ import org.nuclearfog.twidda.backend.utils.ErrorHandler.TwitterError;
import java.io.IOException;
import okhttp3.Response;
import okhttp3.ResponseBody;
/**
* custom exception implementation containing additional information like http status code and API error code
@ -42,11 +43,12 @@ public class TwitterException extends Exception implements TwitterError {
// basic information
this.httpCode = response.code();
this.message = response.message();
ResponseBody body = response.body();
// get extra information
if (response.body() != null) {
if (body != null) {
try {
JSONObject json = new JSONObject(response.body().string());
JSONObject json = new JSONObject(body.string());
JSONArray errors = json.optJSONArray("errors");
if (errors != null) {
JSONObject error = errors.optJSONObject(0);

View File

@ -1,7 +1,6 @@
package org.nuclearfog.twidda.backend.utils;
import android.content.Context;
import android.os.Build;
import com.squareup.picasso.OkHttp3Downloader;
import com.squareup.picasso.Picasso;
@ -11,10 +10,6 @@ import org.nuclearfog.twidda.backend.proxy.UserProxy;
import org.nuclearfog.twidda.database.GlobalSettings;
import java.io.File;
import java.security.KeyStore;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
import okhttp3.Cache;
import okhttp3.OkHttpClient;
@ -60,18 +55,6 @@ public class PicassoBuilder implements GlobalSettings.SettingsListener {
builder.proxyAuthenticator(new ProxyAuthenticator(settings));
}
}
// setup TLS 1.2 support if needed
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
try {
TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
factory.init((KeyStore) null);
X509TrustManager manager = (X509TrustManager) factory.getTrustManagers()[0];
TLSSocketFactory socket = new TLSSocketFactory();
builder.sslSocketFactory(socket, manager);
} catch (Exception e) {
// ignore, try without TLS 1.2 support
}
}
downloader = new OkHttp3Downloader(builder.build());
notifySettingsChange = false;
}

View File

@ -1,120 +0,0 @@
package org.nuclearfog.twidda.backend.utils;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
/**
* Enable Experimental TLS 1.2 support for pre-Lollipop devices
*
* @author fkrauthan
* @see <a href="https://gist.githubusercontent.com/fkrauthan/ac8624466a4dee4fd02f/raw/309efc30e31c96a932ab9d19bf4d73b286b00573/TLSSocketFactory.java"/>
*/
public class TLSSocketFactory extends SSLSocketFactory {
private static final String TLS_1_1 = "TLSv1.1";
private static final String TLS_1_2 = "TLSv1.2";
private static final String TLS_1_3 = "TLSv1.3";
/**
* protocols required by Twitter API
*/
private static final String[] PROTOCOLS = {TLS_1_1, TLS_1_2};
private SSLSocketFactory internalSSLSocketFactory;
/**
* check if TLS 1.2 is enabled and enable experimental TLS 1.2 support on Pre-Lollipop devices
*/
public static void setSupportTLS() {
try {
boolean tlsEnabled = false;
SSLParameters param = SSLContext.getDefault().getDefaultSSLParameters();
String[] protocols = param.getProtocols();
for (String protocol : protocols) {
if (protocol.equals(TLS_1_2) || protocol.equals(TLS_1_3)) {
tlsEnabled = true;
break;
}
}
if (!tlsEnabled) {
HttpsURLConnection.setDefaultSSLSocketFactory(new TLSSocketFactory());
}
} catch (Exception err) {
err.printStackTrace();
}
}
/**
*
*/
public TLSSocketFactory() throws KeyManagementException, NoSuchAlgorithmException {
SSLContext context = SSLContext.getInstance(TLS_1_2);
context.init(null, null, null);
internalSSLSocketFactory = context.getSocketFactory();
}
@Override
public String[] getDefaultCipherSuites() {
return internalSSLSocketFactory.getDefaultCipherSuites();
}
@Override
public String[] getSupportedCipherSuites() {
return internalSSLSocketFactory.getSupportedCipherSuites();
}
@Override
public Socket createSocket() throws IOException {
return enableTLSOnSocket(internalSSLSocketFactory.createSocket());
}
@Override
public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
return enableTLSOnSocket(internalSSLSocketFactory.createSocket(s, host, port, autoClose));
}
@Override
public Socket createSocket(String host, int port) throws IOException {
return enableTLSOnSocket(internalSSLSocketFactory.createSocket(host, port));
}
@Override
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException {
return enableTLSOnSocket(internalSSLSocketFactory.createSocket(host, port, localHost, localPort));
}
@Override
public Socket createSocket(InetAddress host, int port) throws IOException {
return enableTLSOnSocket(internalSSLSocketFactory.createSocket(host, port));
}
@Override
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
return enableTLSOnSocket(internalSSLSocketFactory.createSocket(address, port, localAddress, localPort));
}
private Socket enableTLSOnSocket(Socket socket) {
if (socket instanceof SSLSocket) {
((SSLSocket) socket).setEnabledProtocols(PROTOCOLS);
}
return socket;
}
}

View File

@ -59,7 +59,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/confirm_checkbox_text_margin"
android:layout_marginRight="@dimen/confirm_checkbox_text_margin"
android:text="@string/dialog_confirm_remember"
android:textSize="@dimen/confirm_checkbox_text_size"
app:layout_constraintBottom_toBottomOf="@id/confirm_remember"

View File

@ -14,7 +14,6 @@
android:id="@+id/item_login_image"
android:layout_width="@dimen/login_image_size"
android:layout_height="@dimen/login_image_size"
android:layout_marginRight="@dimen/login_layout_padding"
android:layout_marginEnd="@dimen/login_layout_padding"
android:contentDescription="@string/profile_image"
app:layout_constraintStart_toStartOf="parent"
@ -72,7 +71,6 @@
android:layout_width="@dimen/login_button_size"
android:layout_height="@dimen/login_button_size"
android:padding="@dimen/login_button_padding"
android:layout_marginLeft="@dimen/login_layout_padding"
android:layout_marginStart="@dimen/login_layout_padding"
android:contentDescription="@string/descr_remove_user"
android:scaleType="fitCenter"

View File

@ -23,7 +23,6 @@
android:id="@+id/dm_user_verified"
android:layout_width="@dimen/dmitem_icon_size"
android:layout_height="@dimen/dmitem_icon_size"
android:layout_marginLeft="@dimen/dmitem_padding_drawable"
android:layout_marginStart="@dimen/dmitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/dm_profile_img"
app:layout_constraintTop_toTopOf="@id/dm_username"
@ -35,7 +34,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/dmitem_padding_drawable"
android:layout_marginLeft="@dimen/dmitem_text_margin"
android:layout_marginStart="@dimen/dmitem_text_margin"
android:singleLine="true"
android:textSize="@dimen/dmitem_textsize_name"
@ -59,7 +57,6 @@
android:id="@+id/dm_user_locked"
android:layout_width="@dimen/dmitem_icon_size"
android:layout_height="@dimen/dmitem_icon_size"
android:layout_marginLeft="@dimen/dmitem_padding_drawable"
android:layout_marginStart="@dimen/dmitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/dm_profile_img"
app:layout_constraintTop_toTopOf="@id/dm_screenname"
@ -87,7 +84,6 @@
android:id="@+id/dm_receiver_icon"
android:layout_width="@dimen/dmitem_icon_size"
android:layout_height="@dimen/dmitem_icon_size"
android:layout_marginLeft="@dimen/dmitem_padding_drawable"
android:layout_marginStart="@dimen/dmitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/dm_screenname"
app:layout_constraintTop_toTopOf="@id/dm_screenname"
@ -103,7 +99,6 @@
android:drawablePadding="@dimen/dmitem_padding_drawable"
android:singleLine="true"
android:textSize="@dimen/dmitem_textsize_name"
android:layout_marginLeft="@dimen/dmitem_padding_drawable"
android:layout_marginStart="@dimen/dmitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/dm_receiver_icon"
app:layout_constraintTop_toTopOf="@id/dm_screenname"
@ -170,7 +165,6 @@
android:id="@+id/dm_delete"
android:layout_width="wrap_content"
android:layout_height="@dimen/dmitem_button_height"
android:layout_marginLeft="@dimen/dmitem_button_margin"
android:layout_marginStart="@dimen/dmitem_button_margin"
android:layout_marginTop="@dimen/dmitem_button_margin"
android:singleLine="true"

View File

@ -24,7 +24,6 @@
android:id="@+id/list_user_verified"
android:layout_width="@dimen/listitem_icon_size"
android:layout_height="@dimen/listitem_icon_size"
android:layout_marginLeft="@dimen/listitem_padding_drawable"
android:layout_marginStart="@dimen/listitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/list_owner_profile"
app:layout_constraintTop_toTopOf="@id/list_ownername"
@ -36,7 +35,6 @@
android:id="@+id/list_ownername"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/listitem_text_margin"
android:layout_marginStart="@dimen/listitem_text_margin"
android:singleLine="true"
android:textSize="@dimen/listitem_textsize_name"
@ -50,7 +48,6 @@
android:id="@+id/list_user_locked"
android:layout_width="@dimen/listitem_icon_size"
android:layout_height="@dimen/listitem_icon_size"
android:layout_marginLeft="@dimen/listitem_padding_drawable"
android:layout_marginStart="@dimen/listitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/list_owner_profile"
app:layout_constraintTop_toTopOf="@id/list_screenname"
@ -62,7 +59,6 @@
android:id="@+id/list_screenname"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/listitem_text_margin"
android:layout_marginStart="@dimen/listitem_text_margin"
android:singleLine="true"
android:textSize="@dimen/listitem_textsize_name"
@ -76,7 +72,6 @@
android:id="@+id/list_date_icon"
android:layout_width="@dimen/listitem_icon_size"
android:layout_height="@dimen/listitem_icon_size"
android:layout_marginLeft="@dimen/listitem_padding_drawable"
android:layout_marginStart="@dimen/listitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/list_owner_profile"
app:layout_constraintTop_toTopOf="@id/list_createdat"
@ -89,7 +84,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/listitem_padding_drawable"
android:layout_marginLeft="@dimen/listitem_text_margin"
android:layout_marginStart="@dimen/listitem_text_margin"
android:singleLine="true"
android:textSize="@dimen/listitem_textsize_date"
@ -110,7 +104,6 @@
android:id="@+id/list_private"
android:layout_width="@dimen/listitem_icon_size_big"
android:layout_height="@dimen/listitem_icon_size_big"
android:layout_marginRight="@dimen/listitem_padding_drawable"
android:layout_marginEnd="@dimen/listitem_padding_drawable"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/list_title"

View File

@ -27,7 +27,6 @@
android:id="@+id/trendname"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/trenditem_text_margin"
android:layout_marginStart="@dimen/trenditem_text_margin"
android:singleLine="true"
android:textSize="@dimen/trenditem_textsize_trendname"
@ -41,7 +40,6 @@
android:id="@+id/trendvol"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/trenditem_text_margin"
android:layout_marginStart="@dimen/trenditem_text_margin"
android:singleLine="true"
android:textSize="@dimen/trenditem_textsize_trendvol"

View File

@ -23,7 +23,6 @@
android:id="@+id/verified_icon"
android:layout_width="@dimen/tweetitem_icon_size"
android:layout_height="@dimen/tweetitem_icon_size"
android:layout_marginLeft="@dimen/tweetitem_padding_drawable"
android:layout_marginStart="@dimen/tweetitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/tweetPb"
app:layout_constraintTop_toTopOf="@id/username"
@ -35,7 +34,6 @@
android:id="@+id/username"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/tweetitem_text_margin"
android:layout_marginStart="@dimen/tweetitem_text_margin"
android:singleLine="true"
app:layout_constraintStart_toEndOf="@id/verified_icon"
@ -47,7 +45,6 @@
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/tweetitem_text_margin"
android:layout_marginStart="@dimen/tweetitem_text_margin"
android:singleLine="true"
android:textSize="@dimen/tweetitem_textsize_date"
@ -60,7 +57,6 @@
android:id="@+id/locked_icon"
android:layout_width="@dimen/tweetitem_icon_size"
android:layout_height="@dimen/tweetitem_icon_size"
android:layout_marginLeft="@dimen/tweetitem_padding_drawable"
android:layout_marginStart="@dimen/tweetitem_padding_drawable"
app:layout_constraintStart_toEndOf="@id/tweetPb"
app:layout_constraintTop_toTopOf="@id/screenname"
@ -72,7 +68,6 @@
android:id="@+id/screenname"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/tweetitem_text_margin"
android:layout_marginStart="@dimen/tweetitem_text_margin"
android:singleLine="true"
app:layout_constraintStart_toEndOf="@id/locked_icon"
@ -99,7 +94,6 @@
android:id="@+id/rt_user_icon"
android:layout_width="@dimen/tweetitem_icon_size"
android:layout_height="@dimen/tweetitem_icon_size"
android:layout_marginLeft="@dimen/tweetitem_text_margin"
android:layout_marginStart="@dimen/tweetitem_text_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tweettext"

View File

@ -25,7 +25,6 @@
android:id="@+id/useritem_verified"
android:layout_width="@dimen/useritem_icon_size"
android:layout_height="@dimen/useritem_icon_size"
android:layout_marginLeft="@dimen/useritem_drawable_margin"
android:layout_marginStart="@dimen/useritem_drawable_margin"
app:layout_constraintStart_toEndOf="@id/user_profileimg"
app:layout_constraintTop_toTopOf="@id/username_detail"
@ -51,7 +50,6 @@
android:id="@+id/useritem_locked"
android:layout_width="@dimen/useritem_icon_size"
android:layout_height="@dimen/useritem_icon_size"
android:layout_marginLeft="@dimen/useritem_drawable_margin"
android:layout_marginStart="@dimen/useritem_drawable_margin"
app:layout_constraintStart_toEndOf="@id/user_profileimg"
app:layout_constraintTop_toTopOf="@id/screenname_detail"
@ -119,7 +117,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/useritem_drawable_margin"
android:layout_marginRight="@dimen/useritem_textview_padding"
android:layout_marginEnd="@dimen/useritem_textview_padding"
android:singleLine="true"
android:textSize="@dimen/useritem_textsize_small"

View File

@ -66,7 +66,6 @@
android:id="@+id/edit_pb"
android:layout_width="@dimen/editprofile_image"
android:layout_height="@dimen/editprofile_image"
android:layout_marginLeft="@dimen/editprofile_profile_image_left_margin"
android:layout_marginStart="@dimen/editprofile_profile_image_left_margin"
android:contentDescription="@string/image_preview"
android:scaleType="centerCrop"

View File

@ -21,7 +21,6 @@
android:id="@+id/login_first_opt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/loginpage_number_padding"
android:layout_marginEnd="@dimen/loginpage_number_padding"
android:text="@string/login_first_opt"
android:textSize="24sp"
@ -51,7 +50,6 @@
android:id="@+id/login_sec_opt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/loginpage_number_padding"
android:layout_marginEnd="@dimen/loginpage_number_padding"
android:text="@string/login_sec_opt"
android:textSize="24sp"
@ -82,7 +80,6 @@
android:id="@+id/login_third_opt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/loginpage_number_padding"
android:layout_marginEnd="@dimen/loginpage_number_padding"
android:text="@string/login_trd_opt"
android:textSize="24sp"

View File

@ -57,7 +57,6 @@
android:id="@+id/profile_img"
android:layout_width="@dimen/profile_image_size"
android:layout_height="@dimen/profile_image_size"
android:layout_marginLeft="@dimen/profile_image_padding_left"
android:layout_marginStart="@dimen/profile_image_padding_left"
android:contentDescription="@string/profile_image"
app:layout_constraintStart_toStartOf="parent"
@ -108,7 +107,6 @@
android:visibility="invisible"
android:padding="@dimen/profile_tv_background_padding"
android:drawablePadding="@dimen/profile_padding_drawable"
android:layout_marginLeft="@dimen/profile_tv_margin"
android:layout_marginStart="@dimen/profile_tv_margin"
android:singleLine="true"
android:text="@string/follows_you"

View File

@ -207,7 +207,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/settings_look_text"
@ -231,7 +230,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/settings_toolbar_ov"
@ -277,7 +275,6 @@
android:id="@+id/spinner_scale"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/settings_spinner_margin"
android:layout_marginStart="@dimen/settings_spinner_margin"
android:popupBackground="@android:color/transparent"
app:layout_constraintHorizontal_weight="1"
@ -317,7 +314,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/settings_data_text"
@ -342,7 +338,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toggleImg"
@ -367,7 +362,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/settings_image_hq"
@ -391,7 +385,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toggleAns"
@ -415,7 +408,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/settings_enable_prev"
@ -538,7 +530,6 @@
android:layout_width="0dp"
android:layout_height="@dimen/settings_button_height"
android:layout_marginTop="@dimen/settings_button_margin"
android:layout_marginRight="@dimen/settings_button_margin"
android:layout_marginEnd="@dimen/settings_button_margin"
android:text="@string/settings_clear_data"
app:layout_constraintStart_toStartOf="parent"
@ -551,7 +542,6 @@
android:id="@+id/logout"
android:layout_width="0dp"
android:layout_height="@dimen/settings_button_height"
android:layout_marginLeft="@dimen/settings_button_margin"
android:layout_marginStart="@dimen/settings_button_margin"
android:layout_marginTop="@dimen/settings_button_margin"
android:text="@string/settings_logout"
@ -593,7 +583,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/settings_connections_text"
@ -651,7 +640,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/edit_proxy_address"
@ -706,7 +694,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_column_margin"
android:layout_marginRight="@dimen/settings_switch_margin"
android:layout_marginEnd="@dimen/settings_switch_margin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/edit_proxypass"

View File

@ -36,7 +36,6 @@
android:id="@+id/tweet_profile"
android:layout_width="@dimen/tweet_profile"
android:layout_height="@dimen/tweet_profile"
android:layout_marginLeft="@dimen/tweet_profileimage_margin"
android:layout_marginStart="@dimen/tweet_profileimage_margin"
android:layout_marginTop="@dimen/tweet_profileimage_margin"
android:contentDescription="@string/profile_image"
@ -194,7 +193,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/tweet_padding_drawable"
android:layout_marginLeft="@dimen/tweet_textview_margin"
android:layout_marginStart="@dimen/tweet_textview_margin"
android:layout_marginTop="@dimen/tweet_textview_margin"
android:singleLine="true"
@ -212,7 +210,6 @@
android:visibility="invisible"
android:paddingLeft="@dimen/tweet_button_padding"
android:paddingRight="@dimen/tweet_button_padding"
android:layout_marginLeft="@dimen/tweet_button_margin"
android:layout_marginStart="@dimen/tweet_button_margin"
android:singleLine="true"
android:textSize="@dimen/tweet_textsize_locale"

View File

@ -72,7 +72,6 @@
android:id="@+id/controller_position"
android:layout_width="@dimen/controller_text_width"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/controller_text_margin"
android:layout_marginStart="@dimen/controller_text_margin"
android:singleLine="true"
android:textSize="@dimen/controller_text_size"
@ -97,7 +96,6 @@
android:id="@+id/controller_duration"
android:layout_width="@dimen/controller_text_width"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/controller_text_margin"
android:layout_marginEnd="@dimen/controller_text_margin"
android:singleLine="true"
android:textSize="@dimen/controller_text_size"

View File

@ -24,7 +24,6 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@android:color/transparent"
android:layout_marginLeft="@dimen/dmpopup_margin_background"
android:layout_marginStart="@dimen/dmpopup_margin_background"
android:layout_marginTop="@dimen/dmpopup_margin_background"
android:hint="@string/username"
@ -65,7 +64,6 @@
android:layout_height="0dp"
android:padding="@dimen/dmpopup_button_padding"
android:layout_marginTop="@dimen/dmpopup_margin_background"
android:layout_marginRight="@dimen/dmpopup_button_margin"
android:layout_marginEnd="@dimen/dmpopup_button_margin"
android:contentDescription="@string/tweet_add_image"
android:scaleType="fitCenter"
@ -83,7 +81,6 @@
android:layout_height="0dp"
android:padding="@dimen/dmpopup_button_padding"
android:layout_marginTop="@dimen/dmpopup_margin_background"
android:layout_marginRight="@dimen/dmpopup_margin_background"
android:layout_marginEnd="@dimen/dmpopup_margin_background"
android:contentDescription="@string/close_dm"
android:scaleType="fitCenter"

View File

@ -81,10 +81,8 @@
android:id="@+id/list_edit_public_sw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/popup_userlist_background_margin"
android:layout_marginStart="@dimen/popup_userlist_background_margin"
android:layout_marginBottom="@dimen/popup_userlist_background_margin"
android:layout_marginRight="@dimen/popup_userlist_layout_margin"
android:layout_marginEnd="@dimen/popup_userlist_layout_margin"
app:layout_constraintStart_toStartOf="@id/userlist_popup_background"
app:layout_constraintTop_toBottomOf="@id/list_edit_descr"
@ -95,7 +93,6 @@
android:id="@+id/userlist_switch_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/popup_userlist_layout_margin"
android:layout_marginEnd="@dimen/popup_userlist_layout_margin"
android:singleLine="true"
android:text="@string/userlist_public_sel"
@ -111,7 +108,6 @@
android:layout_height="@dimen/userlist_button_height"
android:paddingLeft="@dimen/userlist_button_padding"
android:paddingRight="@dimen/userlist_button_padding"
android:layout_marginRight="@dimen/popup_userlist_background_margin"
android:layout_marginEnd="@dimen/popup_userlist_background_margin"
android:text="@string/userlist_create"
app:layout_constraintStart_toEndOf="@id/userlist_switch_text"