+
     GiH  c                   sZ    ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	t	Rs
. tR tR tR# )i    N)INotifications)GLibFc                 s  a aaa	a
aaa VR ,          pV	3R loV	V3R loV3R lo
V3R loV3R lpV	V3R lpV VV
V3R lp \         P                  ! \         P                  ! 4       P                  RR	4      R4      o. o	\        4       o\        P                  SP                  RT4      4       \        P                  SP                  RT4      4       Rs\        P                  ! TR7      S n        S P                  P!                  4        R#   \         P                   d,   p\
        P                  ! R
\        T4      4        Rp?R# Rp?ii ; i)waydroid_datac                 s*   < SP                  V 4       R # N)remove)listener	listenerss   &8/usr/lib/waydroid/tools/services/notification_manager.pyonListenerDeathZstart.<locals>.onListenerDeath   s    "    c                 sL   < V P                  S4       SP                  V 4       R # r   )ZaddDeathHandlerappend)r   r   r   s   &r   registerListenerZstart.<locals>.registerListener   s      1"r	   c                 s  < R pV UUu. uF"  qP                   VP                  3 F  qNK  	  K$  	  pppRRV 2R\        P                  P	                  V
4      R\        P                  P	                  V4      R\        P                  P                  V4      R\        P                  P	                  V4      /pV'       d   VVR&   V'       d   \        P                  P                  VP                  VP                  VP                  VP                  ^VP                  '       d   ^M^\        P                  P                  VP                  RR	7      .4      VR
&    SP                  WWVVVV	4      # u uppi   \        P                   d4   p\        P                   ! RT 24       \"        P$                  u Rp?# Rp?ii ; i)Z zdesktop-entryz	waydroid.resident	transienturgencyzsuppress-soundcategoryZy)Z	signaturez
image-datazFailed to post notification: N)ZidZlabeldbusZtypesZBooleanZByteZStructZwidthZheightZ	rowstrideZ	has_alphaZArrayZdataZNotifyDBusExceptionloggingwarningr    ZID_NONE)Zreplaces_idZapp_nameZpackage_nameZsummaryZbodyZactionsZ
image_datar   Zsuppress_soundZexpire_timeoutr   r   r   Zapp_iconZactionZsZactions_flatZhintse
dbus_proxys   &&&&&&&&&&&&&      r   notifyZstart.<locals>.notify   sv   
 (/Sf))V\\9RA9RSy7

**84++I6tzzw/djj00@
  (E*"&**"3"3  !!$$$$)))q

  c B5 #E,	*$$XHtUachjxyy+ T, !! 	*OO;A3?@!)))	*s#   (E1E7 7F?(F:4F?:F?c                 s   <  SP                  V 4       R#   \        P                   d%   p\        P                  ! R T 24        Rp?R# Rp?ii ; i)zFailed to close notification: N)ZCloseNotificationr   r   r   r   )notification_idr   r   s   & r   closeNotificationZ start.<locals>.closeNotification8   sF    	B((9!! 	BOO<QC@AA	Bs    AA

Ac                 s6   < \        V4      S\        V 4      &   R # r   )strint)r   tokenpending_tokenss   &&r   onActivationTokenZ start.<locals>.onActivationToken>   s    /25zs?+,r	   c                 s   < SP                  \        V 4      4      pS F1  pVP                  \        V 4      \        V4      \        V4      4       K3  	  R # r   )Zpopr   onActionInvokedr   )r   Z	action_idr   r   r   r   s   &&  r   r   Zstart.<locals>.onActionInvokedA   sA    ""3#78!H$$S%93y>3u:V "r	   c                  sV   < \         '       g   \        P                  ! S SSS4       K'  R # r   )stoppingr    Zadd_service)argsr   r   r   s   r   service_threadZstart.<locals>.service_threadF   s#    (&&t-=vGXY r	   zorg.freedesktop.Notificationsz/org/freedesktop/NotificationszbSkipping notification manager service because we could not connect to the notifications server: %sNZActivationTokenZActionInvokedF)Ztarget)r   Z	InterfaceZ
SessionBusZ
get_objectr   r   Zinfor   Zdictbus_signalsr
   Zconnect_to_signalr   	threadingZThreadZnotification_managerstart)r    Zsessionr   r   r   r!   r   r   r   r   r   r   r   r   s   f&     @@@@@@@r   r$   r$      s   O,M##*@B:W
Z Z^^DOO$5$@$@A`  cC  %D$CE
 IVNz334EGXYZz33O_UV H ) 0 0 GD##%  y{~  @A  |B  	Cs   :D E! EEc                 s    R s \         F  pVP                  4        K  	   V P                  '       d   V P                  P	                  4        R# R#   \
         d    \        P                  ! R4        R# i ; i)Tz/NotificationManager service is not even startedN)r   r"   r   ZnotificationLoopZquitZAttributeErrorr   Zdebug)r    Zsignals   & r   stopr%   [   sa    H I   !!&&( ! IGHIs   A A !A65A6)r   Zosr#   Ztools.configZtoolsZtools.interfacesr    Zgi.repositoryr   r   r   r"   r$   r%   ) r	   r   <module>r&      s3     	   +  K&Z	Ir	   