mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-20 09:58:28 +00:00
Prevent crash clinking on link if no browser is installed on device
This commit is contained in:
parent
cb1e8ecc01
commit
08ce2783a4
5 changed files with 45 additions and 0 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.ui.assistant.fragment
|
package org.linphone.ui.assistant.fragment
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
|
@ -110,6 +111,10 @@ class LandingFragment : GenericFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -213,6 +218,10 @@ class LandingFragment : GenericFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -227,6 +236,10 @@ class LandingFragment : GenericFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.ui.assistant.fragment
|
package org.linphone.ui.assistant.fragment
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
|
@ -108,6 +109,10 @@ class RegisterFragment : GenericFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.ui.assistant.fragment
|
package org.linphone.ui.assistant.fragment
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
|
@ -67,6 +68,10 @@ class ThirdPartySipAccountWarningFragment : GenericFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.ui.main.fragment
|
package org.linphone.ui.main.fragment
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
|
|
@ -152,6 +153,10 @@ class DrawerMenuFragment : GenericMainFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$link], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$link], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$link], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
package org.linphone.ui.main.help.fragment
|
package org.linphone.ui.main.help.fragment
|
||||||
|
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
|
@ -84,6 +85,10 @@ class HelpFragment : GenericMainFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,6 +101,10 @@ class HelpFragment : GenericMainFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,6 +117,10 @@ class HelpFragment : GenericMainFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,6 +176,10 @@ class HelpFragment : GenericMainFragment() {
|
||||||
Log.e(
|
Log.e(
|
||||||
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], IllegalStateException: $ise"
|
||||||
)
|
)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
Log.e(
|
||||||
|
"$TAG Can't start ACTION_VIEW intent for URL [$url], ActivityNotFoundException: $anfe"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue