14 New, 1 Updated patches
[webos-internals:imagineer1981s-modifications.git] / app-launcher / app-launcher-launcher-auto-popup.patch
1 diff --git a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
2 index 6cb3941..c321afd 100644
3 --- a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
4 +++ b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
5 @@ -67,6 +67,10 @@ var BarAssistant = Class.create({
6                 this.storageInit();
7                 
8                 //Initialize and Subscribe for Power Off Notification.
9 +               this.controller.serviceRequest('palm://com.palm.systemmanager', {
10 +                       method: 'systemUi',
11 +                       parameters: {launcher:true}
12 +               });
13                 this.powerOffInit();
14                 
15                 //Subscribe to Powerd Notification.
16 @@ -2476,6 +2480,22 @@ powerOffInit: function() {
17                 },
18                 onSuccess: this.powerOffHandleNotifications.bind(this)
19         });
20 +    this.displayChanged = this.controller.serviceRequest('palm://com.palm.display/control', {
21 +               method:'status',
22 +               parameters:{
23 +                       subscribe:true
24 +               },
25 +               onSuccess: function(response) {
26 +                       if(response && response.event) {
27 +                               if(response.event=="displayOn" && this.foregroundAppID==null) {
28 +                                       this.controller.serviceRequest('palm://com.palm.systemmanager', {
29 +                                               method: 'systemUi',
30 +                                               parameters: {launcher:true}
31 +                                       });
32 +                               }
33 +                       }
34 +               }.bind(this)
35 +       });
36  },
37  
38