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

View File

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