Merge branch 'version' into secondaryExploit
# Conflicts: # app/src/main/java/com/navinfo/outdoor/activity/PictureActivity.java
This commit is contained in:
@@ -126,6 +126,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
private int videoIndex;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
@@ -377,7 +378,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
// 一段视频拍摄完成自动将当前拍摄路径加1
|
// 一段视频拍摄完成自动将当前拍摄路径加1
|
||||||
File finalVideoFile = new File(finalVideoPath);
|
File finalVideoFile = new File(finalVideoPath);
|
||||||
if (finalVideoFile.exists()) {
|
if (finalVideoFile.exists()) {
|
||||||
int videoIndex = Integer.parseInt(finalVideoFile.getName().replace(".mp4", ""));
|
videoIndex = Integer.parseInt(finalVideoFile.getName().replace(".mp4", ""));
|
||||||
finalVideoPath = Objects.requireNonNull(finalVideoFile.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".mp4";
|
finalVideoPath = Objects.requireNonNull(finalVideoFile.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".mp4";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -495,6 +496,8 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
if (timerTask != null) {
|
if (timerTask != null) {
|
||||||
timerTask.cancel();
|
timerTask.cancel();
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
|
File file = new File(finalVideoPath);
|
||||||
|
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex) + ".mp4";
|
||||||
intent.putExtra(Constant.INTENT_VIDEO_PATH, finalVideoPath);
|
intent.putExtra(Constant.INTENT_VIDEO_PATH, finalVideoPath);
|
||||||
setResult(0x101, intent);
|
setResult(0x101, intent);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.navinfo.outdoor.util.SdkFolderCreate;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
@Database(entities = {PoiEntity.class,ChargingPileEntity.class}, version = 1, exportSchema = false)
|
@Database(entities = {PoiEntity.class,ChargingPileEntity.class}, version = 2, exportSchema = false)
|
||||||
public abstract class PoiDatabase extends RoomDatabase {
|
public abstract class PoiDatabase extends RoomDatabase {
|
||||||
private static final String DB_NAME = "navinfo.db";
|
private static final String DB_NAME = "navinfo.db";
|
||||||
private static volatile PoiDatabase instance;
|
private static volatile PoiDatabase instance;
|
||||||
@@ -32,9 +32,7 @@ public abstract class PoiDatabase extends RoomDatabase {
|
|||||||
}
|
}
|
||||||
return Room.databaseBuilder(context, PoiDatabase.class, Constant.POI_DAO+DB_NAME)
|
return Room.databaseBuilder(context, PoiDatabase.class, Constant.POI_DAO+DB_NAME)
|
||||||
.addMigrations(migration_1_2)
|
.addMigrations(migration_1_2)
|
||||||
.addMigrations(migration_2_3)
|
//.fallbackToDestructiveMigration()//数据库更新时删除数据重新创建 改动特别大的时候在用
|
||||||
.addMigrations(migration_3_4)
|
|
||||||
.addMigrations(migration_4_5)
|
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +40,7 @@ public abstract class PoiDatabase extends RoomDatabase {
|
|||||||
private static Migration migration_1_2 = new Migration(1, 2) {
|
private static Migration migration_1_2 = new Migration(1, 2) {
|
||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||||
database.execSQL("ALTER TABLE user ADD certify INTEGER NOT NULL DEFAULT 0");
|
database.execSQL("ALTER TABLE poi ADD COLUMN record_way INTEGER NOT NULL DEFAULT ''");//添加了一个
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ public class PoiEntity implements Serializable {
|
|||||||
private String dist;//距离用户位置
|
private String dist;//距离用户位置
|
||||||
private int taskStatus;//任务状态 0.未领取 1.已领取,5 立即采集,2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功),4已上传(结束采集)
|
private int taskStatus;//任务状态 0.未领取 1.已领取,5 立即采集,2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功),4已上传(结束采集)
|
||||||
private int type;//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
private int type;//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
||||||
private int station_type;//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"7 "门牌", "公交:8 情报:9
|
private int station_type;//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 "门牌", "公交:6 情报:7
|
||||||
|
private int isLocalData;//是否是本地数据 0,服务 1,本地
|
||||||
private int isExclusive;//任务类型 0.普通任务,1.专属任务
|
private int isExclusive;//任务类型 0.普通任务,1.专属任务
|
||||||
private int bodyId;//保存本地的bodyId
|
private int bodyId;//保存本地的bodyId
|
||||||
private int work_type;//0."车行" 1."自行车" 2."步行"
|
private int work_type;//0."车行" 1."自行车" 2."步行"
|
||||||
@@ -98,6 +99,13 @@ public class PoiEntity implements Serializable {
|
|||||||
this.isExclusive = isExclusive;
|
this.isExclusive = isExclusive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getIsLocalData() {
|
||||||
|
return isLocalData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsLocalData(int isLocalData) {
|
||||||
|
this.isLocalData = isLocalData;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDist() {
|
public String getDist() {
|
||||||
return dist;
|
return dist;
|
||||||
|
|||||||
Reference in New Issue
Block a user