commit | 2341e5b09f81ebb9704a59946036374b52222f72 | [log] [tgz] |
---|---|---|
author | vadimt <vadimt@google.com> | Thu Feb 07 16:04:47 2019 -0800 |
committer | Hyunyoung Song <hyunyoungs@google.com> | Thu Feb 07 17:18:12 2019 -0800 |
tree | 4be3227a095c083111977cad36b5d6bfa9f5cdeb | |
parent | fa8df691d12f99543bc760ae74a0e3f6125369b0 [diff] |
Not using reflection for app-usage API Plus, avoiding cross-user calls (pausing work profile apps is not supported anyways). Bug: 118319143 Test: Manual Change-Id: I219f48b24e56ccc359384ff072d9aa57c545925f
diff --git a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java index 4e8bbe6..0b20c3f 100644 --- a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java +++ b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
@@ -80,6 +80,12 @@ public void initialize(Task task, InitializeCallback callback) { mTask = task; + + if (task.key.userId != UserHandle.myUserId()) { + callback.call(1, task.titleDescription); + return; + } + Utilities.THREAD_POOL_EXECUTOR.execute(() -> { final AppUsageLimit usageLimit = mLauncherApps.getAppUsageLimit( task.getTopComponent().getPackageName(),