+
     Gi  c                   s    ^ RI t ^ RIt^ RIHt  ^ RItRtRs
R tR tR#   ] d%   t] P                  ! ]	! ]4      4       Rt RtAL0RtAii ; i)i    N)
IClipboardTFc                 s   a aa R  oR oV VV3R lp\         '       d;   Rs\        P                  ! VR7      S n        S P                  P                  4        R# \        P                  ! R4       R# )c                 s     \         P                  ! V 4       R #   \         d+   p\        P                  ! \        T4      4        R p?R # R p?ii ; iN)pyclipZcopy	Exceptionloggingdebugstr)Zvaluees   & 5/usr/lib/waydroid/tools/services/clipboard_manager.pysendClipboardDataZ start.<locals>.sendClipboardData   s6    	"KK 	"MM#a&!!	"s    AA

Ac                  s     \         P                  ! 4       #   \         d+   p \        P                  ! \        T 4      4        R p ? R# R p ? ii ; i)NZ )r   Zpaster   r   r   r   )r   s    r   getClipboardDataZstart.<locals>.getClipboardData   s9    	"<<>! 	"MM#a&!!	"s    AAAc                  sT   < \         '       g   \        P                  ! S SS4       K&  R # r   )stoppingr    Zadd_service)argsr
   r	   s   r   service_threadZstart.<locals>.service_thread   s!    (""4):<LM     F)ZtargetzDSkipping clipboard manager service because of missing pyclip packageN)canClipr   	threadingZThreadZclipboard_managerstartr   r   )r   r   r
   r	   s   f @@r   r   r      sQ    "N w!*!1!1!H$$&\]r   c                 s    R s  V P                  '       d   V P                  P                  4        R# R#   \         d    \        P
                  ! R4        R# i ; i)Tz%Clipboard service is not even startedN)r   ZclipboardLoopZquitZAttributeErrorr   r   )r   s   &r   stopr   *   sK    H?##%  ?=>?s   4 4 !AA)r   r   Ztools.interfacesr    r   r   r   r   r   r   r   r   r   ) r   r   <module>r      sW      'G
 ^4?A  MM#a&Gs     AAA