mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
OPENIDE #83 Fix DataSharing policy (the first thing that meets the user)
(cherry picked from commit 172f6f84ec15413460cd40f65df064c6d9526ec5) (cherry picked from commite99734f547) (cherry picked from commit9c99ee035e) (cherry picked from commit17515b3092) (cherry picked from commite41d2a7062)
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.platform.ide.bootstrap
|
||||
|
||||
import com.intellij.ide.gdpr.ConsentOptions
|
||||
import com.intellij.ide.gdpr.EndUserAgreement
|
||||
import com.intellij.ide.gdpr.showDataSharingAgreement
|
||||
import com.intellij.ide.gdpr.showEndUserAndDataSharingAgreements
|
||||
import com.intellij.ide.gdpr.*
|
||||
import com.intellij.idea.AppMode
|
||||
import com.intellij.openapi.application.ex.ApplicationInfoEx
|
||||
import com.intellij.platform.diagnostic.telemetry.impl.span
|
||||
@@ -86,7 +83,7 @@ internal suspend fun prepareShowEuaIfNeededTask(
|
||||
if (ConsentOptions.needToShowUsageStatsConsent()) {
|
||||
return {
|
||||
prepareAndExecuteInEdt {
|
||||
showDataSharingAgreement()
|
||||
acceptOpenIdeDataSharingAgreement()
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) Haulmont 2025. All Rights Reserved.
|
||||
// Use is subject to license terms.
|
||||
package com.intellij.ide.gdpr
|
||||
|
||||
import com.intellij.ui.AppUIUtil
|
||||
|
||||
fun acceptOpenIdeDataSharingAgreement() {
|
||||
val dataSharingConsent = ConsentOptions.getInstance().getConsents(ConsentOptions.condUsageStatsConsent()).first[0]
|
||||
AppUIUtil.saveConsents(listOf(dataSharingConsent.derive(true)))
|
||||
}
|
||||
Reference in New Issue
Block a user