| Index: sky/sdk/lib/mojo/activity.dart
|
| diff --git a/sky/sdk/lib/mojo/activity.dart b/sky/sdk/lib/mojo/activity.dart
|
| index 7abd84d06f95bd7bdcc1537dd14ce49b35411a36..9136494e61a71c23828a2a7b71880c7b412157d6 100644
|
| --- a/sky/sdk/lib/mojo/activity.dart
|
| +++ b/sky/sdk/lib/mojo/activity.dart
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +import 'dart:sky';
|
| import 'package:mojom/intents/intents.mojom.dart';
|
| import 'package:sky/mojo/shell.dart' as shell;
|
|
|
| @@ -17,6 +18,10 @@ ActivityManagerProxy _initActivityManager() {
|
|
|
| final ActivityManagerProxy _activityManager = _initActivityManager();
|
|
|
| +Color _cachedPrimaryColor;
|
| +String _cachedLabel;
|
| +
|
| +
|
| void finishCurrentActivity() {
|
| _activityManager.ptr.finishCurrentActivity();
|
| }
|
| @@ -24,3 +29,17 @@ void finishCurrentActivity() {
|
| void startActivity(Intent intent) {
|
| _activityManager.ptr.startActivity(intent);
|
| }
|
| +
|
| +void updateTaskDescription(String label, Color color) {
|
| + if (_cachedPrimaryColor == color && _cachedLabel == label)
|
| + return;
|
| +
|
| + _cachedPrimaryColor = color;
|
| + _cachedLabel = label;
|
| +
|
| + TaskDescription description = new TaskDescription()
|
| + ..label = label
|
| + ..primaryColor = (color != null ? color.value : null);
|
| +
|
| + _activityManager.ptr.setTaskDescription(description);
|
| +}
|
|
|