diff options
| author | 2024-01-10 14:56:56 +0000 | |
|---|---|---|
| committer | 2024-01-10 16:45:04 +0000 | |
| commit | 8cb143f2cb45ed98f186c453376b467b77bb3943 (patch) | |
| tree | 166561e815e518fe90177208caada2bca271e292 | |
| parent | 63fc2f79671f890e682918068c5c19c1ec47db51 (diff) | |
Exposing dream service activity to embed home control panel
Test: TBT
Flag: ACONFIG FLAG_HOME_PANEL_DREAM DEVELOPMENT
Change-Id: I359955ddad4f7b2ea9a36574a7282a06bfbc5e68
| -rw-r--r-- | core/java/android/service/dreams/DreamService.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java index 7d9c0a37a13f..2d657c2813a5 100644 --- a/core/java/android/service/dreams/DreamService.java +++ b/core/java/android/service/dreams/DreamService.java @@ -445,6 +445,19 @@ public class DreamService extends Service implements Window.Callback { } /** + * Retrieves the current {@link android.app.Activity} associated with the dream. + * This method behaves similarly to calling {@link android.app.Activity#getActivity()}. + * + * @return The current activity, or null if the dream is not associated with an activity + * or not started. + * + * @hide + */ + public Activity getActivity() { + return mActivity; + } + + /** * Inflates a layout resource and set it to be the content view for this Dream. * Behaves similarly to {@link android.app.Activity#setContentView(int)}. * |