Skip to content

MainActivity: PiP の遅延投稿を削除し直接呼び出して例外をハンドル - #6079

Merged
TinyKitten merged 1 commit into
devfrom
feature/pip-enter-directly
May 29, 2026
Merged

TinyKitten merged 1 commit into
devfrom
feature/pip-enter-directly

Conversation

@TinyKitten

@TinyKitten TinyKitten commented May 29, 2026 •

Copy link
Copy Markdown
Member

概要

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • android/app/src/main/java/me/tinykitten/trainlcd/MainActivity.kt で PiP の遅延投稿を削除し、enterPictureInPictureMode 呼び出しを直接行って IllegalStateException をハンドルするよう変更

テスト

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

関連Issue

#6035

スクリーンショット(任意)

@TinyKitten TinyKitten self-assigned this May 29, 2026
@coderabbitai

coderabbitai Bot commented May 29, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

MainActivity の Picture-in-Picture 進入処理を最適化し、Handler/Looper による 120ms 遅延実行を削除。onUserLeaveHint で enterPictureInPictureMode を即座に実行し、成功失敗に応じて適切にコールバックを通知します。

Changes

PiP即座進入の実装

Layer / File(s) Summary
PiP遅延実行の削除と即時実行への切り替え
android/app/src/main/java/me/tinykitten/trainlcd/MainActivity.kt
Handler と Looper のインポート、pictureInPictureHandler プロパティを削除。onUserLeaveHint 内の postDelayed をなくし、enterPictureInPictureMode(params) を直接 try-catch ブロック内で即座実行、成功失敗時に PictureInPictureModule.emitPictureInPictureModeChanged(...) を呼び出します。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Poem

🐰 遅延のしがらみ外して
ハンドラさようなら、Looperもバイバイ✨
Picture-in-Picture、今ここに即座に参上🎬
スムーズに切り替わる喜びよ 🎞️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PullRequest のタイトルは変更内容の核となる PiP 遅延投稿削除と直接呼び出しに対応しており、具体的かつ明確です。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed PR説明は必須セクションをほぼ完全に記入していますが、「概要」セクションが空のままになっています。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • ✅ Generated successfully - (🔄 Check to regenerate)
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/pip-enter-directly

Comment @coderabbitai help to get the list of available commands and usage tips.

@TinyKitten
TinyKitten merged commit 0d130a7 into dev May 29, 2026
4 checks passed
@TinyKitten
TinyKitten deleted the feature/pip-enter-directly branch May 29, 2026 06:05
@coderabbitai

coderabbitai Bot commented May 29, 2026 •

Copy link
Copy Markdown
Contributor

Note

Docstrings generation - SUCCESS
Generated docstrings for this pull request at #6083

coderabbitai Bot added a commit that referenced this pull request May 29, 2026
Docstrings generation was requested by @TinyKitten.

* #6079 (comment)

The following files were modified:

* `android/app/src/main/java/me/tinykitten/trainlcd/MainActivity.kt`
TinyKitten pushed a commit that referenced this pull request May 29, 2026
Docstrings generation was requested by @TinyKitten.

* #6079 (comment)

The following files were modified:

* `android/app/src/main/java/me/tinykitten/trainlcd/MainActivity.kt`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant