Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
DaVinci9196 committed Sep 2, 2024
1 parent 31665ef commit 4961012
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import okio.ByteString.Companion.decodeHex
import org.microg.gms.appinvite.*
import org.microg.gms.common.Constants
import org.microg.gms.utils.singleInstanceOf
import org.microg.gms.utils.toBase64
import java.util.*

private const val TAG = "AppInviteActivity"
Expand Down Expand Up @@ -73,12 +72,10 @@ class AppInviteActivity : AppCompatActivity() {
}

private fun open(appInviteLink: MutateAppInviteLinkResponse) {
Log.d(TAG, "open: $appInviteLink")
val dynamicLinkData = DynamicLinkData(appInviteLink.metadata?.info?.url, appInviteLink.data_?.intentData,
(appInviteLink.data_?.app?.minAppVersion ?: 0).toInt(), System.currentTimeMillis(), null, null)
Log.d(TAG, "open dynamicLinkData: $dynamicLinkData")
val intent = Intent(Intent.ACTION_VIEW).apply {
addCategory(Intent.CATEGORY_LAUNCHER)
addCategory(Intent.CATEGORY_DEFAULT)
data = appInviteLink.data_?.intentData?.let { Uri.parse(it) }
`package` = appInviteLink.data_?.packageName
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
Expand All @@ -105,7 +102,7 @@ class AppInviteActivity : AppCompatActivity() {
if (installedVersionCode != null && (appInviteLink.data_?.app?.minAppVersion == null || installedVersionCode >= appInviteLink.data_.app.minAppVersion)) {
val componentName = intent.resolveActivity(packageManager)
if (componentName == null) {
Log.d(TAG, "open resolve activity is null")
Log.w(TAG, "open resolve activity is null")
if (appInviteLink.data_?.packageName != null) {
val intentLaunch =
packageManager.getLaunchIntentForPackage(appInviteLink.data_.packageName)
Expand Down

0 comments on commit 4961012

Please sign in to comment.