@@ -14,6 +14,7 @@ import android.os.Bundle;
 
		
	
		
			
				import   android.provider.MediaStore ;  
		
	
		
			
				import   android.view.View ;  
		
	
		
			
				import   android.widget.ImageView ;  
		
	
		
			
				import   android.widget.RelativeLayout ;  
		
	
		
			
				import   androidx.core.app.ActivityCompat ;  
		
	
		
			
				import   androidx.core.content.ContextCompat ;  
		
	
		
			
				import   cc.winboll.studio.libaes.views.AToolbar ;  
		
	
	
		
			
				
					
					
						
					 
				
			
			@@ -32,10 +33,8 @@ import java.io.FileNotFoundException;
 
		
	
		
			
				import   java.io.FileOutputStream ;  
		
	
		
			
				import   java.io.IOException ;  
		
	
		
			
				import   java.io.OutputStream ;  
		
	
		
			
				import   android.service.quickaccesswallet.GetWalletCardsError ;  
		
	
		
			
				import   android.widget.RelativeLayout ;  
		
	
		
			
				 
		
	
		
			
				public   class  BackgroundPictureActivity   extends   Activity   implements   BackgroundPicturePreviewDialog . IOnRecivedPictureListener   {  
		
	
		
			
				public   class  BackgroundPictureActivity   extends   WinBoLL Activity  implements   BackgroundPicturePreviewDialog . IOnRecivedPictureListener   {  
		
	
		
			
				 
		
	
		
			
				     public   static   final   String   TAG   =   " BackgroundPictureActivity " ;  
		
	
		
			
				     public   BackgroundPictureUtils   mBackgroundPictureUtils ;  
		
	
	
		
			
				
					
					
						
					 
				
			
			@@ -60,6 +59,16 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 
		
	
		
			
				     private   int   mnPictureCompress   =   100 ;  
		
	
		
			
				     private   static   String   _RecivedPictureFileName ;  
		
	
		
			
				 
		
	
		
			
					 @Override  
		
	
		
			
					 public   Activity   getActivity ( )   {  
		
	
		
			
						 return   this ;  
		
	
		
			
					 }  
		
	
		
			
				 
		
	
		
			
					 @Override  
		
	
		
			
					 public   String   getTag ( )   {  
		
	
		
			
						 return   TAG ;  
		
	
		
			
					 }  
		
	
		
			
				 
		
	
		
			
				     @Override  
		
	
		
			
				     protected   void   onCreate ( Bundle   savedInstanceState )   {  
		
	
		
			
				         super . onCreate ( savedInstanceState ) ;  
		
	
	
		
			
				
					
					
						
					 
				
			
			@@ -106,7 +115,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 
		
	
		
			
				         findViewById ( R . id . activitybackgroundpictureAButton6 ) . setOnClickListener ( onCropFreePictureClickListener ) ;  
		
	
		
			
						 findViewById ( R . id . activitybackgroundpictureAButton7 ) . setOnClickListener ( onPixelPickerClickListener ) ;  
		
	
		
			
						 findViewById ( R . id . activitybackgroundpictureAButton8 ) . setOnClickListener ( onCleanPixelClickListener ) ;  
		
	
		
			
						  
		
	
		
			
				 
		
	
		
			
				         updatePreviewBackground ( ) ;  
		
	
		
			
				 
		
	
		
			
				         // 处理分享的图片  
		
	
	
		
			
				
					
					
						
					 
				
			
			@@ -161,7 +170,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 
		
	
		
			
				                     //drawable.setAlpha(120);  
		
	
		
			
				                     ivPreviewBackground . setImageDrawable ( drawable ) ;  
		
	
		
			
				                 }  
		
	
		
			
				                 . show ( " 背景图片已更新 " )  
		
	
		
			
				                 // ToastUtils.show("背景图片已更新") ; 
		
	
		
			
				             }   catch   ( IOException   e )   {  
		
	
		
			
				                 LogUtils . d ( TAG ,   e ,   Thread . currentThread ( ) . getStackTrace ( ) ) ;  
		
	
		
			
				                 ToastUtils . show ( " 背景图片加载失败 " ) ;  
		
	
	
		
			
				
					
					
						
					 
				
			
			@@ -255,7 +264,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 
		
	
		
			
				             updatePreviewBackground ( ) ;  
		
	
		
			
				         }  
		
	
		
			
				     } ;  
		
	
		
			
					  
		
	
		
			
				 
		
	
		
			
					 private   View . OnClickListener   onPixelPickerClickListener   =   new   View . OnClickListener ( )   {  
		
	
		
			
				         @Override  
		
	
		
			
				         public   void   onClick ( View   v )   {  
		
	
	
		
			
				
					
					
						
					 
				
			
			@@ -264,11 +273,11 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 
		
	
		
			
							 String   imagePath   =   mfRecivedCropPicture . toString ( ) ;  
		
	
		
			
							 Intent   intent   =   new   Intent ( getApplicationContext ( ) ,   PixelPickerActivity . class ) ;  
		
	
		
			
							 intent . putExtra ( " imagePath " ,   imagePath ) ;  
		
	
		
			
							 // startActivity( intent) ; 
		
	
		
			
				             App . ( ) . ( getApplicationContext ( ) ,   intent ,   . class )  
		
	
		
			
							 ( )  
		
	
		
			
				             //App. getWinBoLLActivityManager(). startWinBoLLActivity(getActivity(), intent,  PixelPickerActivity.class) ; 
		
	
		
			
				         }  
		
	
		
			
				     } ;  
		
	
		
			
					  
		
	
		
			
				 
		
	
		
			
					 private   View . OnClickListener   onCleanPixelClickListener   =   new   View . OnClickListener ( )   {  
		
	
		
			
				         @Override  
		
	
		
			
				         public   void   onClick ( View   v )   {  
		
	
	
		
			
				
					
					
						
					 
				
			
			@@ -520,11 +529,11 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 
		
	
		
			
				                 LogUtils . e ( TAG ,   " 剪裁保存异常 "   +   e ) ;  
		
	
		
			
				                 ToastUtils . show ( " 保存失败: "   +   e . getMessage ( ) ) ;  
		
	
		
			
				             } /* finally {  
		
	
		
			
				                 // 安全删除临时文件 
		
	
		
			
				                 if (mfTempCropPicture.exists()) { 
		
	
		
			
				                     mfTempCropPicture.delete(); 
		
	
		
			
				                 } 
		
	
		
			
				             }*/ 
		
	
		
			
							  // 安全删除临时文件 
		
	
		
			
							  if (mfTempCropPicture.exists()) { 
		
	
		
			
							  mfTempCropPicture.delete(); 
		
	
		
			
							  } 
		
	
		
			
							  }*/ 
		
	
		
			
				         }   else   if   ( resultCode   ! =   RESULT_OK )   {  
		
	
		
			
				             LogUtils . d ( TAG ,   " 操作取消或失败,  "   +   requestCode ) ;  
		
	
		
			
				             ToastUtils . show ( " 操作已取消 " ) ;  
		
	
	
		
			
				
					
					
						
					 
				
			
			@@ -566,7 +575,7 @@ public class BackgroundPictureActivity extends Activity implements BackgroundPic
 
		
	
		
			
				             }  
		
	
		
			
				         }  
		
	
		
			
				     }  
		
	
		
			
					  
		
	
		
			
				 
		
	
		
			
					 void   setBackgroundColor ( )   {  
		
	
		
			
						 BackgroundPictureUtils   utils   =   BackgroundPictureUtils . getInstance ( BackgroundPictureActivity . this ) ;  
		
	
		
			
						 BackgroundPictureBean   bean   =   utils . getBackgroundPictureBean ( ) ;