AppOpenerのログ出力の追加

This commit is contained in:
tateisu 2020-12-07 22:06:25 +09:00
parent 17f11fd196
commit 76ae05d006
2 changed files with 95 additions and 95 deletions

View File

@ -11,7 +11,7 @@ fun getNotestockStatuses(root: JsonObject): JsonArray? =
root["statuses"].cast() root["statuses"].cast()
// notestock の検索結果からmax_dtを抽出します。 // notestock の検索結果からmax_dtを抽出します。
// 次ページがない場合はnullを返します。 // データがない場合はnullを返します。
fun getNotestockMaxDt(root: JsonObject)= fun getNotestockMaxDt(root: JsonObject)=
root.jsonArray("statuses") root.jsonArray("statuses")
?.mapNotNull{ it.cast<JsonObject>()?.string("published")} ?.mapNotNull{ it.cast<JsonObject>()?.string("published")}

View File

@ -130,6 +130,7 @@ fun Activity.openCustomTab(url: String?) {
.setShowTitle(true) .setShowTitle(true)
.build() .build()
.let { .let {
log.w("startCustomTabIntent ComponentName=$cn")
startActivityExcludeMyApp( startActivityExcludeMyApp(
it.intent.also { intent -> it.intent.also { intent ->
if (cn != null) intent.component = cn if (cn != null) intent.component = cn
@ -154,7 +155,6 @@ fun Activity.openCustomTab(url: String?) {
// Chromeがないようなのでcomponent指定なしでリトライ // Chromeがないようなのでcomponent指定なしでリトライ
if (startCustomTabIntent(null)) return if (startCustomTabIntent(null)) return
showToast(true, "the browser app is not installed.") showToast(true, "the browser app is not installed.")
} catch (ex: Throwable) { } catch (ex: Throwable) {
@ -323,7 +323,7 @@ fun openCustomTab(
activity.openCustomTab(url) activity.openCustomTab(url)
} catch (ex: Throwable) { } catch (ex: Throwable) {
// warning.trace( ex ); log.trace(ex)
log.e(ex, "openCustomTab failed. $url") log.e(ex, "openCustomTab failed. $url")
} }
} }