summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author dooyoung.hwang <dooyoung.hwang@lge.com> 2016-09-09 21:52:16 +0000
committer android-build-merger <android-build-merger@google.com> 2016-09-09 21:52:16 +0000
commitda9a9da520a2c59c5e3462e81bf6b053406bbea1 (patch)
treeb0627210d07cca67ab68cc29388e48b198d66f43
parent88c21d596a00f2c17c811a43c010dfe3ad843026 (diff)
parent5379f47d85105df971701dc92b6f69e348c85c49 (diff)
Merge "Fix issue that Overview key doesn't work at secondary user"
am: 5379f47d85 Change-Id: Ieaf3e7261e88f62cbbf748eb9ff94d03711f05c0
-rw-r--r--packages/SystemUI/src/com/android/systemui/SystemUIApplication.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index 39a341216f2c..9df5690d9534 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -16,11 +16,13 @@
package com.android.systemui;
+import android.app.ActivityThread;
import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
import android.content.res.Configuration;
import android.os.Process;
import android.os.SystemProperties;
@@ -105,6 +107,13 @@ public class SystemUIApplication extends Application {
}
}, filter);
} else {
+ // We don't need to startServices for sub-process that is doing some tasks.
+ // (screenshots, sweetsweetdesserts or tuner ..)
+ String processName = ActivityThread.currentProcessName();
+ ApplicationInfo info = getApplicationInfo();
+ if (processName != null && processName.startsWith(info.processName + ":")) {
+ return;
+ }
// For a secondary user, boot-completed will never be called because it has already
// been broadcasted on startup for the primary SystemUI process. Instead, for
// components which require the SystemUI component to be initialized per-user, we