Skip to content

Commit

Permalink
Disallow screen capture on identity cookies dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
FooIbar authored and xb2016 committed May 3, 2024
1 parent 0d95ce8 commit 05240b6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import android.content.Context
import android.content.DialogInterface
import android.text.Html
import android.util.AttributeSet
import android.view.WindowManager
import androidx.appcompat.app.AlertDialog
import androidx.lifecycle.lifecycleScope
import com.hippo.ehviewer.R
Expand Down Expand Up @@ -106,4 +107,9 @@ class AccountPreference @JvmOverloads constructor(
mActivity.showTip(R.string.settings_eh_account_sign_out_tip, BaseScene.LENGTH_SHORT)
}
}

override fun onDialogCreated(dialog: AlertDialog?) {
super.onDialogCreated(dialog)
dialog!!.window!!.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
}

0 comments on commit 05240b6

Please sign in to comment.