Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
proguard rules update
Browse files Browse the repository at this point in the history
  • Loading branch information
PPetka committed Jul 11, 2023
1 parent 074722f commit fb8f2dc
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 70 deletions.
19 changes: 9 additions & 10 deletions app/proguard-rules-release-preprod.pro
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,13 @@
native <methods>;
}

# app compat-v7
-keep class android.support.v7.widget.SearchView { *; }

# FragmentArgs
-keep class com.hannesdorfmann.fragmentargs.** { *; }

# Gson
-keep class sun.misc.Unsafe { *; }

# retrofit
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
-dontnote retrofit2.Platform
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8
-keepattributes Signature
-keepattributes Exceptions

Expand Down Expand Up @@ -79,7 +70,6 @@

# glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
Expand All @@ -103,3 +93,12 @@

#Firebase Database
-keep class co.netguru.baby.monitor.client.data.communication.firebase.** { *; }

#Navigation component classes
-keep class androidx.navigation.** { *; }

#Navigation-related resources
-keep class **.R$* {
<fields>;
}

18 changes: 8 additions & 10 deletions app/proguard-rules-release.pro
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,13 @@
public static *** d(...);
}

# app compat-v7
-keep class android.support.v7.widget.SearchView { *; }

# FragmentArgs
-keep class com.hannesdorfmann.fragmentargs.** { *; }

# Gson
-keep class sun.misc.Unsafe { *; }

# retrofit
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
-dontnote retrofit2.Platform
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8
-keepattributes Signature
-keepattributes Exceptions

Expand Down Expand Up @@ -87,7 +78,6 @@

# glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
Expand All @@ -111,3 +101,11 @@

#Firebase Database
-keep class co.netguru.baby.monitor.client.data.communication.firebase.** { *; }

#Navigation component classes
-keep class androidx.navigation.** { *; }

#Navigation-related resources
-keep class **.R$* {
<fields>;
}
18 changes: 8 additions & 10 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,13 @@
# TODO 07.09.2017 or all their members should be annotated with @SerializedName().
-keepclassmembernames class co.netguru.android.template.data.**.model.** { *; }

# app compat-v7
-keep class android.support.v7.widget.SearchView { *; }

# FragmentArgs
-keep class com.hannesdorfmann.fragmentargs.** { *; }

# Gson
-keep class sun.misc.Unsafe { *; }

# retrofit
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
-dontnote retrofit2.Platform
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8
-keepattributes Signature
-keepattributes Exceptions

Expand Down Expand Up @@ -84,7 +75,6 @@

# glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
Expand Down Expand Up @@ -116,3 +106,11 @@ public static ** valueOf(java.lang.String);
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception

#Navigation component classes
-keep class androidx.navigation.** { *; }

#Navigation-related resources
-keep class **.R$* {
<fields>;
}
53 changes: 30 additions & 23 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:node="replace" />
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:node="replace"
/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
Expand All @@ -19,18 +22,19 @@
<uses-feature android:name="android.hardware.camera.autofocus" />

<application
android:name=".application.App"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:hardwareAccelerated="true"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme">
android:name=".application.App"
android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme"
>

<activity
android:name=".feature.onboarding.OnboardingActivity"
android:screenOrientation="portrait"
android:name=".feature.onboarding.OnboardingActivity"
android:exported="true"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -44,27 +48,30 @@
</activity>

<activity
android:name=".feature.client.home.ClientHomeActivity"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustPan|adjustResize" />
android:name=".feature.client.home.ClientHomeActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|adjustResize"
/>

<activity
android:name=".feature.server.ServerActivity"
android:screenOrientation="portrait" />
android:name=".feature.server.ServerActivity"
android:screenOrientation="portrait"
/>

<service android:name=".feature.voiceAnalysis.VoiceAnalysisService" />
<service android:name=".feature.communication.webrtc.server.WebRtcService" />
<service android:name=".feature.communication.websocket.WebSocketServerService" />
<service
android:name=".feature.babynotification.BabyMonitorMessagingService"
android:exported="false"
>
android:name=".feature.babynotification.BabyMonitorMessagingService"
android:exported="false"
>
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name=".feature.babynotification.BabyEventActionIntentService" />

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/white_logo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,34 @@ import co.netguru.baby.monitor.client.databinding.ActivityOnboardingBinding

class OnboardingActivity : AppCompatActivity() {

private lateinit var binding : ActivityOnboardingBinding
private lateinit var binding: ActivityOnboardingBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityOnboardingBinding.inflate(layoutInflater)
setContentView(binding.root)
}

override fun onBackPressed() {
val controller = findNavController(R.id.onboardingNavigationHostFragment).currentDestination?.id
val controller =
findNavController(R.id.onboardingNavigationHostFragment).currentDestination?.id
?: 0
if (controller == R.id.permissionMicrophone || controller == R.id.permissionMicrophone ||
controller == R.id.setupInformation) {
findNavController(R.id.onboardingNavigationHostFragment).popBackStack(R.id.connectWiFi, false)
controller == R.id.setupInformation
) {
findNavController(R.id.onboardingNavigationHostFragment).popBackStack(
R.id.connectWiFi,
false
)
} else if (controller == R.id.allDone) {
findNavController(R.id.onboardingNavigationHostFragment).popBackStack(R.id.parentDeviceInfo, false)
findNavController(R.id.onboardingNavigationHostFragment).popBackStack(
R.id.parentDeviceInfo,
false
)
} else {
super.onBackPressed()
}
}

override fun onSupportNavigateUp() =
findNavController(R.id.onboardingNavigationHostFragment).navigateUp()
findNavController(R.id.onboardingNavigationHostFragment).navigateUp()
}
24 changes: 13 additions & 11 deletions app/src/main/res/layout/activity_onboarding.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background">

<fragment
android:id="@+id/onboardingNavigationHostFragment"
android:name="androidx.navigation.fragment.NavHostFragment"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:navGraph="@navigation/splash_nav_graph" />
android:background="@color/background"
>

<androidx.fragment.app.FragmentContainerView
android:id="@+id/onboardingNavigationHostFragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:navGraph="@navigation/splash_nav_graph"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit fb8f2dc

Please sign in to comment.