first commit
This commit is contained in:
commit
cd6b4559bc
|
@ -0,0 +1,77 @@
|
|||
# Built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
*.aab
|
||||
|
||||
# Files for the ART/Dalvik VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# Generated files
|
||||
bin/
|
||||
gen/
|
||||
out/
|
||||
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Proguard folder generated by Eclipse
|
||||
proguard/
|
||||
|
||||
# Log Files
|
||||
*.log
|
||||
|
||||
# Android Studio Navigation editor temp files
|
||||
.navigation/
|
||||
|
||||
# Android Studio captures folder
|
||||
captures/
|
||||
|
||||
# IntelliJ
|
||||
*.iml
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/gradle.xml
|
||||
.idea/assetWizardSettings.xml
|
||||
.idea/dictionaries
|
||||
.idea/libraries
|
||||
.idea/caches
|
||||
|
||||
# Keystore files
|
||||
# Uncomment the following lines if you do not want to check your keystore files in.
|
||||
#*.jks
|
||||
#*.keystore
|
||||
|
||||
# External native build folder generated in Android Studio 2.2 and later
|
||||
.externalNativeBuild
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
# google-services.json
|
||||
|
||||
# Freeline
|
||||
freeline.py
|
||||
freeline/
|
||||
freeline_project_description.json
|
||||
|
||||
# fastlane
|
||||
fastlane/report.xml
|
||||
fastlane/Preview.html
|
||||
fastlane/screenshots
|
||||
fastlane/test_output
|
||||
fastlane/readme.md
|
||||
|
||||
# Version control
|
||||
vcs.xml
|
||||
|
||||
# lint
|
||||
lint/intermediates/
|
||||
lint/generated/
|
||||
lint/outputs/
|
||||
lint/tmp/
|
||||
# lint/reports/
|
|
@ -0,0 +1,113 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<codeStyleSettings language="XML">
|
||||
<arrangement>
|
||||
<rules>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:android</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:id</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>style</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
</rules>
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="1.8" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetSelector">
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakeSettings">
|
||||
<configurations>
|
||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/display2.0.iml" filepath="$PROJECT_DIR$/display2.0.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,318 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="direct_access_persist.xml">
|
||||
<option name="deviceSelectionList">
|
||||
<list>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="27" />
|
||||
<option name="brand" value="DOCOMO" />
|
||||
<option name="codename" value="F01L" />
|
||||
<option name="id" value="F01L" />
|
||||
<option name="manufacturer" value="FUJITSU" />
|
||||
<option name="name" value="F-01L" />
|
||||
<option name="screenDensity" value="360" />
|
||||
<option name="screenX" value="720" />
|
||||
<option name="screenY" value="1280" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="28" />
|
||||
<option name="brand" value="DOCOMO" />
|
||||
<option name="codename" value="SH-01L" />
|
||||
<option name="id" value="SH-01L" />
|
||||
<option name="manufacturer" value="SHARP" />
|
||||
<option name="name" value="AQUOS sense2 SH-01L" />
|
||||
<option name="screenDensity" value="480" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2160" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="31" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="a51" />
|
||||
<option name="id" value="a51" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy A51" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="akita" />
|
||||
<option name="id" value="akita" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="b0q" />
|
||||
<option name="id" value="b0q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S22 Ultra" />
|
||||
<option name="screenDensity" value="600" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3088" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="32" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="bluejay" />
|
||||
<option name="id" value="bluejay" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 6a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="caiman" />
|
||||
<option name="id" value="caiman" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 9 Pro" />
|
||||
<option name="screenDensity" value="360" />
|
||||
<option name="screenX" value="960" />
|
||||
<option name="screenY" value="2142" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="comet" />
|
||||
<option name="id" value="comet" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 9 Pro Fold" />
|
||||
<option name="screenDensity" value="390" />
|
||||
<option name="screenX" value="2076" />
|
||||
<option name="screenY" value="2152" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="29" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="crownqlteue" />
|
||||
<option name="id" value="crownqlteue" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Note9" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2220" />
|
||||
<option name="screenY" value="1080" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="dm3q" />
|
||||
<option name="id" value="dm3q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S23 Ultra" />
|
||||
<option name="screenDensity" value="600" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3088" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="e1q" />
|
||||
<option name="id" value="e1q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S24" />
|
||||
<option name="screenDensity" value="480" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2340" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="felix" />
|
||||
<option name="id" value="felix" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Fold" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2208" />
|
||||
<option name="screenY" value="1840" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="felix" />
|
||||
<option name="id" value="felix" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Fold" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2208" />
|
||||
<option name="screenY" value="1840" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="felix_camera" />
|
||||
<option name="id" value="felix_camera" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Fold (Camera-enabled)" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="2208" />
|
||||
<option name="screenY" value="1840" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="gts8uwifi" />
|
||||
<option name="id" value="gts8uwifi" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Tab S8 Ultra" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="1848" />
|
||||
<option name="screenY" value="2960" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="husky" />
|
||||
<option name="id" value="husky" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8 Pro" />
|
||||
<option name="screenDensity" value="390" />
|
||||
<option name="screenX" value="1008" />
|
||||
<option name="screenY" value="2244" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="motorola" />
|
||||
<option name="codename" value="java" />
|
||||
<option name="id" value="java" />
|
||||
<option name="manufacturer" value="Motorola" />
|
||||
<option name="name" value="G20" />
|
||||
<option name="screenDensity" value="280" />
|
||||
<option name="screenX" value="720" />
|
||||
<option name="screenY" value="1600" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="komodo" />
|
||||
<option name="id" value="komodo" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 9 Pro XL" />
|
||||
<option name="screenDensity" value="360" />
|
||||
<option name="screenX" value="1008" />
|
||||
<option name="screenY" value="2244" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="lynx" />
|
||||
<option name="id" value="lynx" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 7a" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="31" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="oriole" />
|
||||
<option name="id" value="oriole" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 6" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="panther" />
|
||||
<option name="id" value="panther" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 7" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="q5q" />
|
||||
<option name="id" value="q5q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy Z Fold5" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1812" />
|
||||
<option name="screenY" value="2176" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="r11" />
|
||||
<option name="id" value="r11" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Watch" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="384" />
|
||||
<option name="screenY" value="384" />
|
||||
<option name="type" value="WEAR_OS" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="30" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="redfin" />
|
||||
<option name="id" value="redfin" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 5" />
|
||||
<option name="screenDensity" value="440" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2340" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="shiba" />
|
||||
<option name="id" value="shiba" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 8" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2400" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="33" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="tangorpro" />
|
||||
<option name="id" value="tangorpro" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel Tablet" />
|
||||
<option name="screenDensity" value="320" />
|
||||
<option name="screenX" value="1600" />
|
||||
<option name="screenY" value="2560" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="34" />
|
||||
<option name="brand" value="google" />
|
||||
<option name="codename" value="tokay" />
|
||||
<option name="id" value="tokay" />
|
||||
<option name="manufacturer" value="Google" />
|
||||
<option name="name" value="Pixel 9" />
|
||||
<option name="screenDensity" value="420" />
|
||||
<option name="screenX" value="1080" />
|
||||
<option name="screenY" value="2424" />
|
||||
</PersistentDeviceSelectionData>
|
||||
<PersistentDeviceSelectionData>
|
||||
<option name="api" value="29" />
|
||||
<option name="brand" value="samsung" />
|
||||
<option name="codename" value="x1q" />
|
||||
<option name="id" value="x1q" />
|
||||
<option name="manufacturer" value="Samsung" />
|
||||
<option name="name" value="Galaxy S20" />
|
||||
<option name="screenDensity" value="480" />
|
||||
<option name="screenX" value="1440" />
|
||||
<option name="screenY" value="3200" />
|
||||
</PersistentDeviceSelectionData>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
Binary file not shown.
|
@ -0,0 +1,36 @@
|
|||
# display2.0
|
||||
|
||||
#### Description
|
||||
重构display
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
@ -0,0 +1,24 @@
|
|||
# display2.0
|
||||
|
||||
#### 介绍
|
||||
重构display
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 更新日志
|
||||
2.0_v_0.1:重构第一版
|
||||
2.0_v_0.2:兼容所有需要用到display的设备
|
||||
2.0_v_0.3:修复M60不显示,需要启动时重启千兆网
|
||||
2.0_v_0.4:1.优化通讯,找卡
|
||||
2.完善巡检功能
|
||||
2.0_v_0.5:1.增加参数备份恢复功能
|
||||
2.0_v_0.7:1.修复fpga类型的接收卡升级程序失败
|
||||
2.0_v_0.8:1.修复T6类型接收卡参数恢复,字体花屏问题
|
||||
2.修复fpga类型的接收卡无法恢复参数问题
|
||||
2.0_v_0.9:1.修复4.0找卡不稳定问题
|
||||
2.0_v_1.1:1.anlu芯片fpga升级
|
||||
2021.3.21 2.0_v_1.2 修复M60fpga版本查询
|
||||
2021.3.22 2.0_v_1.3 尝试优化M60千兆网口不显示
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
测试数据
|
||||
1.显示颜色块
|
||||
帧头 协议类型 命令类型 应答位 长度 数据域 CRC校验
|
||||
7e 7e 55 01 01 00 0c 00 00 00 00 00 00 80 00 40 00 FF 00 00 AA BB CC DD
|
||||
|
||||
2.画线
|
||||
帧头 协议类型 命令类型 应答位 长度 数据域 CRC校验
|
||||
7e 7e 55 01 01 00 19 00 02 00 00 00 00 80 00 40 00 00 00 00 01 00 FF FF 01 00 00 00 00 80 07 38 04 AA BB CC DD
|
||||
7E 7E 55 01 01 01 19 00 02 00 00 00 00 00 40 00 40 00 00 00 02 FF FF FF 01 00 00 00 00 00 00 00 00 ED 96 5D 7A
|
||||
7E 7E 55 01 01 01 22 00 02 00 00 00 00 00 40 00 40 00 00 00 02 FF FF FF 01 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 82 17 AD D7
|
||||
|
||||
7e 7e 55 01 01 00 19 00 02 00 00 00 00 80 00 40 00 00 00 00 01 FF FF FF 01 00 00 00 00 0E 00 00 00 AA BB CC DD
|
||||
7e 7e 55 01 01 00 19 00 02 00 00 00 00 80 00 40 00 00 00 00 01 FF FF FF 01 00 00 00 00 0D 00 00 00 AA BB CC DD
|
||||
2.查询版本
|
||||
帧头 协议类型 命令类型 应答位 长度 数据域 CRC校验
|
||||
7e 7e 55 01 02 01 00 00 F5 E5 47 AA AA BB CC DD
|
||||
回7E 7E 55 01 02 00 04 00 63 00 01 02 D4 F9 8E 55
|
|
@ -0,0 +1 @@
|
|||
/build
|
|
@ -0,0 +1,93 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion "26.0.0"
|
||||
defaultConfig {
|
||||
applicationId "com.xixun.display"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 26
|
||||
versionCode 104
|
||||
versionName "2.0_v_4.1"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a"
|
||||
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
Display {
|
||||
keyAlias 'xixuncard'
|
||||
keyPassword '66399266'
|
||||
storeFile file('D:\\develop\\data\\data\\display\\SignKey_Sysolution.jks')
|
||||
storePassword '66399266'
|
||||
}
|
||||
C {//49.1
|
||||
keyAlias 'xixun'
|
||||
keyPassword '123456'
|
||||
storeFile file('D:/develop/xixun/signedFile/keystore/xixun-c.keystore')
|
||||
storePassword '123456'
|
||||
}
|
||||
D {//3288
|
||||
keyAlias 'xixun'
|
||||
keyPassword '123456'
|
||||
storeFile file('D:/develop/xixun/signedFile/keystore/xixun-d.keystore')
|
||||
storePassword '123456'
|
||||
}
|
||||
M {//meige
|
||||
keyAlias 'xixun'
|
||||
keyPassword '123456'
|
||||
storeFile file('D:/develop/xixun/signedFile/keystore/xixun-m.keystore')
|
||||
storePassword '123456'
|
||||
}
|
||||
}
|
||||
// xixuncard 66399266
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.C
|
||||
}
|
||||
debug {
|
||||
signingConfig signingConfigs.C
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
targetCompatibility = 1.8
|
||||
sourceCompatibility = 1.8
|
||||
}
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.all { output ->
|
||||
def outputFile = output.outputFile
|
||||
if (outputFile != null && outputFile.name.endsWith('.apk')) {
|
||||
// outputFileName = "display${defaultConfig.versionName}-Y08.apk"
|
||||
outputFileName = "display${defaultConfig.versionName}-C-M7s.apk"
|
||||
// outputFileName = "/home/joey/work/app/card-system/system-core/ralease/" + fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
/*sourceSets {
|
||||
main {
|
||||
jniLibs.srcDirs = ['libs']
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
dependencies {
|
||||
//compile 'com.android.support:multidex:1.0.1'
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'com.android.support:appcompat-v7:26.1.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.1'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
|
||||
implementation files('libs/task_dto5.jar')
|
||||
// implementation files('libs/xixun_card_setting_1.2.2.jar')
|
||||
//implementation files('libs/org.apache.commons.codec-1.8.jar')
|
||||
implementation 'com.koushikdutta.async:androidasync:2.2.1'
|
||||
implementation files('src/main/java/libs/gson-2.2.4.jar')
|
||||
implementation files('libs/jackson.jar')
|
||||
// implementation files('libs/xixun_card_setting_1.2.2.jar')
|
||||
implementation files('libs/xixun_alahover.jar')
|
||||
implementation files('libs/zip4j_1.3.1.jar')
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":99,"versionName":"2.0_v_3.0_t","enabled":true,"outputFile":"display2.0_v_3.0_t-ralease.apk","fullName":"debug","baseName":"debug"},"path":"display2.0_v_3.0_t-ralease.apk","properties":{}}]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":104,"versionName":"2.0_v_4.1","enabled":true,"outputFile":"display2.0_v_4.1-C-M7s.apk","fullName":"release","baseName":"release"},"path":"display2.0_v_4.1-C-M7s.apk","properties":{}}]
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.xixun.display"
|
||||
android:installLocation="internalOnly"
|
||||
android:sharedUserId="android.uid.system">
|
||||
|
||||
<!--android:installLocation="internalOnly"
|
||||
android:sharedUserId="android.uid.system"-->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
|
||||
<application
|
||||
android:name="com.xixun.display.MyApp"
|
||||
android:allowBackup="true"
|
||||
android:configChanges="locale"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
|
||||
<activity
|
||||
android:name="com.xixun.display.MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<receiver
|
||||
android:name="com.xixun.display.BootReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
<intent-filter android:priority="214748364">
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<service
|
||||
android:name="com.xixun.display.MyService"
|
||||
android:enabled="true"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.xixun.display.MyService"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service
|
||||
android:name="com.xixun.display.SettingsService"
|
||||
android:enabled="true"
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="com.xixun.display.AIDLService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<!--<service android:name=".AIDLService"-->
|
||||
<!--android:enabled="true"-->
|
||||
<!--android:exported="true">-->
|
||||
<!--<intent-filter><action android:name="com.xixun.display.AIDLService"></action>-->
|
||||
<!--</intent-filter>-->
|
||||
<!--</service>-->
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,27 @@
|
|||
// MyAidl.aidl
|
||||
package com.xixun.display;
|
||||
import com.xixun.display.RecCardInfo;
|
||||
// Declare any non-default types here with import statements
|
||||
|
||||
interface MyAidl {
|
||||
boolean setBrightness(boolean manual, int brightness);
|
||||
int getBrightness();
|
||||
int getReceivedCardNum();
|
||||
int getVersionBy3288();
|
||||
int getVersionSpi();
|
||||
int setOffset(int screenX,int screenY,int cutW,int cutH,int so1X,int so1Y,int so2X,int so2Y);
|
||||
boolean backUpData();
|
||||
boolean restoreData();
|
||||
String getOtherVer();
|
||||
boolean rebootByFPGA();
|
||||
boolean setRelayState(int port,int vcs,String state);
|
||||
String getRelayState(int port,int vcs);
|
||||
void setRGB(int red,int green,int blue);
|
||||
String getBoxSize();
|
||||
void startPointCheck();
|
||||
List<String> getPointCheckData();
|
||||
void savePort(int port);
|
||||
RecCardInfo getRecinfo();
|
||||
void setRecCardRelaySwitch(boolean isSwitch);
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
// RecCardInfo.aidl
|
||||
package com.xixun.display;
|
||||
|
||||
parcelable RecCardInfo;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.xixun.joey.uart;
|
||||
|
||||
parcelable BytesData;
|
|
@ -0,0 +1,10 @@
|
|||
package com.xixun.joey.uart;
|
||||
|
||||
import com.xixun.joey.uart.BytesData;
|
||||
|
||||
interface IUartListener {
|
||||
/**
|
||||
* data: 返回接收到的串口数据
|
||||
*/
|
||||
void onReceive(inout BytesData data);
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.xixun.joey.uart;
|
||||
|
||||
import com.xixun.joey.uart.IUartListener;
|
||||
|
||||
interface IUartService {
|
||||
boolean config(String devPathName, int baud);
|
||||
void read(String devPathName, IUartListener listener);
|
||||
boolean write(String devPathName, in byte[] data);
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.xixun.lay.safe;
|
||||
|
||||
// Declare any non-default types here with import statements
|
||||
|
||||
interface Safe {
|
||||
/**
|
||||
* safe加密定制aidl
|
||||
*/
|
||||
//安全SDK接口初始化
|
||||
int init();
|
||||
//设置日志打印等级
|
||||
void setLogLevel(int logLevel);
|
||||
//获取当前安全SDK的版本信息
|
||||
int getSdkVersion();
|
||||
//获取当前安全通信连接状态
|
||||
int getSafeConnectState();
|
||||
//与网关服务器建立安全通道
|
||||
int createSafeConnect(String url);
|
||||
//关闭与网关服务器建立的安全通道
|
||||
int destroySafeConnect();
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
package com.xixun.util;
|
||||
|
||||
interface PlayerInfo {
|
||||
String getProgramName();
|
||||
String getVersion();
|
||||
void setScreenWidth(int w);
|
||||
void setScreenHeight(int h);
|
||||
void taskScreenshot(String cmdId);
|
||||
void setExternalTemperature(float t);
|
||||
void setInternalTemperature(float t);
|
||||
void setHumidity(float h);
|
||||
boolean forcePlayProgram(String pid);
|
||||
boolean finishForcePlay();
|
||||
String getCurProgramId();
|
||||
void setUSBProgramPwd(String pwd);
|
||||
String executeJsonCommand(String json);
|
||||
void pausePlayer(boolean b);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
#打开关闭打印数据的日志
|
||||
"xixun.config.log":true,
|
||||
#打开关闭打印重要的日志
|
||||
"xixun.config.alllog":true,
|
||||
#烽火定制
|
||||
"xixun.config.fenghuo":false,
|
||||
|
||||
#是否熙讯的调试软件
|
||||
"xixun.config.is_xixun":true
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,104 @@
|
|||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
package android.os;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class SystemProperties {
|
||||
public static final int PROP_NAME_MAX = 31;
|
||||
public static final int PROP_VALUE_MAX = 91;
|
||||
private static final ArrayList<Runnable> sChangeCallbacks = new ArrayList<Runnable>();
|
||||
|
||||
public SystemProperties() {
|
||||
}
|
||||
|
||||
private static native String native_get(String var0);
|
||||
|
||||
private static native String native_get(String var0, String var1);
|
||||
|
||||
private static native int native_get_int(String var0, int var1);
|
||||
|
||||
private static native long native_get_long(String var0, long var1);
|
||||
|
||||
private static native boolean native_get_boolean(String var0, boolean var1);
|
||||
|
||||
private static native void native_set(String var0, String var1);
|
||||
|
||||
private static native void native_add_change_callback();
|
||||
|
||||
public static String get(String key) {
|
||||
if(key.length() > 31) {
|
||||
throw new IllegalArgumentException("key.length > 31");
|
||||
} else {
|
||||
return native_get(key);
|
||||
}
|
||||
}
|
||||
|
||||
public static String get(String key, String def) {
|
||||
if(key.length() > 31) {
|
||||
throw new IllegalArgumentException("key.length > 31");
|
||||
} else {
|
||||
return native_get(key, def);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getInt(String key, int def) {
|
||||
if(key.length() > 31) {
|
||||
throw new IllegalArgumentException("key.length > 31");
|
||||
} else {
|
||||
return native_get_int(key, def);
|
||||
}
|
||||
}
|
||||
|
||||
public static long getLong(String key, long def) {
|
||||
if(key.length() > 31) {
|
||||
throw new IllegalArgumentException("key.length > 31");
|
||||
} else {
|
||||
return native_get_long(key, def);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean getBoolean(String key, boolean def) {
|
||||
if(key.length() > 31) {
|
||||
throw new IllegalArgumentException("key.length > 31");
|
||||
} else {
|
||||
return native_get_boolean(key, def);
|
||||
}
|
||||
}
|
||||
|
||||
public static void set(String key, String val) {
|
||||
if(key.length() > 31) {
|
||||
throw new IllegalArgumentException("key.length > 31");
|
||||
} else if(val != null && val.length() > 91) {
|
||||
throw new IllegalArgumentException("val.length > 91");
|
||||
} else {
|
||||
native_set(key, val);
|
||||
}
|
||||
}
|
||||
|
||||
public static void addChangeCallback(Runnable callback) {
|
||||
synchronized(sChangeCallbacks) {
|
||||
if(sChangeCallbacks.size() == 0) {
|
||||
native_add_change_callback();
|
||||
}
|
||||
|
||||
sChangeCallbacks.add(callback);
|
||||
}
|
||||
}
|
||||
|
||||
static void callChangeCallbacks() {
|
||||
synchronized(sChangeCallbacks) {
|
||||
if(sChangeCallbacks.size() != 0) {
|
||||
ArrayList<Runnable> callbacks = new ArrayList<Runnable>(sChangeCallbacks);
|
||||
|
||||
for(int i = 0; i < callbacks.size(); ++i) {
|
||||
((Runnable)callbacks.get(i)).run();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
D:\Project\Display\app\src\main\java>set ProjectName=Display
|
||||
|
||||
D:\Project\Display\app\src\main\java>set stryear=18
|
||||
|
||||
D:\Project\Display\app\src\main\java>set strmonth=07
|
||||
|
||||
D:\Project\Display\app\src\main\java>set strday=30
|
||||
|
||||
D:\Project\Display\app\src\main\java>set strdatetime=180730
|
||||
|
||||
D:\Project\Display\app\src\main\java>set ObjectPath=E:\Backup\Project\Display
|
||||
|
||||
D:\Project\Display\app\src\main\java>mkdir E:\Backup\Project\Display
|
||||
|
||||
D:\Project\Display\app\src\main\java>del /f/s/q .\Display.zip
|
||||
|
||||
D:\Project\Display\app\src\main\java>del /f/s/q E:\Backup\Project\Display\Display180730a.zip
|
||||
删除文件 - E:\Backup\Project\Display\Display180730a.zip
|
||||
|
||||
D:\Project\Display\app\src\main\java>mkdir E:\Backup\Project\Display
|
||||
|
||||
D:\Project\Display\app\src\main\java>"C:\Program Files\2345Soft\HaoZip\HaoZipC.exe" a -tzip .\Display.zip -psamtone1 .\Display
|
||||
正在扫描文件...
|
||||
|
||||
创建压缩文档 .\Display.zip
|
||||
已完成
|
||||
|
||||
D:\Project\Display\app\src\main\java>copy .\Display.zip E:\Backup\Project\Display\Display180730a.zip
|
||||
已复制 1 个文件。
|
|
@ -0,0 +1,17 @@
|
|||
package com.amused.joey.crash;
|
||||
|
||||
/**
|
||||
* Project: JoeyTools
|
||||
* Create : joey
|
||||
* Date : 2019/01/30 16:38
|
||||
* Description:
|
||||
*/
|
||||
public class AppCrashInfo {
|
||||
public String key;
|
||||
public String value;
|
||||
|
||||
AppCrashInfo(String key, String value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,221 @@
|
|||
package com.amused.joey.crash;
|
||||
|
||||
/**
|
||||
* Project: JoeyTools
|
||||
* Create : joey
|
||||
* Date : 2019/01/30 13:10
|
||||
* Description:
|
||||
*/
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* UncaughtException处理类,当程序发生Uncaught异常的时候,由该类来接管程序,并记录发送错误报告.
|
||||
* 需要在Application中注册,为了要在程序启动器就监控整个程序。
|
||||
*/
|
||||
public class CrashHelper implements Thread.UncaughtExceptionHandler {
|
||||
private final static String TAG = "CrashHelper";
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private final static DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.US);
|
||||
|
||||
private Builder builder;
|
||||
//系统默认的UncaughtException处理类
|
||||
private Thread.UncaughtExceptionHandler defaultHandler;
|
||||
// 用来存储发生崩溃时的设备信息和异常信息
|
||||
private List<AppCrashInfo> crashInfos;
|
||||
|
||||
private CrashHelper(Builder builder) {
|
||||
crashInfos = new ArrayList<>();
|
||||
this.builder = builder;
|
||||
//获取系统默认的UncaughtException处理器
|
||||
defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
//设置该CrashHandler为程序的默认处理器
|
||||
Thread.setDefaultUncaughtExceptionHandler(this);
|
||||
}
|
||||
|
||||
public void addCrashInfosAppend(String key, String value) {
|
||||
if (null == builder.crashInfosAppend) {
|
||||
builder.crashInfosAppend = new ArrayList<>();
|
||||
}
|
||||
builder.crashInfosAppend.add(new AppCrashInfo(key, value));
|
||||
}
|
||||
|
||||
/* 当UncaughtException发生时会转入该函数来处理 */
|
||||
@Override
|
||||
public void uncaughtException(Thread thread, Throwable throwable) {
|
||||
if ((null == throwable) && (null != defaultHandler)) {
|
||||
defaultHandler.uncaughtException(thread, throwable);
|
||||
} else {
|
||||
handleException(throwable);
|
||||
//退出进程
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private String getAppName(PackageInfo packageInfo) {
|
||||
int labelRes = packageInfo.applicationInfo.labelRes;
|
||||
return builder.context.getResources().getString(labelRes);
|
||||
}
|
||||
|
||||
private void handlerExceptionVersionInfo() throws PackageManager.NameNotFoundException {
|
||||
PackageManager packageManager = builder.context.getPackageManager();
|
||||
PackageInfo packageInfo = packageManager.getPackageInfo(builder.context.getPackageName(), PackageManager.GET_ACTIVITIES);
|
||||
// APP版本信息
|
||||
if (null != packageInfo) {
|
||||
String appName = getAppName(packageInfo);
|
||||
crashInfos.add(new AppCrashInfo("ApplicationName", appName));
|
||||
crashInfos.add(new AppCrashInfo("PackageName", packageInfo.packageName));
|
||||
crashInfos.add(new AppCrashInfo("VersionName", (null != packageInfo.versionName)? packageInfo.versionName: "NULL"));
|
||||
crashInfos.add(new AppCrashInfo("VersionCode", String.valueOf(packageInfo.versionCode)));
|
||||
// UiToast.showMessage(builder.context, appName + " has crashed, exit it !", false);
|
||||
} else {
|
||||
// UiToast.showMessage(builder.context, builder.context.getPackageName() + " has crashed, exit it !", false);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleExceptionCustomInfo() {
|
||||
// 自定义崩溃环境信息
|
||||
if (null != builder.crashInfosAppend) {
|
||||
crashInfos.addAll(builder.crashInfosAppend);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleExceptionDeviceInfo() throws IllegalAccessException {
|
||||
// 设备信息
|
||||
Field[] fields = Build.class.getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
crashInfos.add(new AppCrashInfo(field.getName(), field.get(null).toString()));
|
||||
}
|
||||
}
|
||||
|
||||
private void handleExceptionThrowable(Throwable throwable) {
|
||||
// 崩溃信息
|
||||
StringWriter writer = new StringWriter();
|
||||
PrintWriter printWriter = new PrintWriter(writer);
|
||||
throwable.printStackTrace(printWriter);
|
||||
Throwable cause = throwable.getCause();
|
||||
while (null != cause) {
|
||||
cause.printStackTrace(printWriter);
|
||||
cause = cause.getCause();
|
||||
}
|
||||
printWriter.close();
|
||||
crashInfos.add(new AppCrashInfo("CrashThrowable", writer.toString()));
|
||||
}
|
||||
|
||||
private void handleException(Throwable throwable) {
|
||||
try {
|
||||
crashInfos.add(new AppCrashInfo("CrashTime", new Date().toString()));
|
||||
handlerExceptionVersionInfo();
|
||||
handleExceptionCustomInfo();
|
||||
handleExceptionDeviceInfo();
|
||||
handleExceptionThrowable(throwable);
|
||||
|
||||
saveToFile();
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/* 如果可能,保存错误信息到文件中 */
|
||||
private void saveToFile() throws IOException {
|
||||
StringBuilder infoStr = new StringBuilder();
|
||||
for (int index = 0; index < crashInfos.size(); ++index) {
|
||||
AppCrashInfo info = crashInfos.get(index);
|
||||
// infoStr.append(entry.getKey().toUpperCase(Locale.US));
|
||||
infoStr.append(info.key);
|
||||
infoStr.append(": ");
|
||||
infoStr.append(info.value);
|
||||
infoStr.append("\r\n");
|
||||
}
|
||||
if (null != builder.logFilePrefix) {
|
||||
String time = formatter.format(new Date());
|
||||
String fileName = builder.logFilePrefix + "_" + time + ".log";
|
||||
File dir = builder.context.getFilesDir();
|
||||
if (!dir.exists()) {
|
||||
dir.mkdirs();
|
||||
}
|
||||
// File log = new File(dir, fileName);
|
||||
// File log = new File("/sdcard/", fileName);
|
||||
File log = new File("/mnt/sdcard/", fileName);
|
||||
FileOutputStream fos = new FileOutputStream(log.getAbsoluteFile());
|
||||
fos.write(infoStr.toString().getBytes());
|
||||
fos.close();
|
||||
if (null != builder.onCrashListener) {
|
||||
builder.onCrashListener.onCrash(log, crashInfos, infoStr);
|
||||
} else {
|
||||
Log.e(TAG, infoStr.toString());
|
||||
}
|
||||
} else {
|
||||
if (null != builder.onCrashListener) {
|
||||
builder.onCrashListener.onCrash(null, crashInfos, infoStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
private Context context;
|
||||
private OnCrashListener onCrashListener;
|
||||
private String logFilePrefix;
|
||||
// 发生崩溃时记录用户自定义的信息
|
||||
private List<AppCrashInfo> crashInfosAppend;
|
||||
|
||||
public Builder(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public Builder setOnCrashListener(OnCrashListener onCrashListener) {
|
||||
this.onCrashListener = onCrashListener;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLogFilePrefix(String logFilePrefix) {
|
||||
this.logFilePrefix = logFilePrefix;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addCrashInfosAppend(String key, String value) {
|
||||
if (null == crashInfosAppend) {
|
||||
crashInfosAppend = new ArrayList<>();
|
||||
}
|
||||
crashInfosAppend.add(new AppCrashInfo(key, value));
|
||||
return this;
|
||||
}
|
||||
|
||||
public CrashHelper build() {
|
||||
return new CrashHelper(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.amused.joey.crash;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Project: JoeyTools
|
||||
* Create : joey
|
||||
* Date : 2019/01/30 13:36
|
||||
* Description:
|
||||
*/
|
||||
public interface OnCrashListener {
|
||||
/**
|
||||
* 当发生崩溃时触发,注意:crashLog可能为空
|
||||
* @param crashLog
|
||||
* @param crashData
|
||||
* @param crashInfo
|
||||
*/
|
||||
public void onCrash(File crashLog, List<AppCrashInfo> crashData, StringBuilder crashInfo);
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.iflyings.android.fpgadetect;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.xixun.display.MyLog;
|
||||
import com.xixun.display.backup.SendData;
|
||||
|
||||
|
||||
public class FpgaDetect {
|
||||
public SendData sendData;
|
||||
|
||||
public FpgaDetect() {
|
||||
sendData = new SendData();
|
||||
getRecvCardRamBuffer(0, 0, 0, 0L, null, 0);
|
||||
}
|
||||
/// <summary>
|
||||
/// 读取接收卡数据
|
||||
/// </summary>
|
||||
/// <param name="netPort">发送卡索引</param>
|
||||
/// <param name="cardIndex">接收卡索引</param>
|
||||
/// <param name="memAddress">读取的地址,地址以4字节为单位</param>
|
||||
/// <param name="size">读取的字节数(4字节对齐)</param>
|
||||
/// <param name="buffer">返回的读取数据</param>
|
||||
/// <returns>错误码, 成功返回 0</returns>
|
||||
private int getRecvCardRamBuffer(int netPort, int cardIndex, long vcsNumber, long memAddress, byte[] buffer, int size) {
|
||||
if (size == 0) {
|
||||
return 0;
|
||||
}
|
||||
if(sendData == null){
|
||||
MyLog.e("sendData is null....");
|
||||
}
|
||||
int i = sendData.vcs_dat_r_badPoint(netPort, cardIndex, vcsNumber, memAddress, buffer, size/4, 2);
|
||||
Log.i("zwf", "getRecvCardRamBuffer....."+i);
|
||||
return i;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取接收卡坏点信息
|
||||
/// </summary>
|
||||
/// <param name="netPort">发送卡索引</param>
|
||||
/// <param name="cardIndex">接收卡索引</param>
|
||||
/// <param name="boxWidth">箱体宽</param>
|
||||
/// <param name="boxHeight">箱体高</param>
|
||||
/// <param name="array">返回的点状态,每个点一个字节,坐标根据箱体宽高索引,bit6.7=unused, bit4.5=B, bit2.3=G,bit0.1=R,0表示正常,其它值表示异常</param>
|
||||
/// <returns>错误码</returns>
|
||||
public native int checkRecvCardBadPoint(int netPort, int cardIndex, long vcsNumber, int boxWidth, int boxHeight, byte[] array);
|
||||
|
||||
static {
|
||||
System.loadLibrary("fpga-detect");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.xixun.communicate.PointCheck;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PointCheck{
|
||||
public int width;
|
||||
public int height;
|
||||
public int receiverCount;
|
||||
public List<ReceiverCard> receivers;
|
||||
|
||||
public PointCheck(int w, int h, int rc, List< ReceiverCard> cards){
|
||||
width = w;
|
||||
height = h;
|
||||
receiverCount = rc;
|
||||
receivers = cards;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
package com.xixun.communicate.PointCheck;
|
||||
|
||||
public class ReceiverCard{
|
||||
public int receiverNumber;
|
||||
public int totalPoints;
|
||||
public int breakPoints;
|
||||
|
||||
public ReceiverCard(int r, int t, int b){
|
||||
receiverNumber = r;
|
||||
totalPoints = t;
|
||||
breakPoints = b;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.xixun.communicate.Protocol;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2018/01/18.
|
||||
*/
|
||||
|
||||
public enum NET_COMMU_TYPE {
|
||||
NONE(0x00),
|
||||
TICK(1),
|
||||
FPGA_MOONCELL(2),
|
||||
|
||||
UART_SENSOR(3),
|
||||
UART_FPGA(4),
|
||||
UART_EXTENSION(5),
|
||||
|
||||
MOONCELL_FPAG(7),
|
||||
FGPA_UPDATE_ACK(0x09),
|
||||
FGPA_VERSION_ACK(0x3C),
|
||||
|
||||
FGPA_UPDATE(0x09+0x40),
|
||||
FGPA_VERSION(0x3C+0x40),
|
||||
NUM(0xFF);
|
||||
|
||||
// 定义私有变量
|
||||
private int ucCommandType=0;
|
||||
|
||||
// 构造函数,枚举类型只能为私有
|
||||
NET_COMMU_TYPE(int ucCommandType) {
|
||||
this.ucCommandType = ucCommandType;
|
||||
}
|
||||
|
||||
public static NET_COMMU_TYPE GetEnumValue(byte ucCommandType){ // 手写的从int到enum的转换函数
|
||||
switch(ucCommandType) {
|
||||
case 0: return NONE;
|
||||
case 1: return TICK;
|
||||
case 2: return FPGA_MOONCELL;
|
||||
|
||||
case 3: return UART_SENSOR;
|
||||
case 4: return UART_FPGA;
|
||||
case 5: return UART_EXTENSION;
|
||||
|
||||
case 7: return MOONCELL_FPAG;
|
||||
case 0x09: return FGPA_UPDATE_ACK;
|
||||
case 0x3C: return FGPA_VERSION_ACK;
|
||||
|
||||
case (0x09+0x40): return FGPA_UPDATE;
|
||||
case (0x3C+0x40): return FGPA_VERSION;
|
||||
|
||||
|
||||
default: return NONE;
|
||||
}
|
||||
}
|
||||
public byte getValue()
|
||||
{ return (byte)ucCommandType;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(ucCommandType);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package com.xixun.communicate;
|
||||
|
||||
import com.xixun.display.MyLog;
|
||||
import java.io.FileDescriptor;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2018/05/12.
|
||||
*/
|
||||
|
||||
public class SpiDevice {
|
||||
private FileDescriptor fileDescriptor=null;
|
||||
private String deviceName="/dev/spidev0.0";
|
||||
private int iBaudRate=12*1000*1000;//12000000;//16675000; if iSpiMaxBaudRate != 12Mhz y30 wil have problem;
|
||||
private int mode=1;
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("SpiDevice");// 在java代码中引入libs目录下的库函数,文件名为【libhello.so】。注意,引入时的文件名要去掉前面的lib和后面的.so
|
||||
System.out.println("[Loading] --> Load library libSpiDevice.so success!");
|
||||
} catch (Exception e) {
|
||||
System.out.println("[Loading] --> Can't load library libSpiDevice.so !");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SpiDevice(String deviceName, int iBaudRate,int mode) {
|
||||
this.deviceName=deviceName;
|
||||
this.iBaudRate=iBaudRate;
|
||||
this.mode=mode;
|
||||
}
|
||||
|
||||
public void spiDeveiceOpen() {
|
||||
fileDescriptor=Open(deviceName,iBaudRate,mode);
|
||||
MyLog.i("SpiDevice.java Open Device:"+deviceName + " ,fileDescriptor = "+ fileDescriptor);
|
||||
if (fileDescriptor==null){
|
||||
MyLog.i("SpiDevice.java Open Device Fail:"+deviceName);
|
||||
}else {
|
||||
MyLog.i("SpiDevice.java Open Device Success:"+deviceName);
|
||||
}
|
||||
}
|
||||
|
||||
public void Exit(){
|
||||
MyLog.i(" "+ Thread.currentThread().getStackTrace()[2].getFileName() + "-->"
|
||||
+ "Function: " +Thread.currentThread().getStackTrace()[2].getMethodName() + "-->"
|
||||
+ "Line" +Thread.currentThread().getStackTrace()[2].getLineNumber() + ":\r\n"
|
||||
);
|
||||
Close();
|
||||
fileDescriptor=null;
|
||||
}
|
||||
|
||||
|
||||
// public native FileDescriptor Open(String deviceName, int iBaudRate);
|
||||
public native FileDescriptor Open(String deviceName, int iBaudRate,int mode);
|
||||
public native int Operator(byte [] Databuffer,int iLength);
|
||||
public native int Trans(byte []sendBuf, byte []recvBuf, int iLength);
|
||||
public native int Close();
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.xixun.communicate.Task;
|
||||
|
||||
import com.xixun.display.MyLog;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
|
||||
public class PollingWorker extends Thread {
|
||||
private static final ConcurrentHashMap<Worker, PollingWorker> pollingWorkers = new ConcurrentHashMap<Worker, PollingWorker>();
|
||||
|
||||
private Worker worker;
|
||||
private long delay;
|
||||
private long interval;
|
||||
|
||||
public Worker getWorker() {
|
||||
return worker;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加一个任务
|
||||
* @param delay: 延迟多久开始执行
|
||||
* @param interval:间隔时间
|
||||
* @param worker
|
||||
*/
|
||||
public void addWorker(long delay, long interval, Worker worker) {
|
||||
this.delay = delay;
|
||||
this.interval = interval;
|
||||
this.worker = worker;
|
||||
if ("".equals(worker.getName())) {
|
||||
worker.setName("Worker$" + (pollingWorkers.size() + 1));
|
||||
}
|
||||
if (null == pollingWorkers.putIfAbsent(worker, this)) {
|
||||
this.start();
|
||||
MyLog.i("Hire worker ==> " + worker.getName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除一个任务
|
||||
* @param worker
|
||||
*/
|
||||
public static void fireWorker(Worker worker) {
|
||||
synchronized(pollingWorkers) {
|
||||
if (pollingWorkers.containsKey(worker)) {
|
||||
PollingWorker pollingWorker = pollingWorkers.get(worker);
|
||||
pollingWorkers.remove(worker);
|
||||
pollingWorker.interrupt();
|
||||
MyLog.i("Fire worker ==> " + worker.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (delay > 0) {
|
||||
Thread.sleep(delay);
|
||||
}
|
||||
while (!isInterrupted()) {
|
||||
worker.exec();
|
||||
// 轮寻任务至少间隔10ms,防止出现死循环
|
||||
Thread.sleep((interval > 10) ? interval: 10);
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
interrupt();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.xixun.communicate.Task;
|
||||
|
||||
public abstract class Worker {
|
||||
private String name;
|
||||
|
||||
public abstract void exec();
|
||||
|
||||
public String getName() {
|
||||
if (null == name) {
|
||||
name = "";
|
||||
}
|
||||
return name;
|
||||
}
|
||||
public Worker setName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.xixun.communicate;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.xixun.display.MyLog;
|
||||
import com.xixun.display.controller.XixunController;
|
||||
import com.xixun.display.utils.Configurations;
|
||||
import com.xixun.display.utils.FileOperator;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class WorkParams {
|
||||
public int iLightValue= 50;
|
||||
|
||||
public int iDirection=1;
|
||||
public int iCarriageNumber=0;
|
||||
public String strStationNumber="G1234";
|
||||
|
||||
|
||||
public String strProgramStart="strProgramStart";
|
||||
private Configurations configurations=null;
|
||||
|
||||
|
||||
public WorkParams(Context ctx){
|
||||
configurations = Configurations.getConfigurations(ctx);
|
||||
|
||||
if (strProgramStart.equals(configurations.getValue("strProgramStart"))==false) {
|
||||
MyLog.i(Thread.currentThread().getStackTrace()[2].getFileName() + "-->"
|
||||
+ "Function: " + Thread.currentThread().getStackTrace()[2].getMethodName() + "-->"
|
||||
+ "Line" + Thread.currentThread().getStackTrace()[2].getLineNumber()
|
||||
+ " First initial work paramters.");
|
||||
pushBaseParams(); // 第一次运行。
|
||||
}else{
|
||||
pullBaseParams();
|
||||
}
|
||||
}
|
||||
|
||||
public void pushBaseParams(){
|
||||
configurations.setValue("strProgramStart", strProgramStart);
|
||||
configurations.setIntValue("iLightValue", iLightValue);
|
||||
|
||||
/*if (XixunController.get().bDisplay_RailWay) {
|
||||
configurations.setIntValue("iDirection", iDirection);
|
||||
configurations.setIntValue("iCarriageNumber", iCarriageNumber);
|
||||
configurations.setValue("strStationNumber", strStationNumber);
|
||||
}*/
|
||||
}
|
||||
|
||||
public void pullBaseParams(){
|
||||
iLightValue = configurations.getIntValue("iLightValue");
|
||||
|
||||
/*if (XixunController.get().bDisplay_RailWay) {
|
||||
iDirection = configurations.getIntValue("iDirection");
|
||||
iCarriageNumber = configurations.getIntValue("iCarriageNumber");
|
||||
strStationNumber = configurations.getValue("strStationNumber");
|
||||
}*/
|
||||
}
|
||||
|
||||
public void Backup(String strDirectPath)
|
||||
{
|
||||
String strSoureceFile=XixunController.get().GetAppPath()
|
||||
+ "/shared_prefs/"
|
||||
+ Configurations.strConfigFileName
|
||||
+ ".xml";
|
||||
String strDirectFile=strDirectPath
|
||||
+ Configurations.strConfigFileName
|
||||
+ ".xml";
|
||||
|
||||
//MyLog.i("strSoureceFile= " +strSoureceFile);
|
||||
//MyLog.i("strDirectFile= " +strDirectFile);
|
||||
|
||||
pushBaseParams();
|
||||
FileOperator.copyFile(strSoureceFile, strDirectFile);
|
||||
}
|
||||
|
||||
|
||||
public void Recover(String strDirectPath)
|
||||
{
|
||||
String strDirectFile =XixunController.get().GetAppPath()
|
||||
+ "/shared_prefs/"
|
||||
+ Configurations.strConfigFileName
|
||||
+ ".xml";
|
||||
String strSoureceFile =strDirectPath
|
||||
+ Configurations.strConfigFileName
|
||||
+ ".xml";
|
||||
|
||||
File file=new File(strSoureceFile);
|
||||
if (file.exists()==false) return;
|
||||
|
||||
//MyLog.i("strSoureceFile= " +strSoureceFile);
|
||||
//MyLog.i("strDirectFile= " +strDirectFile);
|
||||
|
||||
FileOperator.copyFile(strSoureceFile, strDirectFile);
|
||||
|
||||
pullBaseParams();
|
||||
}
|
||||
|
||||
|
||||
// /data/data/com.xixun.display/shared_prefs/DisplayAppConfig.xml
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user