+
     Gie  c                   s    ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ^ RIH
t
 ^ RItR tR tR tR tR tR	 tR
 tR# )i    N)	IPlatform)IStatusBarServicec                 s    \         P                  P                  P                  4        \         P                  P                  P	                  4       pVP                  4       pVR ,          R8X  d   VP                  4        \         P                  P                  R,          R,           p\        P                  P                  V4      '       g   \        P                  ! V4       \        P                  ! V P                  VR,           4       \         P"                  ! V 4      pV'       d   VP%                  R4       M\&        P(                  ! R4       \        P*                  ! VR,           4       VR ,          R8X  d   VP-                  4        R# R#   \.        P0                  \2        3 d    \&        P(                  ! R4        R# i ; i)	stateFROZENZwaydroid_dataz/waydroid_tmpz	/base.apkz/data/waydroid_tmp/base.apk"Failed to access IPlatform serviceWayDroid session is stoppedN)toolshelpersipcDBusSessionServiceDBusContainerService
GetSessionUnfreezeZconfigZsession_defaultsosZpathZexistsZmakedirsshutilZcopyfilePACKAGEr    get_serviceZ
installApploggingerrorremoveFreezedbusDBusExceptionZKeyError)argscmsessionZtmp_dirplatformService   &    ./usr/lib/waydroid/tools/actions/app_manager.pyinstallr      s'   5,,.]]335--/7x'KKM,,//@?Rww~~g&&KK g&;<#//5&&'DEMM>?
		'K'(7x'IIK () 5345s    C
F AF )A#F 1GGc                 s    \         P                  P                  P                  4        \         P                  P                  P	                  4       pVP                  4       pVR ,          R8X  d   VP                  4        \        P                  ! V 4      pV'       dS   VP                  V P                  4      pV^ 8w  d0   \        P                  ! RP                  V P                  4      4       M\        P                  ! R4       VR ,          R8X  d   VP                  4        R# R#   \        P                    d    \        P                  ! R4        R# i ; i)r   r   zFailed to uninstall package: {}r   r   N)r   r   r   r	   r
   r   r   r    r   Z	removeAppr   r   r   Zformatr   r   r   )r   r   r   r   retr   r   r   r   (   s    5,,.]]335--/7x'KKM#//5!++DLL9Cax?FFt||TUMM>?7x'IIK ( 5345s   BD( BD( (+EEc                 s    \         P                  P                  P                  4         \         P                  P                  P	                  4       P                  4        T! 4        R#    \        P                  ! R 4        L#; i  \        P                   dF    \        P                  ! R4       \         P                  P                  P                  YRR7        R# i ; i)z9Failed to unfreeze container. Trying to launch anyways...zStarting waydroid sessionF)Z
backgroundN)r   r   r   r	   r
   r   r   r   r   r   ZactionsZsession_managerZstart)r   Z	launchNows   &&r   maybeLaunchLaterr   >   s    	O,,.	WMM224==? 		WMMUV O12%%++D+NOs)   (B 6A* !B *BB AC! C!c                 ,   a  V 3R  lp\        S V4       R# )c                  sd  < \         P                  ! S4      p V '       d{   V P                  R SP                  4       V P	                  SP                  4      pV P                  RR4      pVR8X  d   V P                  ^RR4       R# V P                  ^RR4       R# \        P                  ! R4       R# )waydroid.active_appspersist.waydroid.multi_windowsfalsepolicy_controlimmersive.status=*immersive.full=*r   N)	r    r   setpropr   Z	launchAppgetpropsettingsPutStringr   r   )r   r   multiwinr   s      r   
justLaunchZlaunch.<locals>.justLaunchK   s    #//5##$:DLLI!++DLL9C&..0';H7"11')=?  11');= MM>?    Nr   r   r+      f r   launchr0   J   s    @ T:&r,   c                 s    \         P                  P                  P                  4        \         P                  P                  P	                  4       pVP                  4       pVR ,          R8X  d   VP                  4        \        P                  ! V 4      pV'       dz   VP                  4       pV Fb  p\        RVR,          ,           4       \        RVR,          ,           4       \        R4       VR,           F  p\        RV,           4       K  	  Kd  	  M\        P                  ! R	4       VR ,          R8X  d   VP                  4        R# R#   \        P                   d    \        P                  ! R
4        R# i ; i)r   r   zName: ZnamezpackageName: ZpackageNamezcategories:Z
categoriesZ	r   r   N)r   r   r   r	   r
   r   r   r    r   ZgetAppsInfoZprintr   r   r   r   r   )r   r   r   r   ZappsListZappZcats   &      r   listr1   \   s   5,,.]]335--/7x'KKM#//5&224HhV,-oM(::;m$|,,C$*% -	   MM>?7x'IIK ( 5345s   BE B-E +E>=E>c                 r    )c                  sj  < \         P                  ! S4      p V '       d~   V P                  R R4       V P                  ^RR4       \        P                  ! S4      pV'       d9   VP                  4        \        P                  ! R4       VP                  4        R# R# \        P                  ! R4       R# )r!   Waydroidr$   znull*g      ?r   N)r    r   r'   r)   r   ZexpandtimeZsleepZcollapser   r   )r   ZstatusBarServicer   s     r   justShowZshowFullUI.<locals>.justShoww   s    #//5##$:JG--a1A7K0<<TB '')

3 ))+  
 MM>?r,   Nr-   )r   r4   r/   r   
showFullUIr5   v   s    @ T8$r,   c                 r    )c                  s  < \         P                  ! S4      p V '       d   V P                  SP                  SP                  4      pVR 8X  d   R# VR8w  d   TMRpV P                  RV4       V P                  RR4      pVR8X  d   V P                  ^RR4       R# V P                  ^RR	4       R# \        P                  ! R
4       R# )Z NZandroidr2   r!   r"   r#   r$   r%   r&   r   )
r    r   ZlaunchIntentZACTIONZURIr'   r(   r)   r   r   )r   r   Zpkgr*   r   s       r   r+   Zintent.<locals>.justLaunch   s    #//5!..t{{DHHECby	)#zC##$:C@&..0';H7"11')=?  11');= MM>?r,   Nr-   r.   r/   r   intentr6      s    @$ T:&r,   )r   r   r   r3   Ztools.configr   Ztools.helpers.propsZtools.helpers.ipcZtools.interfacesr    r   r   r   r   r   r0   r1   r5   r6   ) r,   r   <module>r7      sI     	      & . 545,
O'$54% 'r,   