fix ssl handshake and bottom nav height
This commit is contained in:
13
.idea/deviceManager.xml
generated
Normal file
13
.idea/deviceManager.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DeviceTable">
|
||||||
|
<option name="columnSorters">
|
||||||
|
<list>
|
||||||
|
<ColumnSorterState>
|
||||||
|
<option name="column" value="Name" />
|
||||||
|
<option name="order" value="ASCENDING" />
|
||||||
|
</ColumnSorterState>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId "ch.pizzalemon.android"
|
applicationId "ch.pizzalemon.android"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 35
|
targetSdkVersion 35
|
||||||
versionCode 29// play store'daki version --> canlı: 0 - dahili test: 17
|
versionCode 30// play store'daki version --> canlı: 0 - dahili test: 17
|
||||||
versionName "2.09" // play store'daki version --> canlı: 0.00 - dahili test: 1.17
|
versionName "2.10" // play store'daki version --> canlı: 0.00 - dahili test: 1.17
|
||||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.squareup.picasso.Picasso;
|
|||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
import javax.net.ssl.SSLSocketFactory;
|
||||||
import javax.net.ssl.TrustManager;
|
import javax.net.ssl.TrustManager;
|
||||||
|
|
||||||
import ch.pizzalemon.android.api.ApiConstants;
|
import ch.pizzalemon.android.api.ApiConstants;
|
||||||
@@ -73,12 +74,11 @@ public class App extends MultiDexApplication {
|
|||||||
|
|
||||||
private void addSSLTrustToOkHttp(OkHttpClient.Builder okHttpClientBuilder) {
|
private void addSSLTrustToOkHttp(OkHttpClient.Builder okHttpClientBuilder) {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{new SSLTrustManager()};
|
SSLTrustManager trustManager = new SSLTrustManager();
|
||||||
SSLContext sslContext = SSLContext.getInstance("SSL");
|
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||||
sslContext.init(null, trustAllCerts, new SecureRandom());
|
sslContext.init(null, new TrustManager[]{ trustManager }, new SecureRandom());
|
||||||
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
|
SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
|
||||||
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
|
okHttpClientBuilder.sslSocketFactory(sslSocketFactory, trustManager);
|
||||||
okHttpClientBuilder.sslSocketFactory(sslContext.getSocketFactory());
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import java.security.SecureRandom;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
|
import javax.net.ssl.SSLSocketFactory;
|
||||||
import javax.net.ssl.TrustManager;
|
import javax.net.ssl.TrustManager;
|
||||||
|
|
||||||
import ch.pizzalemon.android.BuildConfig;
|
import ch.pizzalemon.android.BuildConfig;
|
||||||
@@ -98,12 +99,11 @@ public class ApiService {
|
|||||||
|
|
||||||
private void addSSLTrustToOkHttp(OkHttpClient.Builder okHttpClientBuilder) {
|
private void addSSLTrustToOkHttp(OkHttpClient.Builder okHttpClientBuilder) {
|
||||||
try {
|
try {
|
||||||
TrustManager[] trustAllCerts = new TrustManager[]{new SSLTrustManager()};
|
SSLTrustManager trustManager = new SSLTrustManager();
|
||||||
SSLContext sslContext = SSLContext.getInstance("SSL");
|
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||||
sslContext.init(null, trustAllCerts, new SecureRandom());
|
sslContext.init(null, new TrustManager[]{ trustManager }, new SecureRandom());
|
||||||
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
|
SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
|
||||||
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
|
okHttpClientBuilder.sslSocketFactory(sslSocketFactory, trustManager);
|
||||||
okHttpClientBuilder.sslSocketFactory(sslContext.getSocketFactory());
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bottomNavigationView"
|
android:id="@+id/bottomNavigationView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?android:attr/actionBarSize"
|
android:layout_height="72dp"
|
||||||
app:itemIconTint="@drawable/selector_bottom_navigation_item"
|
app:itemIconTint="@drawable/selector_bottom_navigation_item"
|
||||||
app:itemTextColor="@drawable/selector_bottom_navigation_item"
|
app:itemTextColor="@drawable/selector_bottom_navigation_item"
|
||||||
android:background="@color/pizzalemon_dark_green"
|
android:background="@color/pizzalemon_dark_green"
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginBottom="-8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:elevation="9dp"
|
android:elevation="9dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user