Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
carmelo-iriti committed Oct 27, 2023
2 parents 8d6d7b2 + 78f9e5f commit ca98221
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 21 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 7.4.3 (October, 27, 2023)
* [DIA-2886](https://sourcepoint.atlassian.net/browse/DIA-2886) Fix Gdpr applies (#729)

## 7.4.2 (October, 25, 2023)
* [DIA-2918](https://sourcepoint.atlassian.net/browse/DIA-2918) Fix ConsentStatus missing (#726)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To use `cmplibrary` in your app, include `com.sourcepoint.cmplibrary:cmplibrary:
```
...
dependencies {
implementation 'com.sourcepoint.cmplibrary:cmplibrary:7.4.2'
implementation 'com.sourcepoint.cmplibrary:cmplibrary:7.4.3'
}
```

Expand Down
2 changes: 1 addition & 1 deletion cmplibrary/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME = 7.4.2
VERSION_NAME = 7.4.3

POM_NAME = cmplibrary
POM_REPO = sourcepoint
Expand Down
2 changes: 1 addition & 1 deletion cmplibrary/release_note.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* [DIA-2918](https://sourcepoint.atlassian.net/browse/DIA-2918) Fix ConsentStatus missing (#726)
* [DIA-2886](https://sourcepoint.atlassian.net/browse/DIA-2886) Fix Gdpr applies (#729)
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ class DemoActivity : FragmentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!sp.contains(PropertyListFragment.OLD_V6_CONSENT)) {
if (!sp.contains(PropertyListFragment.OLD_V6_CONSENT) &&
!sp.contains(PropertyListFragment.V7_CONSENT)
) {
clearAllData(this)
}
setContentView(R.layout.activity_demo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ import com.sourcepointmeta.metaapp.ui.component.toPropertyDTO
import com.sourcepointmeta.metaapp.ui.demo.DemoActivity
import com.sourcepointmeta.metaapp.ui.property.AddUpdatePropertyFragment
import com.sourcepointmeta.metaapp.ui.sp.PreferencesActivity
import com.sourcepointmeta.metaapp.util.oldV6Consent
import com.sourcepointmeta.metaapp.util.oldV6Consent630
import com.sourcepointmeta.metaapp.util.oldV6ConsentFinnish690
import com.sourcepointmeta.metaapp.util.v7Consent726
import kotlinx.android.synthetic.main.fragment_property_list.*
import com.sourcepointmeta.metaapp.util.* //ktlint-disable
import kotlinx.android.synthetic.main.fragment_property_list.* //ktlint-disable
import org.json.JSONObject
import org.koin.android.ext.android.inject
import org.koin.androidx.viewmodel.ext.android.viewModel
Expand All @@ -53,6 +50,7 @@ class PropertyListFragment : Fragment() {

companion object {
const val OLD_V6_CONSENT = "sp.old.v6.consent"
const val V7_CONSENT = "sp.preload.V7.consent"
}

private val sp by lazy { PreferenceManager.getDefaultSharedPreferences(requireActivity()) }
Expand Down Expand Up @@ -158,11 +156,34 @@ class PropertyListFragment : Fragment() {
}
R.id.action_save_cons_726 -> {
val editor = sp.edit()
val v6LocalState = JSONObject(v7Consent726)
v6LocalState.keys().forEach {
check { v6LocalState.getString(it) }?.let { v -> editor.putString(it, v) }
check { v6LocalState.getBoolean(it) }?.let { v -> editor.putBoolean(it, v) }
check { v6LocalState.getInt(it) }?.let { v -> editor.putInt(it, v) }
val v7LocalState = JSONObject(v7Consent726)
editor.putBoolean(V7_CONSENT, true)
v7LocalState.keys().forEach {
check { v7LocalState.getString(it) }?.let { v -> editor.putString(it, v) }
check { v7LocalState.getBoolean(it) }?.let { v -> editor.putBoolean(it, v) }
check { v7LocalState.getInt(it) }?.let { v -> editor.putInt(it, v) }
}
editor.apply()
}
R.id.action_save_cons_711 -> {
val editor = sp.edit()
val v7LocalState = JSONObject(v7Consent711)
editor.putBoolean(V7_CONSENT, true)
v7LocalState.keys().forEach {
check { v7LocalState.getString(it) }?.let { v -> editor.putString(it, v) }
check { v7LocalState.getBoolean(it) }?.let { v -> editor.putBoolean(it, v) }
check { v7LocalState.getInt(it) }?.let { v -> editor.putInt(it, v) }
}
editor.apply()
}
R.id.action_save_cons_742 -> {
val editor = sp.edit()
val v7LocalState = JSONObject(v7Consent742)
editor.putBoolean(V7_CONSENT, true)
v7LocalState.keys().forEach {
check { v7LocalState.getString(it) }?.let { v -> editor.putString(it, v) }
check { v7LocalState.getBoolean(it) }?.let { v -> editor.putBoolean(it, v) }
check { v7LocalState.getInt(it) }?.let { v -> editor.putInt(it, v) }
}
editor.apply()
}
Expand Down

Large diffs are not rendered by default.

22 changes: 17 additions & 5 deletions samples/metaapp/src/main/res/menu/menu_prop_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
app:showAsAction="never"/>

<item
android:id="@+id/action_save_old_v6_consent"
android:id="@+id/action_save_old_v6_consent630"
android:icon="@drawable/ic_baseline_old_6_24"
android:title="@string/save_old_v6_consent"
android:title="Save old v6.3 consent"
app:showAsAction="never"/>

<item
android:id="@+id/action_save_old_v6_consent630"
android:id="@+id/action_save_old_v6_consent"
android:icon="@drawable/ic_baseline_old_6_24"
android:title="Save old v6.3 consent"
android:title="@string/save_old_v6_consent"
app:showAsAction="never"/>

<item
Expand All @@ -39,10 +39,22 @@
android:title="Save old v6.9 consent FINNISH"
app:showAsAction="never"/>

<item
android:id="@+id/action_save_cons_711"
android:icon="@drawable/ic_baseline_old_6_24"
android:title="Save v7.1.1"
app:showAsAction="never"/>

<item
android:id="@+id/action_save_cons_726"
android:icon="@drawable/ic_baseline_old_6_24"
android:title="Save 7.2.6"
android:title="Save v7.2.6"
app:showAsAction="never"/>

<item
android:id="@+id/action_save_cons_742"
android:icon="@drawable/ic_baseline_old_6_24"
android:title="Save v7.4.2"
app:showAsAction="never"/>

<item
Expand Down
2 changes: 1 addition & 1 deletion samples/native-message-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'

implementation 'com.sourcepoint.cmplibrary:cmplibrary:7.4.2'
implementation 'com.sourcepoint.cmplibrary:cmplibrary:7.4.3'
}
2 changes: 1 addition & 1 deletion samples/web-message-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'

implementation 'com.sourcepoint.cmplibrary:cmplibrary:7.4.2'
implementation 'com.sourcepoint.cmplibrary:cmplibrary:7.4.3'
}

0 comments on commit ca98221

Please sign in to comment.