aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2019-08-08 16:32:50 +0800
committerMichael Bestas <mkbestas@lineageos.org>2019-08-20 17:17:28 +0200
commit63a590625c6c76f82e5ef43408a52238b2b34e43 (patch)
tree4f15fc398ef41805c0b638249e6095cc52b4ba05
parent62885acacaf46c8455b5516e2b0e7d70d67b13da (diff)
downloadlineage-sdk-63a590625c6c76f82e5ef43408a52238b2b34e43.tar.gz
lineage-sdk-63a590625c6c76f82e5ef43408a52238b2b34e43.tar.bz2
lineage-sdk-63a590625c6c76f82e5ef43408a52238b2b34e43.zip
LiveDisplayService: Notify SystemUI after initialization finished
Change-Id: Id01eeee3bdfc599bdc20a5779db3d002fa4bc1c9
-rw-r--r--lineage/lib/main/java/org/lineageos/platform/internal/display/LiveDisplayService.java4
-rw-r--r--lineage/res/AndroidManifest.xml1
-rw-r--r--sdk/src/java/lineageos/content/Intent.java7
3 files changed, 12 insertions, 0 deletions
diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/display/LiveDisplayService.java b/lineage/lib/main/java/org/lineageos/platform/internal/display/LiveDisplayService.java
index 48d8725e..a8b98cd4 100644
--- a/lineage/lib/main/java/org/lineageos/platform/internal/display/LiveDisplayService.java
+++ b/lineage/lib/main/java/org/lineageos/platform/internal/display/LiveDisplayService.java
@@ -217,6 +217,10 @@ public class LiveDisplayService extends LineageSystemService {
}
updateFeatures(ALL_CHANGED);
+
+ Intent intent = new Intent(lineageos.content.Intent.ACTION_INITIALIZE_LIVEDISPLAY);
+ intent.setPackage("com.android.systemui");
+ mContext.sendBroadcastAsUser(intent, UserHandle.SYSTEM);
}
}
diff --git a/lineage/res/AndroidManifest.xml b/lineage/res/AndroidManifest.xml
index ed70182d..e6ec86d2 100644
--- a/lineage/res/AndroidManifest.xml
+++ b/lineage/res/AndroidManifest.xml
@@ -24,6 +24,7 @@
<protected-broadcast android:name="lineageos.intent.action.SCREEN_CAMERA_GESTURE" />
<protected-broadcast android:name="lineageos.intent.action.INITIALIZE_LINEAGE_HARDWARE" />
+ <protected-broadcast android:name="lineageos.intent.action.INITIALIZE_LIVEDISPLAY" />
<protected-broadcast android:name="lineageos.intent.action.ACTION_AUDIO_SESSIONS_CHANGED" />
<protected-broadcast android:name="lineageos.platform.intent.action.PROFILE_SELECTED" />
diff --git a/sdk/src/java/lineageos/content/Intent.java b/sdk/src/java/lineageos/content/Intent.java
index fa4eeb66..ad6296ec 100644
--- a/sdk/src/java/lineageos/content/Intent.java
+++ b/sdk/src/java/lineageos/content/Intent.java
@@ -113,4 +113,11 @@ public class Intent {
*/
public static final String ACTION_UPDATE_POWER_MENU =
"lineageos.intent.action.UPDATE_POWER_MENU";
+
+ /**
+ * Broadcast action: notify SystemUI that LiveDisplay service has finished initialization.
+ * @hide
+ */
+ public static final String ACTION_INITIALIZE_LIVEDISPLAY =
+ "lineageos.intent.action.INITIALIZE_LIVEDISPLAY";
}