mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-30 21:04:16 +00:00
add project adins
This commit is contained in:
parent
ad06ac5505
commit
f8f85d679d
5299 changed files with 625430 additions and 0 deletions
|
@ -0,0 +1,57 @@
|
|||
package com.adins.mss.base.scheduler;
|
||||
|
||||
import android.app.IntentService;
|
||||
import android.content.Intent;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.adins.mss.constant.Global;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ClearPdfSchedulerService extends IntentService {
|
||||
|
||||
public ClearPdfSchedulerService() {
|
||||
super("CleanPdfSchedulerService");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onHandleIntent(@Nullable Intent intent) {
|
||||
String dirPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).getPath() + "/bafmcspdf";
|
||||
File dir = new File(dirPath);
|
||||
|
||||
deleteDirectory(dir);
|
||||
}
|
||||
|
||||
private void deleteDirectory(File path) {
|
||||
if( path.exists()) {
|
||||
File[] files = path.listFiles();
|
||||
if (files == null) {
|
||||
if (Global.IS_DEV) {
|
||||
Log.i("PDF_SCHEDULER", "No PDF found to delete!");
|
||||
}
|
||||
return;
|
||||
}
|
||||
for(File file : files) {
|
||||
if(file.isDirectory()) {
|
||||
deleteDirectory(file);
|
||||
}
|
||||
else {
|
||||
file.delete();
|
||||
if (Global.IS_DEV) {
|
||||
Log.i("PDF_SCHEDULER", "PDF deleted!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (path.exists()) {
|
||||
path.delete();
|
||||
if (Global.IS_DEV) {
|
||||
Log.i("PDF_SCHEDULER", "All PDF are cleared from local storage!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
|
@ -0,0 +1,65 @@
|
|||
package com.adins.mss.coll.models.loyaltymodels;
|
||||
|
||||
import com.adins.mss.foundation.http.MssResponseType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GroupPointData extends MssResponseType {
|
||||
|
||||
@SerializedName("GROUP_POINT")
|
||||
public String groupPoint;
|
||||
@SerializedName("RANK")
|
||||
public List<RankDetail> rankDetails;
|
||||
@SerializedName("POINT_DETAIL")
|
||||
public List<PointDetail> pointDetails;
|
||||
|
||||
private transient String[] groupPointValue;
|
||||
private transient boolean isMonth;
|
||||
private transient boolean isDay;
|
||||
|
||||
public GroupPointData() { }
|
||||
|
||||
public GroupPointData(String groupPoint, List<RankDetail> rankDetails, List<PointDetail> pointDetails) {
|
||||
this.groupPoint = groupPoint;
|
||||
this.rankDetails = rankDetails;
|
||||
this.pointDetails = pointDetails;
|
||||
|
||||
groupPointValue = groupPoint.trim().split("-");
|
||||
}
|
||||
|
||||
public String[] getGroupPointValue() {
|
||||
if(groupPoint == null || groupPoint.equals("")){
|
||||
return null;
|
||||
}
|
||||
if(groupPointValue == null || groupPointValue.length == 0)
|
||||
groupPointValue = groupPoint.trim().split("-");
|
||||
|
||||
return groupPointValue;
|
||||
}
|
||||
|
||||
public boolean isMonth() {
|
||||
if(groupPointValue == null || groupPointValue.length == 0)
|
||||
getGroupPointValue();
|
||||
|
||||
if(groupPointValue.length == 2){
|
||||
isMonth = true;
|
||||
isDay = false;
|
||||
}
|
||||
|
||||
return isMonth;
|
||||
}
|
||||
|
||||
public boolean isDay() {
|
||||
if(groupPointValue == null || groupPointValue.length == 0)
|
||||
getGroupPointValue();
|
||||
|
||||
if(groupPointValue.length == 3){
|
||||
isDay = true;
|
||||
isMonth = false;
|
||||
}
|
||||
|
||||
return isDay;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.adins.mss.odr.accounts.api;
|
||||
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by olivia.dg on 11/17/2017.
|
||||
*/
|
||||
|
||||
public class LoadContactRequest extends MssRequestType {
|
||||
@SerializedName("uuid_account")
|
||||
private String uuid_account;
|
||||
|
||||
@SerializedName("uuid_product")
|
||||
private String uuid_product;
|
||||
|
||||
public String getUuid_account() {
|
||||
return uuid_account;
|
||||
}
|
||||
|
||||
public void setUuid_account(String uuid_account) {
|
||||
this.uuid_account = uuid_account;
|
||||
}
|
||||
|
||||
public String getUuid_product() {
|
||||
return uuid_product;
|
||||
}
|
||||
|
||||
public void setUuid_product(String uuid_product) {
|
||||
this.uuid_product = uuid_product;
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,43 @@
|
|||
package com.services;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
|
||||
public class AutoSendImageService extends Service {
|
||||
private AutoSendImageThread auto;
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
stopAutoSendImageThread();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
//TODO: auto = MainMenuActivity.autoSendImage;
|
||||
startAutoSendImageThread();
|
||||
}
|
||||
|
||||
public synchronized void startAutoSendImageThread() {
|
||||
if (auto == null) {
|
||||
auto = new AutoSendImageThread(getApplicationContext(),this);
|
||||
auto.start();
|
||||
} else {
|
||||
auto.start();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void stopAutoSendImageThread() {
|
||||
if (auto != null) {
|
||||
auto.requestStop();
|
||||
auto = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent arg0) {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="6dip"/>
|
||||
<solid android:color="#F2F3F8"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="6dip"/>
|
||||
<solid android:color="@color/gradient_start"/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
Loading…
Add table
Add a link
Reference in a new issue