Merge "Use correct timebase in fg service notifications." into oc-dev
am: 630e7841e5
Change-Id: I3493f13c16b24d343f61e80d70f37cf62d6b8ee2
This commit is contained in:
@@ -813,7 +813,8 @@ public final class ActiveServices {
|
|||||||
String title;
|
String title;
|
||||||
String msg;
|
String msg;
|
||||||
String[] pkgs;
|
String[] pkgs;
|
||||||
long oldestStartTime = System.currentTimeMillis(); // now
|
final long nowElapsed = SystemClock.elapsedRealtime();
|
||||||
|
long oldestStartTime = nowElapsed;
|
||||||
if (active.size() == 1) {
|
if (active.size() == 1) {
|
||||||
intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||||
intent.setData(Uri.fromParts("package", active.get(0).mPackageName, null));
|
intent.setData(Uri.fromParts("package", active.get(0).mPackageName, null));
|
||||||
@@ -846,8 +847,8 @@ public final class ActiveServices {
|
|||||||
.addExtras(notificationBundle)
|
.addExtras(notificationBundle)
|
||||||
.setSmallIcon(R.drawable.stat_sys_vitals)
|
.setSmallIcon(R.drawable.stat_sys_vitals)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setShowWhen(oldestStartTime > 0)
|
.setShowWhen(oldestStartTime < nowElapsed)
|
||||||
.setWhen(oldestStartTime)
|
.setWhen(System.currentTimeMillis() - (nowElapsed - oldestStartTime))
|
||||||
.setColor(context.getColor(
|
.setColor(context.getColor(
|
||||||
com.android.internal.R.color.system_notification_accent_color))
|
com.android.internal.R.color.system_notification_accent_color))
|
||||||
.setContentTitle(title)
|
.setContentTitle(title)
|
||||||
|
|||||||
Reference in New Issue
Block a user