[Feature][T108][demand-view-334] add a sync status flag
Only Configure: No
Affected branch: YUNDONG_BASE1.0
Affected module: ota
Self-test: yes
Doc Update: no
Change-Id: Ie69315197b9d43909e9655c6943c88df0d45b7a6
diff --git a/mbtk/include/mbtk/mbtk_fota.h b/mbtk/include/mbtk/mbtk_fota.h
index 385da51..0ad5655 100755
--- a/mbtk/include/mbtk/mbtk_fota.h
+++ b/mbtk/include/mbtk/mbtk_fota.h
@@ -101,6 +101,7 @@
int mbtk_fota_get_tmp_absys_type(void);
int mbtk_fota_get_sync_absys_type(void);
int mbtk_fota_get_mtd_check_type(void);
+int mbtk_fota_get_sync_status(void);
#ifdef __cplusplus
}
diff --git a/mbtk/libmbtk_lib/fota/mbtk_fota.c b/mbtk/libmbtk_lib/fota/mbtk_fota.c
index 6d5d3e8..81ed76f 100755
--- a/mbtk/libmbtk_lib/fota/mbtk_fota.c
+++ b/mbtk/libmbtk_lib/fota/mbtk_fota.c
@@ -504,3 +504,13 @@
return type;
}
+int mbtk_fota_get_sync_status(void)
+{
+ int type = 0;
+ char sync_status[] ={0};
+
+ property_get("persist.mbtk.sync_status", sync_status, "0");
+ type = atoi(sync_status);
+
+ return type;
+}