Initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.DS_Store
|
||||
@@ -0,0 +1,3 @@
|
||||
# https://dart.dev/guides/libraries/private-files
|
||||
# Created by `dart pub`
|
||||
.dart_tool/
|
||||
Generated
+3
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
Generated
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Dart SDK" level="project" />
|
||||
<orderEntry type="library" name="Dart Packages" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
+412
@@ -0,0 +1,412 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Dart Packages" type="DartPackagesLibraryType">
|
||||
<properties>
|
||||
<option name="packageNameToDirsMap">
|
||||
<entry key="_fe_analyzer_shared">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-62.0.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="analyzer">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-6.0.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="args">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.4.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="async">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.11.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="boolean_selector">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="collection">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="convert">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="coverage">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/coverage-1.6.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="crypto">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="dart_internal">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/dart_internal-0.2.8/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="dio">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/dio-5.2.1+1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="file">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/file-7.0.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="frontend_server_client">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/frontend_server_client-3.2.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="glob">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/glob-2.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="http_multi_server">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http_multi_server-3.2.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="http_parser">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="io">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="js">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/js-0.6.7/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="lints">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/lints-2.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="logging">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/logging-1.2.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="matcher">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.16/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="meta">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.9.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="mime">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/mime-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="mywishlist_api">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/../packages/mywishlist_api/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="node_preamble">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/node_preamble-2.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="package_config">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.1.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="path">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="pool">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pool-1.5.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="pub_semver">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pub_semver-2.1.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf-1.4.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_packages_handler">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_packages_handler-3.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_static">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_static-1.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_web_socket">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_web_socket-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_map_stack_trace">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_map_stack_trace-2.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_maps">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_maps-0.10.12/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_span">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="stack_trace">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="stream_channel">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="string_scanner">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="term_glyph">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="test">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test-1.24.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="test_api">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.6.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="test_core">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_core-0.5.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="typed_data">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.3.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="uuid">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/uuid-3.0.7/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="vm_service">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/vm_service-11.7.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="watcher">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/watcher-1.1.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="web_socket_channel">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-2.4.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="webkit_inspection_protocol">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/webkit_inspection_protocol-1.2.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="yaml">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/yaml-3.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</option>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-62.0.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-6.0.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.4.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.11.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/coverage-1.6.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dart_internal-0.2.8/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dio-5.2.1+1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/file-7.0.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/frontend_server_client-3.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/glob-2.1.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_multi_server-3.2.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/js-0.6.7/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/lints-2.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/logging-1.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.16/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.9.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/mime-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/node_preamble-2.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.1.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pool-1.5.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pub_semver-2.1.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf-1.4.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_packages_handler-3.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_static-1.1.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_web_socket-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_map_stack_trace-2.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_maps-0.10.12/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test-1.24.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.6.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_core-0.5.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.3.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/uuid-3.0.7/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vm_service-11.7.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/watcher-1.1.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-2.4.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/webkit_inspection_protocol-1.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/yaml-3.1.2/lib" />
|
||||
<root url="file://$PROJECT_DIR$/../packages/mywishlist_api/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+28
@@ -0,0 +1,28 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Dart SDK">
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/async" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/cli" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/core" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/ffi" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/html" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/io" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/js" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/js_interop" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/js_util" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/math" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/svg" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/api_example.iml" filepath="$PROJECT_DIR$/.idea/api_example.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,3 @@
|
||||
## 1.0.0
|
||||
|
||||
- Initial version.
|
||||
@@ -0,0 +1,2 @@
|
||||
A sample command-line application with an entrypoint in `bin/`, library code
|
||||
in `lib/`, and example unit test in `test/`.
|
||||
@@ -0,0 +1,30 @@
|
||||
# This file configures the static analysis results for your project (errors,
|
||||
# warnings, and lints).
|
||||
#
|
||||
# This enables the 'recommended' set of lints from `package:lints`.
|
||||
# This set helps identify many issues that may lead to problems when running
|
||||
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
|
||||
# style and format.
|
||||
#
|
||||
# If you want a smaller set of lints you can change this to specify
|
||||
# 'package:lints/core.yaml'. These are just the most critical lints
|
||||
# (the recommended set includes the core lints).
|
||||
# The core lints are also what is used by pub.dev for scoring packages.
|
||||
|
||||
include: package:lints/recommended.yaml
|
||||
|
||||
# Uncomment the following section to specify additional rules.
|
||||
|
||||
# linter:
|
||||
# rules:
|
||||
# - camel_case_types
|
||||
|
||||
# analyzer:
|
||||
# exclude:
|
||||
# - path/to/excluded/files/**
|
||||
|
||||
# For more information about the core and recommended set of lints, see
|
||||
# https://dart.dev/go/core-lints
|
||||
|
||||
# For additional information about configuring this file, see
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'package:api/api.dart' as api;
|
||||
import 'package:mywishlist_api/mywishlist_api.dart';
|
||||
|
||||
Future<void> main(List<String> arguments) async {
|
||||
try {
|
||||
final client = await MyWishlist().restore('howie', '31bc15b7270d6ca86352e3b0bc7cfd1c9a03afca', '23123123213');
|
||||
final records = await client.list.refresh();
|
||||
print(records);
|
||||
} catch (error) {
|
||||
print(error);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
int calculate() {
|
||||
return 6 * 7;
|
||||
}
|
||||
@@ -0,0 +1,404 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
_fe_analyzer_shared:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: "0816708f5fbcacca324d811297153fe3c8e047beb5c6752e12292d2974c17045"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "62.0.0"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: "21862995c9932cd082f89d72ae5f5e2c110d1a0204ad06e4ebaee8307b76b834"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.11.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.17.2"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
coverage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: coverage
|
||||
sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.3"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
dart_internal:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dart_internal
|
||||
sha256: dae3976f383beddcfcd07ad5291a422df2c8c0a8a03c52cda63ac7b4f26e0f4e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.8"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dio
|
||||
sha256: a9d76e72985d7087eb7c5e7903224ae52b337131518d127c554b9405936752b8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.2.1+1"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: frontend_server_client
|
||||
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: glob
|
||||
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
http_multi_server:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_multi_server
|
||||
sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.1"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
io:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: io
|
||||
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: lints
|
||||
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging
|
||||
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.16"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: mime
|
||||
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
mywishlist_api:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "../packages/mywishlist_api"
|
||||
relative: true
|
||||
source: path
|
||||
version: "1.0.0"
|
||||
node_preamble:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: node_preamble
|
||||
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
package_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_config
|
||||
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.3"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pool
|
||||
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pub_semver
|
||||
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf
|
||||
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
shelf_packages_handler:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_packages_handler
|
||||
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
shelf_static:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_static
|
||||
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
shelf_web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_web_socket
|
||||
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
source_map_stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_map_stack_trace
|
||||
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
source_maps:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_maps
|
||||
sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.10.12"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
test:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: test
|
||||
sha256: "67ec5684c7a19b2aba91d2831f3d305a6fd8e1504629c5818f8d64478abf4f38"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.24.4"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.1"
|
||||
test_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_core
|
||||
sha256: "6b753899253c38ca0523bb0eccff3934ec83d011705dae717c61ecf209e333c9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.5.4"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
uuid:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: uuid
|
||||
sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.7"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: b8c67f5fa3897b122cf60fe9ff314f7b0ef71eab25c5f8b771480bc338f48823
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.7.2"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: watcher
|
||||
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket_channel
|
||||
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
webkit_inspection_protocol:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webkit_inspection_protocol
|
||||
sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
sdks:
|
||||
dart: ">=3.0.5 <3.2.0"
|
||||
@@ -0,0 +1,19 @@
|
||||
name: api
|
||||
description: A sample command-line application.
|
||||
version: 1.0.0
|
||||
# repository: https://github.com/my_org/my_repo
|
||||
|
||||
environment:
|
||||
sdk: ^3.0.5
|
||||
|
||||
# Add regular dependencies here.
|
||||
dependencies:
|
||||
# path: ^1.8.0
|
||||
dio: ^5.2.1+1
|
||||
mywishlist_api:
|
||||
path: ../packages/mywishlist_api
|
||||
uuid: ^3.0.7
|
||||
|
||||
dev_dependencies:
|
||||
lints: ^2.0.0
|
||||
test: ^1.21.0
|
||||
@@ -0,0 +1,8 @@
|
||||
import 'package:api/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('calculate', () {
|
||||
expect(calculate(), 42);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# https://dart.dev/guides/libraries/private-files
|
||||
# Created by `dart pub`
|
||||
.dart_tool/
|
||||
|
||||
# Avoid committing pubspec.lock for library packages; see
|
||||
# https://dart.dev/guides/libraries/private-files#pubspeclock.
|
||||
pubspec.lock
|
||||
Generated
+3
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
@@ -0,0 +1,404 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Dart Packages" type="DartPackagesLibraryType">
|
||||
<properties>
|
||||
<option name="packageNameToDirsMap">
|
||||
<entry key="_fe_analyzer_shared">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-62.0.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="analyzer">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-6.0.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="args">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.4.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="async">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.11.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="boolean_selector">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="collection">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="convert">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="coverage">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/coverage-1.6.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="crypto">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="dart_internal">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/dart_internal-0.2.8/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="dio">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/dio-5.2.1+1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="file">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/file-7.0.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="frontend_server_client">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/frontend_server_client-3.2.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="glob">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/glob-2.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="http_multi_server">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http_multi_server-3.2.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="http_parser">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="io">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="js">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/js-0.6.7/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="lints">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/lints-2.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="logging">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/logging-1.2.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="matcher">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.16/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="meta">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.9.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="mime">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/mime-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="node_preamble">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/node_preamble-2.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="package_config">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.1.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="path">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.3/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="pool">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pool-1.5.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="pub_semver">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/pub_semver-2.1.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf-1.4.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_packages_handler">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_packages_handler-3.0.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_static">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_static-1.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="shelf_web_socket">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_web_socket-1.0.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_map_stack_trace">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_map_stack_trace-2.1.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_maps">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_maps-0.10.12/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="source_span">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="stack_trace">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="stream_channel">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="string_scanner">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="term_glyph">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="test">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test-1.24.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="test_api">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.6.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="test_core">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_core-0.5.4/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="typed_data">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.3.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="uuid">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/uuid-3.0.7/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="vm_service">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/vm_service-11.7.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="watcher">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/watcher-1.1.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="web_socket_channel">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-2.4.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="webkit_inspection_protocol">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/webkit_inspection_protocol-1.2.0/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="yaml">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/yaml-3.1.2/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</option>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-62.0.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/analyzer-6.0.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/args-2.4.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/async-2.11.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/coverage-1.6.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dart_internal-0.2.8/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/dio-5.2.1+1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/file-7.0.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/frontend_server_client-3.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/glob-2.1.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_multi_server-3.2.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/io-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/js-0.6.7/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/lints-2.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/logging-1.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.16/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.9.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/mime-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/node_preamble-2.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/package_config-2.1.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/path-1.8.3/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pool-1.5.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/pub_semver-2.1.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf-1.4.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_packages_handler-3.0.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_static-1.1.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/shelf_web_socket-1.0.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_map_stack_trace-2.1.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_maps-0.10.12/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test-1.24.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.6.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_core-0.5.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/typed_data-1.3.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/uuid-3.0.7/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vm_service-11.7.2/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/watcher-1.1.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web_socket_channel-2.4.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/webkit_inspection_protocol-1.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/yaml-3.1.2/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
@@ -0,0 +1,28 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Dart SDK">
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/async" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/cli" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/core" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/ffi" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/html" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/io" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/js" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/js_interop" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/js_util" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/math" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/svg" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
||||
<root url="file://$USER_HOME$/flutter/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/mywishlist_api.iml" filepath="$PROJECT_DIR$/.idea/mywishlist_api.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Dart SDK" level="project" />
|
||||
<orderEntry type="library" name="Dart Packages" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,3 @@
|
||||
## 1.0.0
|
||||
|
||||
- Initial version.
|
||||
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
This README describes the package. If you publish this package to pub.dev,
|
||||
this README's contents appear on the landing page for your package.
|
||||
|
||||
For information about how to write a good package README, see the guide for
|
||||
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
|
||||
|
||||
For general information about developing packages, see the Dart guide for
|
||||
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
|
||||
and the Flutter guide for
|
||||
[developing packages and plugins](https://flutter.dev/developing-packages).
|
||||
-->
|
||||
|
||||
TODO: Put a short description of the package here that helps potential users
|
||||
know whether this package might be useful for them.
|
||||
|
||||
## Features
|
||||
|
||||
TODO: List what your package can do. Maybe include images, gifs, or videos.
|
||||
|
||||
## Getting started
|
||||
|
||||
TODO: List prerequisites and provide or point to information on how to
|
||||
start using the package.
|
||||
|
||||
## Usage
|
||||
|
||||
TODO: Include short and useful examples for package users. Add longer examples
|
||||
to `/example` folder.
|
||||
|
||||
```dart
|
||||
const like = 'sample';
|
||||
```
|
||||
|
||||
## Additional information
|
||||
|
||||
TODO: Tell users more about the package: where to find more information, how to
|
||||
contribute to the package, how to file issues, what response they can expect
|
||||
from the package authors, and more.
|
||||
@@ -0,0 +1,292 @@
|
||||
|
||||
public class Server {
|
||||
public static final int DOWNLOAD_REFRESH = 60;
|
||||
public static final String IMAGE_TEMP_FILE = "_upload_image";
|
||||
public static final int IMAGE_UPLOAD_MAX_HEIGHT = 1536;
|
||||
public static final int IMAGE_UPLOAD_MAX_WIDTH = 1536;
|
||||
public static final int NOTIFICATIONS_MINIMAL = 1;
|
||||
public static final int NOTIFICATIONS_NORMAL = 2;
|
||||
public static final int NOTIFICATIONS_SILENT = 0;
|
||||
public static final int NOTIFICATIONS_VERBOSE = 3;
|
||||
public static final String PREFS_SYNC = "PrefsSync";
|
||||
public static final String PREF_LAST_DOWNLOAD_LOCAL = "last_download_local";
|
||||
public static final String PREF_LAST_DOWNLOAD_SERVER = "last_download_server";
|
||||
public static final String PREF_ME_KEYPASS = "me_keypass";
|
||||
public static final String PREF_ME_LOGNAME = "me_logname";
|
||||
private static String api_url;
|
||||
private static AtomicBoolean downloadLock = new AtomicBoolean(false);
|
||||
private static String image_url_prefix;
|
||||
private static AtomicBoolean loginLock = new AtomicBoolean(false);
|
||||
private static AtomicBoolean uploadLock = new AtomicBoolean(false);
|
||||
private Context context;
|
||||
private String keypass;
|
||||
private String logname;
|
||||
private int notifications;
|
||||
private Date server_time;
|
||||
|
||||
static synchronized void api_setup(Context context2) {
|
||||
synchronized (Server.class) {
|
||||
if (api_url == null) {
|
||||
api_url = context2.getString(R.string.api_url);
|
||||
}
|
||||
if (image_url_prefix == null) {
|
||||
image_url_prefix = context2.getString(R.string.image_url_prefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String wishlistURLPublic(Context context2) {
|
||||
String logname2 = context2.getSharedPreferences(PREFS_SYNC, 0).getString(PREF_ME_LOGNAME, (String) null);
|
||||
if (logname2 == null) {
|
||||
return null;
|
||||
}
|
||||
return String.valueOf(context2.getString(R.string.wishlist_url_prefix)) + logname2;
|
||||
}
|
||||
|
||||
public static String wishlistURLPrivate(Context context2) {
|
||||
SharedPreferences settings = context2.getSharedPreferences(PREFS_SYNC, 0);
|
||||
String logname2 = settings.getString(PREF_ME_LOGNAME, (String) null);
|
||||
if (logname2 == null) {
|
||||
return null;
|
||||
}
|
||||
Params params = new Params();
|
||||
params.put("logname", logname2);
|
||||
params.put("keypass", settings.getString(PREF_ME_KEYPASS, (String) null));
|
||||
try {
|
||||
return String.valueOf(context2.getString(R.string.wishlist_url_login)) + "?" + HTTP.queryString(params);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Wish[] meWishes(Date changed_min, Date changed_max) throws IOException {
|
||||
Params params = paramsMe();
|
||||
if (changed_min != null) {
|
||||
params.put("changed_time_min", String.valueOf(dateForServer(changed_min)));
|
||||
}
|
||||
if (changed_max != null) {
|
||||
params.put("changed_time_max", String.valueOf(dateForServer(changed_max)));
|
||||
}
|
||||
try {
|
||||
JSONObject json_reply = getHTTPJSONObject("me/wish/list.json", params);
|
||||
if (json_reply.has("current_time")) {
|
||||
this.server_time = optJSONDate(json_reply, "current_time");
|
||||
}
|
||||
JSONArray json_wishes = json_reply.getJSONArray(WishList.Wishes.NAME);
|
||||
Wish[] wishes = new Wish[json_wishes.length()];
|
||||
for (int i = 0; i < json_wishes.length(); i++) {
|
||||
wishes[i] = wishFromJSON(json_wishes.getJSONObject(i));
|
||||
}
|
||||
return wishes;
|
||||
} catch (JSONException e) {
|
||||
Log.e("my_wishes", "exception", e);
|
||||
return new Wish[0];
|
||||
}
|
||||
}
|
||||
|
||||
public boolean meWishUpdate(Wish wish) throws IOException {
|
||||
try {
|
||||
JSONObject json_res = getHTTPJSONObject("me/wish/update.json", paramsMe(wishToParams(wish)));
|
||||
if (json_res.has("result") && json_res.getInt("result") == 1) {
|
||||
return true;
|
||||
}
|
||||
if (json_res.has("error")) {
|
||||
Log.w("meWishUpdate", json_res.getString("error"));
|
||||
}
|
||||
return false;
|
||||
} catch (JSONException e) {
|
||||
Log.e("meWishUpdate", "exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
public String meWishImageUpload(Wish wish) throws IOException {
|
||||
int res;
|
||||
Params params = paramsMe();
|
||||
String server_id = String.valueOf(wish.getServerID());
|
||||
params.put("id", server_id);
|
||||
if (wish.image_changed != null) {
|
||||
params.put("changed_time", String.valueOf(dateForServer(wish.image_changed)));
|
||||
}
|
||||
File image_file = new File(wish.getImageFile());
|
||||
String upload_url = String.valueOf(api_url) + "me/wish/image";
|
||||
if (Util.checkBitmapSize(image_file, 1536, 1536)) {
|
||||
Log.d("meWishImageUpload", "upload file");
|
||||
res = HTTP.uploadPut(image_file, upload_url, (Map<String, String>) params);
|
||||
} else {
|
||||
Log.d("meWishImageUpload", "upload downsampled");
|
||||
res = HTTP.uploadPut(Util.loadBitmapDownsampled(image_file, 1536, 1536), upload_url, (Map<String, String>) params);
|
||||
}
|
||||
Log.d("meWishImageUpload", "upload res: " + String.valueOf(res));
|
||||
if (res < 200 || res > 299) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
Params params2 = paramsMe();
|
||||
params2.put("id", server_id);
|
||||
JSONObject json_res = getHTTPJSONObject("me/wish/image_link.json", params2);
|
||||
if (json_res.has(WishList.PlainWishes.IMAGE_LINK)) {
|
||||
return json_res.getString(WishList.PlainWishes.IMAGE_LINK);
|
||||
}
|
||||
if (!json_res.has("error")) {
|
||||
return null;
|
||||
}
|
||||
Log.w("meWishImageUpload", json_res.getString("error"));
|
||||
return null;
|
||||
} catch (JSONException e) {
|
||||
Log.e("meWishImageUpload", "exception", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public Wish wishFromJSON(JSONObject json) {
|
||||
Wish wish = new Wish(this.context);
|
||||
wish.wish = json.optString("wish");
|
||||
wish.tags = json.optString("tags");
|
||||
wish.link = json.optString("link");
|
||||
wish.price = json.optString("price");
|
||||
wish.event = json.optString("event");
|
||||
wish.post = json.optString("post");
|
||||
wish.rating = json.optInt("rating");
|
||||
wish.visible = json.optInt("visible");
|
||||
wish.realized = json.optInt("realized") == 1;
|
||||
wish.setServerID(json.optLong("id"));
|
||||
wish.created = optJSONDate(json, "created_time");
|
||||
wish.changed = optJSONDate(json, "changed_time");
|
||||
wish.image_link = json.optString(WishList.PlainWishes.IMAGE_LINK);
|
||||
wish.setServerSync(true);
|
||||
wish.setImageServerSync(false);
|
||||
return wish;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public Params wishToParams(Wish wish) {
|
||||
Params params = new Params();
|
||||
if (wish.wish != null) {
|
||||
params.put("wish", wish.wish);
|
||||
}
|
||||
if (wish.tags != null) {
|
||||
params.put("tags", wish.tags);
|
||||
}
|
||||
if (wish.link != null) {
|
||||
params.put("link", wish.link);
|
||||
}
|
||||
if (wish.price != null) {
|
||||
params.put("price", wish.price);
|
||||
}
|
||||
if (wish.event != null) {
|
||||
params.put("event", wish.event);
|
||||
}
|
||||
if (wish.post != null) {
|
||||
params.put("post", wish.post);
|
||||
}
|
||||
params.put("rating", String.valueOf(wish.rating));
|
||||
params.put("visible", String.valueOf(wish.visible));
|
||||
params.put("realized", wish.realized ? "1" : "0");
|
||||
if (wish.issetServerID()) {
|
||||
params.put("id", String.valueOf(wish.getServerID()));
|
||||
}
|
||||
if (wish.changed != null) {
|
||||
params.put("changed_time", String.valueOf(dateForServer(wish.changed)));
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
public String upload() throws ServerException {
|
||||
if (!isConnected(this.context) || !isOnline(this.context)) {
|
||||
return null;
|
||||
}
|
||||
StringBuffer sb = new StringBuffer();
|
||||
int new_wishes = 0;
|
||||
int mod_wishes = 0;
|
||||
int images = 0;
|
||||
if (!uploadLock.compareAndSet(false, true)) {
|
||||
return null;
|
||||
}
|
||||
Log.d("upload", "start");
|
||||
if (this.notifications >= 3) {
|
||||
notificationInfo(R.string.op_upload, 17301640);
|
||||
}
|
||||
WishListDatabase wishListDatabase = new WishListDatabase(this.context);
|
||||
wishListDatabase.getClass();
|
||||
WishListDatabase.WishFinder finder = new WishListDatabase.WishFinder();
|
||||
Wish[] local_wishes = finder.all_no_server_sync();
|
||||
Wish[] sync_images = finder.all_image_no_server_sync_no_link();
|
||||
if (local_wishes.length == 0 && sync_images.length == 0) {
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(R.string.op_upload);
|
||||
}
|
||||
Log.d("upload", "nothing to upload");
|
||||
uploadLock.set(false);
|
||||
return null;
|
||||
}
|
||||
if (this.notifications >= 2) {
|
||||
notificationInfo(R.string.op_upload, 17301640);
|
||||
}
|
||||
try {
|
||||
int length = local_wishes.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
Wish wish = local_wishes[i];
|
||||
if (!wish.issetServerID()) {
|
||||
long id = meWishCreate(wish);
|
||||
if (id > 0) {
|
||||
Log.d("upload", "create ok, id: " + String.valueOf(id));
|
||||
wish.setServerID(id);
|
||||
new_wishes++;
|
||||
} else {
|
||||
Log.w("upload", "server hasn't accepted upload_create id: " + String.valueOf(wish.getID()));
|
||||
}
|
||||
} else if (meWishUpdate(wish)) {
|
||||
Log.d("upload", "update ok for id: " + String.valueOf(wish.server_id));
|
||||
mod_wishes++;
|
||||
} else {
|
||||
Log.w("upload", "server hasn't accepted upload_update id: " + String.valueOf(wish.server_id));
|
||||
}
|
||||
if (wish.isTrashed()) {
|
||||
wish.destroy();
|
||||
} else {
|
||||
wish.setServerSync(true);
|
||||
wish.save();
|
||||
}
|
||||
}
|
||||
Wish[] sync_images2 = finder.all_image_no_server_sync_no_link();
|
||||
int length2 = sync_images2.length;
|
||||
for (int i2 = 0; i2 < length2; i2++) {
|
||||
Wish wish2 = sync_images2[i2];
|
||||
Log.w("upload", "to upload image for: " + String.valueOf(wish2.getID()));
|
||||
String image_link = meWishImageUpload(wish2);
|
||||
if (image_link != null) {
|
||||
wish2.image_link = image_link;
|
||||
wish2.setImageServerSync(true);
|
||||
wish2.save();
|
||||
images++;
|
||||
}
|
||||
}
|
||||
uploadLock.set(false);
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(R.string.op_upload);
|
||||
}
|
||||
if (new_wishes > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(R.string.stat_new_wishes)) + ": " + String.valueOf(new_wishes) + "\n");
|
||||
}
|
||||
if (mod_wishes > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(R.string.stat_mod_wishes)) + ": " + String.valueOf(mod_wishes) + "\n");
|
||||
}
|
||||
if (images > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(R.string.stat_images)) + ": " + String.valueOf(images) + "\n");
|
||||
}
|
||||
return sb.toString();
|
||||
} catch (HTTP.HTTPException e) {
|
||||
String handleIOException = handleIOException(e, R.string.op_upload);
|
||||
uploadLock.set(false);
|
||||
return handleIOException;
|
||||
} catch (IOException e2) {
|
||||
String handleIOException2 = handleIOException(e2, R.string.op_upload);
|
||||
uploadLock.set(false);
|
||||
return handleIOException2;
|
||||
} catch (Throwable th) {
|
||||
uploadLock.set(false);
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="4" android:versionName="1.4b" android:installLocation="auto" package="ru.wishlist.wishlist">
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19"/>
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
|
||||
<application android:theme="@style/AppTheme" android:label="@string/app_name" android:icon="@drawable/ic_launcher" android:name="WishlistApplication" android:allowBackup="true">
|
||||
<provider android:name="WishListProvider" android:exported="false" android:authorities="ru.wishlist.provider.WishList">
|
||||
<grant-uri-permission android:pathPattern=".*"/>
|
||||
</provider>
|
||||
<activity android:label="@string/app_name" android:name="WishListActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<action android:name="android.intent.action.EDIT"/>
|
||||
<action android:name="android.intent.action.PICK"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="vnd.android.cursor.dir/vnd.ru.wishlist.provider.plain_wish"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.GET_CONTENT"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="vnd.android.cursor.item/vnd.ru.wishlist.provider.plain_wish"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:label="@string/app_name" android:name="WishViewActivity">
|
||||
<intent-filter android:label="@string/resolve_edit">
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<action android:name="ru.wishlist.wishlist.action.VIEW_WISH"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="vnd.android.cursor.item/vnd.ru.wishlist.provider.plain_wish"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="WishEditActivity">
|
||||
<intent-filter android:label="@string/resolve_edit">
|
||||
<action android:name="android.intent.action.EDIT"/>
|
||||
<action android:name="ru.wishlist.wishlist.action.EDIT_WISH"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="vnd.android.cursor.item/vnd.ru.wishlist.provider.plain_wish"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.INSERT"/>
|
||||
<action android:name="ru.wishlist.wishlist.action.ADD_WISH"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="vnd.android.cursor.dir/vnd.ru.wishlist.provider.plain_wish"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="image/*"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="ru.wishlist.wishlist.action.PHOTO_WISH"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="WishDeleteActivity">
|
||||
<intent-filter android:label="@string/resolve_edit">
|
||||
<action android:name="android.intent.action.DELETE"/>
|
||||
<action android:name="ru.wishlist.wishlist.action.DELETE_WISH"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="vnd.android.cursor.item/vnd.ru.wishlist.provider.plain_wish"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="LoginActivity" android:noHistory="true">
|
||||
<intent-filter android:label="@string/login">
|
||||
<action android:name="ru.wishlist.wishlist.action.SIGNIN_LOGIN"/>
|
||||
<action android:name="ru.wishlist.wishlist.action.SIGNUP_LOGIN"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:label="@string/app_name" android:name="WishSlidePagerActivity"/>
|
||||
<activity android:name="ImageViewActivity"/>
|
||||
<activity android:label="@string/title_wish_list" android:name="ShortcutsActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.CREATE_SHORTCUT"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="WelcomeActivity" android:noHistory="true"/>
|
||||
</application>
|
||||
</manifest>
|
||||
Binary file not shown.
@@ -0,0 +1,88 @@
|
||||
Signature-Version: 1.0
|
||||
Created-By: 1.0 (Android)
|
||||
SHA1-Digest-Manifest: sQGA30Eltcv+VGj6TV1g9cU0Mnk=
|
||||
|
||||
Name: res/drawable/border.xml
|
||||
SHA1-Digest: W4Xhw2ap+ibckQEGi4xp0BwBQSU=
|
||||
|
||||
Name: res/drawable-xhdpi/ic_launcher.png
|
||||
SHA1-Digest: 7WbKpaspgpc1sMgqHnjC08ZbzGg=
|
||||
|
||||
Name: res/layout/wish_view.xml
|
||||
SHA1-Digest: bK8q578iBHi3K0jqmXbPx8LMePg=
|
||||
|
||||
Name: res/drawable-hdpi/ic_launcher.png
|
||||
SHA1-Digest: Wpr9cILUkDBnv/hW4+4zX0T92yo=
|
||||
|
||||
Name: res/drawable/textfield_default.xml
|
||||
SHA1-Digest: BSo47Efq7ZbVXDbTHsBGz4plci4=
|
||||
|
||||
Name: resources.arsc
|
||||
SHA1-Digest: SELmZyXPRgWTSKnJtOSrhvfod7M=
|
||||
|
||||
Name: res/layout/wishlist_item.xml
|
||||
SHA1-Digest: bZJSJ/jFjJ4E3xlhX15RP7l9WvA=
|
||||
|
||||
Name: res/menu/wishlist_options_menu.xml
|
||||
SHA1-Digest: w3PeIc/7etSjXie3z3oJHwJxlTU=
|
||||
|
||||
Name: AndroidManifest.xml
|
||||
SHA1-Digest: 0xy6kzpX9rhZU8Sem2Nci91c4zI=
|
||||
|
||||
Name: res/layout/wish_slide_pager.xml
|
||||
SHA1-Digest: 3yL4F5Q0N7qNxPec/s+285RZOQ4=
|
||||
|
||||
Name: res/layout/wish_form.xml
|
||||
SHA1-Digest: SFOl9I5yLP5ARxEj49kyDOkY3pM=
|
||||
|
||||
Name: res/layout/login_form.xml
|
||||
SHA1-Digest: draLtw7Lv7sLuSSgOiaf2wo+8SU=
|
||||
|
||||
Name: res/layout/shortcuts_fragment.xml
|
||||
SHA1-Digest: i2iB28qqDVf7yEZyvsNrSORVSj0=
|
||||
|
||||
Name: res/drawable/divider.xml
|
||||
SHA1-Digest: YOo+U/dc42VPRhMBHOii+ncy+tQ=
|
||||
|
||||
Name: res/layout/wish_add_fragment.xml
|
||||
SHA1-Digest: wvDpNLNFHx48X8Ipy/4ZRbaiLkU=
|
||||
|
||||
Name: res/layout/welcome.xml
|
||||
SHA1-Digest: vu1GAowbCJPOqNioBHSVV34568A=
|
||||
|
||||
Name: res/layout/image_view.xml
|
||||
SHA1-Digest: MzHUpJs8O66t0ZkAo5JD7DeL/Zc=
|
||||
|
||||
Name: res/drawable/textfield_pressed.xml
|
||||
SHA1-Digest: chV9oBqVAP7ZhDUzHtDSr9+I0q0=
|
||||
|
||||
Name: res/drawable/textfield_selected.xml
|
||||
SHA1-Digest: yXIbYgGuFUmJaSqQ1daWLxBXIzA=
|
||||
|
||||
Name: res/drawable/edit_text.xml
|
||||
SHA1-Digest: yru4Cwtl3G7iB7p/0KeCD0OFrlg=
|
||||
|
||||
Name: classes.dex
|
||||
SHA1-Digest: 5zwfnMt6oLso5/mJDW3r2yMklPA=
|
||||
|
||||
Name: res/drawable-xxhdpi/ic_launcher.png
|
||||
SHA1-Digest: mRoZcqOJlRv3fuxGCozlaHAlyvs=
|
||||
|
||||
Name: res/menu/wish_edit_options_menu.xml
|
||||
SHA1-Digest: NnuxXSVrzso+q657R0+oQmhhio4=
|
||||
|
||||
Name: res/layout/divider_horizontal.xml
|
||||
SHA1-Digest: uphsMGGZkLMBgJgAAZLh0CEI1c0=
|
||||
|
||||
Name: res/drawable-mdpi/ic_launcher.png
|
||||
SHA1-Digest: vB9Z6K1kpt921xFsiYG8XVzQpuc=
|
||||
|
||||
Name: res/menu/wish_options_menu.xml
|
||||
SHA1-Digest: KDRf3roDj8FiIh15h1GE+mZ7NK8=
|
||||
|
||||
Name: res/layout/login_fragment.xml
|
||||
SHA1-Digest: lJ0Qg/Egaj4dMMrY32O4zur+T58=
|
||||
|
||||
Name: res/drawable/section_divided_background.xml
|
||||
SHA1-Digest: Vzv2Jl/GAVHqyRUveNkGNL4cPH8=
|
||||
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
Manifest-Version: 1.0
|
||||
Created-By: 1.0 (Android)
|
||||
|
||||
Name: res/drawable-xhdpi/ic_launcher.png
|
||||
SHA1-Digest: FtJSat1FXEELw34IV58m3hTTyek=
|
||||
|
||||
Name: res/drawable/border.xml
|
||||
SHA1-Digest: 11TABrPrJ9Agb/zlxaLU8/eOybQ=
|
||||
|
||||
Name: res/layout/wish_view.xml
|
||||
SHA1-Digest: sF9Hcj6DAwp6RVLJMkgDDlUCtcs=
|
||||
|
||||
Name: res/drawable-hdpi/ic_launcher.png
|
||||
SHA1-Digest: 8/RyPNELjvL8p8OEUFY3LkyKhHk=
|
||||
|
||||
Name: res/drawable/textfield_default.xml
|
||||
SHA1-Digest: bNG6/jra+CGQ2cEDbyOpywSavH0=
|
||||
|
||||
Name: resources.arsc
|
||||
SHA1-Digest: MeA5vUdYBWxFUU/fEl1RZ3Rdlbc=
|
||||
|
||||
Name: res/layout/wishlist_item.xml
|
||||
SHA1-Digest: 1AyFIHnesgoSOO02Rij/GMwLO8Y=
|
||||
|
||||
Name: res/menu/wishlist_options_menu.xml
|
||||
SHA1-Digest: KZxIZ8Z+rEqNgcMAoHygllOtvIU=
|
||||
|
||||
Name: AndroidManifest.xml
|
||||
SHA1-Digest: p/YnbzkA2qyfIvkCxmrHnWYkLJI=
|
||||
|
||||
Name: res/layout/wish_form.xml
|
||||
SHA1-Digest: OU6ALw+uhXvHaU//ekH/3XC2nA8=
|
||||
|
||||
Name: res/layout/wish_slide_pager.xml
|
||||
SHA1-Digest: Uv0cGNVycU3ws+o1VFUpc+q1XIg=
|
||||
|
||||
Name: res/layout/login_form.xml
|
||||
SHA1-Digest: /NFSIgReT4bToxcy7lTqXQ4EV3U=
|
||||
|
||||
Name: res/layout/shortcuts_fragment.xml
|
||||
SHA1-Digest: A96VeecyhByzZRJvQErxzN4sE1M=
|
||||
|
||||
Name: res/drawable/divider.xml
|
||||
SHA1-Digest: VAqoa7jkV00mVsv6vdMleTPyQ3U=
|
||||
|
||||
Name: res/layout/wish_add_fragment.xml
|
||||
SHA1-Digest: /O4HcUIySeqjEHC6Fl0bFZK26Po=
|
||||
|
||||
Name: res/layout/welcome.xml
|
||||
SHA1-Digest: KNUnZNGaUemGa/ktPugayyiQeHY=
|
||||
|
||||
Name: res/layout/image_view.xml
|
||||
SHA1-Digest: 74E5PB94X4t4NFltx+6R2d5GKoo=
|
||||
|
||||
Name: res/drawable/textfield_pressed.xml
|
||||
SHA1-Digest: NXyHjiNaUG8J+LWXgQsor/VcMeg=
|
||||
|
||||
Name: res/drawable/textfield_selected.xml
|
||||
SHA1-Digest: s5WKeK8z5SIRlmi6g/i1IVeYKbM=
|
||||
|
||||
Name: res/drawable/edit_text.xml
|
||||
SHA1-Digest: bCAkqBkfT9dovEd6jze9ff67oq8=
|
||||
|
||||
Name: classes.dex
|
||||
SHA1-Digest: lDYI00S7tEL6bImI1gwyXFlBK74=
|
||||
|
||||
Name: res/drawable-xxhdpi/ic_launcher.png
|
||||
SHA1-Digest: PgDiDNsxlKSYQs5GIh3GDr7VHSQ=
|
||||
|
||||
Name: res/menu/wish_edit_options_menu.xml
|
||||
SHA1-Digest: MjXMYmllV2QvHj//l3az3VfQf7s=
|
||||
|
||||
Name: res/layout/divider_horizontal.xml
|
||||
SHA1-Digest: ypQnNx9hhS7bY5lummpJqHMz7Vc=
|
||||
|
||||
Name: res/drawable-mdpi/ic_launcher.png
|
||||
SHA1-Digest: VaVSRbhomAo7YNNQSlSLEP3Osvg=
|
||||
|
||||
Name: res/menu/wish_options_menu.xml
|
||||
SHA1-Digest: 1b2qi3bsk4eJ5WhMaKzyYVuP3H0=
|
||||
|
||||
Name: res/layout/login_fragment.xml
|
||||
SHA1-Digest: GQMM90vRRwumcpzo1p62Oq4uDnQ=
|
||||
|
||||
Name: res/drawable/section_divided_background.xml
|
||||
SHA1-Digest: A5TqRq2a9b9Bs5Cz96xnJzL24HI=
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 9.6 KiB |
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="@android:color/darker_gray"/>
|
||||
</shape>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="#f00"/>
|
||||
</shape>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/textfield_selected"/>
|
||||
<item android:state_pressed="true" android:drawable="@drawable/textfield_pressed"/>
|
||||
<item android:drawable="@drawable/textfield_default"/>
|
||||
</selector>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:left="-2dp" android:top="0dp" android:right="-2dp" android:bottom="-2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="@color/basic_light2"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:left="@dimen/minimal_padding" android:top="@dimen/minimal_padding" android:right="@dimen/minimal_padding" android:bottom="@dimen/minimal_padding">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="@color/basic_light3"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/alter_light"/>
|
||||
</shape>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<stroke android:width="1dp" android:color="@color/alter_vivid"/>
|
||||
</shape>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android" android:background="@color/basic_light2" android:layout_width="match_parent" android:layout_height="1dp"/>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:background="#000000" android:layout_width="match_parent" android:layout_height="match_parent">
|
||||
<p004uk.p005co.senab.photoview.PhotoView android:id="@+id/view_image" android:layout_width="match_parent" android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSection">
|
||||
<EditText android:id="@+id/login_form_login" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/login" android:singleLine="true"/>
|
||||
<EditText android:id="@+id/login_form_password" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/password" android:singleLine="true" android:inputType="textPassword"/>
|
||||
<EditText android:id="@+id/login_form_password_repeat" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/password_repeat" android:singleLine="true" android:inputType="textPassword"/>
|
||||
<Button android:id="@+id/login_form_submit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/signup" android:onClick="submit"/>
|
||||
<ProgressBar android:id="@+id/login_form_progress_bar" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSection">
|
||||
<TextView android:id="@android:id/text1" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/about_login"/>
|
||||
<Button android:id="@+id/button_login_signin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/signin"/>
|
||||
<Button android:id="@+id/button_login_signup" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/signup"/>
|
||||
</LinearLayout>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSection">
|
||||
<TextView android:id="@android:id/text1" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/about_shortcuts"/>
|
||||
<TableLayout android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content">
|
||||
<FrameLayout android:layout_weight="30">
|
||||
<Button android:id="@+id/button_add_shortcut_photo_wish" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/install"/>
|
||||
</FrameLayout>
|
||||
<LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="70">
|
||||
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher"/>
|
||||
<TextView android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/shortcut_photo_wish"/>
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content">
|
||||
<FrameLayout android:layout_weight="30">
|
||||
<Button android:id="@+id/button_add_shortcut_add_wish" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/install"/>
|
||||
</FrameLayout>
|
||||
<LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="70">
|
||||
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_launcher"/>
|
||||
<TextView android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/shortcut_add_wish"/>
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
</LinearLayout>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
|
||||
<fragment android:name="p003ru.wishlist.wishlist.WishAddFragment" android:id="@+id/wish_add_fragment" android:layout_width="match_parent" android:layout_height="wrap_content"/>
|
||||
<include layout="@layout/divider_horizontal"/>
|
||||
<fragment android:name="p003ru.wishlist.wishlist.LoginFragment" android:id="@+id/login_fragment" android:layout_width="match_parent" android:layout_height="wrap_content"/>
|
||||
<include layout="@layout/divider_horizontal"/>
|
||||
<fragment android:name="p003ru.wishlist.wishlist.ShortcutsFragment" android:id="@+id/shortcuts_fragment" android:layout_width="match_parent" android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSection">
|
||||
<TextView android:id="@android:id/text1" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/wishlist_is_ready"/>
|
||||
<Button android:id="@+id/button_wish_add" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/add_wish"/>
|
||||
</LinearLayout>
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSection">
|
||||
<EditText android:id="@+id/wish_form_wish" android:layout_width="match_parent" android:layout_height="40dp" android:hint="@string/wish" android:singleLine="true"/>
|
||||
<p003ru.wishlist.extra.ClearableEditText android:id="@+id/wish_form_tags" android:layout_width="match_parent" android:layout_height="40dp" android:hint="@string/wish_tags" android:singleLine="true"/>
|
||||
<RelativeLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/ContentSection">
|
||||
<RelativeLayout android:id="@+id/wish_form_image_group" android:paddingLeft="@dimen/minimal_padding" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<ImageView android:id="@+id/wish_form_image" android:layout_width="@dimen/wish_edit_image_size" android:layout_height="@dimen/wish_edit_image_size" android:scaleType="centerCrop" android:adjustViewBounds="true"/>
|
||||
<ImageButton android:id="@+id/wish_form_delete_picture" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@android:drawable/ic_delete" android:text="@string/delete_picture" android:layout_alignTop="@+id/wish_form_image" android:layout_alignRight="@+id/wish_form_image" android:onClick="deletePictureWishForm"/>
|
||||
</RelativeLayout>
|
||||
<LinearLayout android:orientation="horizontal" android:id="@+id/wish_form_image_add" android:layout_width="wrap_content" android:layout_height="wrap_content">
|
||||
<ImageButton android:id="@+id/wish_form_photo_picture" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@android:drawable/ic_menu_camera" android:text="@string/photo_picture" android:onClick="photoPicture"/>
|
||||
<ImageButton android:id="@+id/wish_form_choose_picture" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@android:drawable/ic_menu_gallery" android:text="@string/choose_picture" android:onClick="choosePicture"/>
|
||||
</LinearLayout>
|
||||
<Button android:id="@+id/wish_form_save1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/save" android:layout_alignParentRight="true" android:onClick="saveWishForm"/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
<include layout="@layout/divider_horizontal"/>
|
||||
<RelativeLayout android:orientation="horizontal" android:id="@+id/wish_form_details" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSection">
|
||||
<FrameLayout android:id="@+id/header1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:onClick="detailsOnClick">
|
||||
<TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/details" style="@style/TextHeaderSection"/>
|
||||
</FrameLayout>
|
||||
<FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:onClick="detailsOnClick">
|
||||
<ImageView android:layout_gravity="right" android:id="@+id/icon1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@android:drawable/arrow_down_float" style="?android:attr/ratingBarStyleSmall"/>
|
||||
</FrameLayout>
|
||||
<LinearLayout android:orientation="vertical" android:id="@+id/wish_form_details_group" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/header1" style="@style/ContentExpandableSection">
|
||||
<EditText android:id="@+id/wish_form_link" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/link" android:singleLine="true"/>
|
||||
<LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<EditText android:id="@+id/wish_form_price" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/wish_price" android:singleLine="true" android:layout_weight="60"/>
|
||||
<EditText android:id="@+id/wish_form_event" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/wish_event" android:singleLine="true" android:layout_weight="40"/>
|
||||
</LinearLayout>
|
||||
<EditText android:id="@+id/wish_form_post" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/element_bottom_padding" android:hint="@string/wish_post"/>
|
||||
<RelativeLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/raiting" android:layout_alignParentLeft="true" style="@style/FormLabel"/>
|
||||
<RatingBar android:id="@+id/wish_form_rating" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true"/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TextView android:id="@+id/text3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/wish_visible" android:layout_alignParentLeft="true" style="@style/FormLabel"/>
|
||||
<Spinner android:entries="@array/wish_visible_titles" android:id="@+id/wish_form_visible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:prompt="@string/wish_visible" android:layout_alignParentRight="true"/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TextView android:id="@+id/text4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/wish_realized" android:layout_alignParentLeft="true" style="@style/FormLabel"/>
|
||||
<CheckBox android:id="@+id/wish_form_realized" android:layout_width="wrap_content" android:layout_height="wrap_content" android:prompt="@string/wish_realized" android:layout_alignParentRight="true"/>
|
||||
</RelativeLayout>
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutFormBottom">
|
||||
<Button android:id="@+id/wish_form_save2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/save" android:onClick="saveWishForm"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<include layout="@layout/divider_horizontal"/>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.p000v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="match_parent"/>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSection">
|
||||
<TextView android:id="@+id/view_wish" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/TextAppearance.Medium"/>
|
||||
<TextView android:id="@+id/view_tags" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
|
||||
<FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" style="@style/ContentSection">
|
||||
<p003ru.wishlist.extra.SquareInwardImageView android:id="@+id/view_image" android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<FrameLayout android:id="@+id/view_link_section" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSectionDivided">
|
||||
<TextView android:id="@+id/view_link" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="1" style="@style/LinkRemark"/>
|
||||
</FrameLayout>
|
||||
<TableLayout android:orientation="horizontal" android:id="@+id/view_price_event" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSectionDivided">
|
||||
<TableRow>
|
||||
<TextView android:id="@+id/view_price" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="60"/>
|
||||
<TextView android:gravity="right" android:id="@+id/view_event" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="40"/>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
<TextView android:id="@+id/view_post" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSectionDivided"/>
|
||||
<LinearLayout android:gravity="right" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSectionDivided">
|
||||
<RatingBar android:id="@+id/view_rating" android:layout_width="wrap_content" android:layout_height="wrap_content" android:isIndicator="true"/>
|
||||
<TextView android:id="@+id/view_visible" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/LayoutSection">
|
||||
<ImageView android:id="@+id/view_image" android:layout_width="@dimen/wishlist_image_size" android:layout_height="@dimen/wishlist_image_size" android:scaleType="centerCrop" android:adjustViewBounds="true"/>
|
||||
<LinearLayout android:orientation="vertical" android:paddingLeft="@dimen/listview_column_padding_left" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TextView android:id="@+id/view_wish" android:layout_width="match_parent" android:layout_height="wrap_content" android:singleLine="true" style="@style/TextHeader"/>
|
||||
<TableLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:stretchColumns="0" android:shrinkColumns="0">
|
||||
<TableRow>
|
||||
<LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="50">
|
||||
<TextView android:id="@+id/view_tags" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/TextRemark"/>
|
||||
<TextView android:id="@+id/view_link" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/LinkRemark"/>
|
||||
<LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content">
|
||||
<TextView android:id="@+id/view_price" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/TextRemark"/>
|
||||
<TextView android:id="@+id/view_event" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/TextRemark"/>
|
||||
</LinearLayout>
|
||||
<TextView android:id="@+id/view_post" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/TextRemark"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:gravity="right" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="50">
|
||||
<RatingBar android:id="@+id/view_rating" android:layout_width="wrap_content" android:layout_height="wrap_content" android:isIndicator="true" style="?android:attr/ratingBarStyleSmall"/>
|
||||
<TextView android:id="@+id/view_visible" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/TextRemarkLast"/>
|
||||
</LinearLayout>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:icon="@android:drawable/ic_menu_save" android:id="@+id/menu_save" android:title="@string/save" android:alphabeticShortcut="s" android:showAsAction="always"/>
|
||||
<item android:icon="@android:drawable/ic_menu_close_clear_cancel" android:id="@+id/menu_cancel" android:title="@string/cancel" android:alphabeticShortcut="c" android:showAsAction="always"/>
|
||||
</menu>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:icon="@android:drawable/ic_menu_add" android:id="@+id/menu_add" android:title="@string/menu_add" android:alphabeticShortcut="a" android:showAsAction="always"/>
|
||||
<item android:icon="@android:drawable/checkbox_on_background" android:id="@+id/menu_realized" android:title="@string/wish_realized" android:alphabeticShortcut="r" android:showAsAction="always"/>
|
||||
<item android:icon="@android:drawable/ic_menu_edit" android:id="@+id/menu_edit" android:title="@string/menu_edit" android:alphabeticShortcut="e" android:showAsAction="always"/>
|
||||
<item android:icon="@android:drawable/ic_menu_share" android:id="@+id/menu_share" android:title="@string/menu_share" android:alphabeticShortcut="s" android:showAsAction="always"/>
|
||||
<item android:icon="@android:drawable/ic_menu_delete" android:id="@+id/menu_delete" android:title="@string/menu_delete" android:alphabeticShortcut="d" android:showAsAction="always"/>
|
||||
</menu>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:icon="@android:drawable/ic_menu_add" android:id="@+id/menu_add" android:title="@string/menu_add" android:alphabeticShortcut="a" android:showAsAction="always"/>
|
||||
<item android:id="@+id/menu_wishlist" android:title="@string/wishlist"/>
|
||||
<item android:id="@+id/menu_realized" android:title="@string/realized"/>
|
||||
<item android:id="@+id/menu_wishlistru" android:title="@string/menu_site" android:showAsAction="always">
|
||||
<menu>
|
||||
<group android:id="@+id/group_disconnected">
|
||||
<item android:id="@+id/menu_signin" android:title="@string/signin"/>
|
||||
<item android:id="@+id/menu_signup" android:title="@string/signup"/>
|
||||
</group>
|
||||
<group android:id="@+id/group_connected">
|
||||
<item android:id="@+id/menu_my_wishlist" android:title="@string/my_wishlist"/>
|
||||
<item android:id="@+id/menu_resync" android:title="@string/resync"/>
|
||||
<item android:id="@+id/menu_signout" android:title="@string/signout"/>
|
||||
</group>
|
||||
<item android:id="@+id/menu_website" android:title="@string/website"/>
|
||||
</menu>
|
||||
</item>
|
||||
<item android:icon="@android:drawable/ic_menu_share" android:id="@+id/menu_share" android:title="@string/menu_share" android:alphabeticShortcut="s" android:showAsAction="always"/>
|
||||
<item android:icon="@android:drawable/ic_menu_preferences" android:id="@+id/menu_preferences" android:visible="true" android:title="@string/menu_preferences">
|
||||
<menu>
|
||||
<item android:id="@+id/menu_reset" android:title="@string/full_reset"/>
|
||||
</menu>
|
||||
</item>
|
||||
</menu>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<array name="wish_visible_titles">
|
||||
<item>лично</item>
|
||||
<item>друзьям</item>
|
||||
<item>всем</item>
|
||||
</array>
|
||||
</resources>
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="action_settings">Настройки</string>
|
||||
<string name="send">Send</string>
|
||||
<string name="title_wish_list">Вишлист</string>
|
||||
<string name="menu_add">Добавить</string>
|
||||
<string name="menu_edit">Редактировать</string>
|
||||
<string name="menu_share">Поделиться</string>
|
||||
<string name="menu_site">Веб-сайт</string>
|
||||
<string name="resolve_edit">Edit note</string>
|
||||
<string name="title_create">Новое желание</string>
|
||||
<string name="title_edit">Редактировать</string>
|
||||
<string name="error_title">Ошибка</string>
|
||||
<string name="error_network">Ошибка сети</string>
|
||||
<string name="error_no_network">Отсутствует сеть</string>
|
||||
<string name="error_no_account">Отсутствует подключение к сайту</string>
|
||||
<string name="error_server">Ошибка сервера</string>
|
||||
<string name="error_unauthorized">Неправильный логин или пароль</string>
|
||||
<string name="error_already_in_progress">Действие уже выполняется</string>
|
||||
<string name="wish">Желание</string>
|
||||
<string name="wish_post">Дополнения</string>
|
||||
<string name="add">Добавить</string>
|
||||
<string name="save">Сохранить</string>
|
||||
<string name="cancel">Отменить</string>
|
||||
<string name="delete">Удалить</string>
|
||||
<string name="yes">Да</string>
|
||||
<string name="no">Нет</string>
|
||||
<string name="install">Установить</string>
|
||||
<string name="take_picture">Добавить картинку</string>
|
||||
<string name="choose_picture">Выбрать картинку</string>
|
||||
<string name="photo_picture">Сделать фото</string>
|
||||
<string name="change_picture">Изменить картинку</string>
|
||||
<string name="delete_picture">Удалить картинку</string>
|
||||
<string name="menu_delete">Удалить</string>
|
||||
<string name="signup">Зарегистрироваться</string>
|
||||
<string name="login">Логин</string>
|
||||
<string name="password">Пароль</string>
|
||||
<string name="password_repeat">Пароль повторно</string>
|
||||
<string name="signin">Подключиться</string>
|
||||
<string name="signout">Отключиться</string>
|
||||
<string name="resync">Синхронзировать</string>
|
||||
<string name="skip">Пропустить</string>
|
||||
<string name="wishlistru">WISHLIST.RU</string>
|
||||
<string name="subject_in_my_wishlist">В моем вишлисте</string>
|
||||
<string name="link">Ссылка</string>
|
||||
<string name="website">Главная страница</string>
|
||||
<string name="my_wishlist">Мой вишлист</string>
|
||||
<string name="op_signin">Подключение к серверу</string>
|
||||
<string name="op_signup">Регистрация на сервере</string>
|
||||
<string name="op_upload">Загрузка на сервер</string>
|
||||
<string name="op_download">Скачивание с сервера</string>
|
||||
<string name="resync_complete">Обновление завершено</string>
|
||||
<string name="stat_new_wishes">новых желаний</string>
|
||||
<string name="stat_mod_wishes">измененных желаний</string>
|
||||
<string name="stat_images">картинок</string>
|
||||
<string name="shortcut_add_wish">+желание</string>
|
||||
<string name="shortcut_photo_wish">+фото</string>
|
||||
<string name="add_wish">Добавить желание</string>
|
||||
<string name="photo_wish">Фотографировать желание</string>
|
||||
<string name="about_shortcuts">Для быстрого фотографирования или добавления желания в вишлист можно установить ярлыки на домашний экран.</string>
|
||||
<string name="about_login">Подключитесь, если у вас уже есть аккаунту на сайте WISHLIST.RU. Или зарегистрируетсь через приложение.</string>
|
||||
<string name="details">Дополнительно</string>
|
||||
<string name="wish_tags">Теги</string>
|
||||
<string name="wish_price">Цена</string>
|
||||
<string name="wish_event">Повод</string>
|
||||
<string name="wish_visible">Видимость</string>
|
||||
<string name="wish_realized">Исполнено</string>
|
||||
<string name="raiting">Желанность</string>
|
||||
<string name="menu_preferences">Настройки</string>
|
||||
<string name="full_reset">Удалить все желания</string>
|
||||
<string name="realized">Исполненные</string>
|
||||
<string name="wishlist">Вишлист</string>
|
||||
<string name="share_wishlist_login_required">Требуется регистрация на WISHLIST.RU</string>
|
||||
<string name="confirmation">Подтверждение</string>
|
||||
<string name="are_you_sure_to_delete">Вы действительно хотите удалить?</string>
|
||||
<string name="wishlist_is_ready">Вишлист готов, можно начинать добавлять желания</string>
|
||||
</resources>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="activity_horizontal_margin">128dp</dimen>
|
||||
</resources>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppBaseTheme">
|
||||
</style>
|
||||
</resources>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppBaseTheme">
|
||||
</style>
|
||||
</resources>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<array name="wish_visible_values">
|
||||
<item>@null</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</array>
|
||||
<array name="wish_visible_titles">
|
||||
<item>private</item>
|
||||
<item>friends</item>
|
||||
<item>any</item>
|
||||
</array>
|
||||
</resources>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="basic">#ffffff</color>
|
||||
<color name="basic_light1">#808080</color>
|
||||
<color name="basic_light2">#404040</color>
|
||||
<color name="basic_light3">#202020</color>
|
||||
<color name="basic_light4">#101010</color>
|
||||
<color name="alter">#69afaf</color>
|
||||
<color name="alter_light">#008080</color>
|
||||
<color name="alter_vivid">#00ffff</color>
|
||||
</resources>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="activity_horizontal_padding">16dp</dimen>
|
||||
<dimen name="activity_vertical_padding">16dp</dimen>
|
||||
<dimen name="element_bottom_padding">10dp</dimen>
|
||||
<dimen name="element_right_padding">6dp</dimen>
|
||||
<dimen name="minimal_padding">2dp</dimen>
|
||||
<dimen name="section_horizontal_padding">6dp</dimen>
|
||||
<dimen name="section_vertical_padding">8dp</dimen>
|
||||
<dimen name="section_top_padding">10dp</dimen>
|
||||
<dimen name="section_right_padding">4dp</dimen>
|
||||
<dimen name="section_bottom_padding">10dp</dimen>
|
||||
<dimen name="section_left_padding">6dp</dimen>
|
||||
<dimen name="arrow_header_expandable_section_right_padding">6dp</dimen>
|
||||
<dimen name="arrow_header_expandable_section_bottom_padding">6dp</dimen>
|
||||
<dimen name="arrow_header_expandable_section_top_padding">6dp</dimen>
|
||||
<dimen name="content_expandable_section_top_padding">6dp</dimen>
|
||||
<dimen name="content_expandable_section_bottom_padding">6dp</dimen>
|
||||
<dimen name="form_label_top_padding">10dp</dimen>
|
||||
<dimen name="form_label_left_padding">6dp</dimen>
|
||||
<dimen name="form_bottom_top_padding">16dp</dimen>
|
||||
<dimen name="wishlist_image_size">80dp</dimen>
|
||||
<dimen name="wish_edit_image_size">25mm</dimen>
|
||||
<dimen name="listview_column_padding_left">10dp</dimen>
|
||||
<dimen name="text_small">13sp</dimen>
|
||||
</resources>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<public type="drawable" name="border" id="2130837504" />
|
||||
<public type="drawable" name="divider" id="2130837505" />
|
||||
<public type="drawable" name="edit_text" id="2130837506" />
|
||||
<public type="drawable" name="ic_launcher" id="2130837507" />
|
||||
<public type="drawable" name="section_divided_background" id="2130837508" />
|
||||
<public type="drawable" name="textfield_default" id="2130837509" />
|
||||
<public type="drawable" name="textfield_pressed" id="2130837510" />
|
||||
<public type="drawable" name="textfield_selected" id="2130837511" />
|
||||
<public type="layout" name="divider_horizontal" id="2130903040" />
|
||||
<public type="layout" name="image_view" id="2130903041" />
|
||||
<public type="layout" name="login_form" id="2130903042" />
|
||||
<public type="layout" name="login_fragment" id="2130903043" />
|
||||
<public type="layout" name="shortcuts_fragment" id="2130903044" />
|
||||
<public type="layout" name="welcome" id="2130903045" />
|
||||
<public type="layout" name="wish_add_fragment" id="2130903046" />
|
||||
<public type="layout" name="wish_form" id="2130903047" />
|
||||
<public type="layout" name="wish_slide_pager" id="2130903048" />
|
||||
<public type="layout" name="wish_view" id="2130903049" />
|
||||
<public type="layout" name="wishlist_item" id="2130903050" />
|
||||
<public type="color" name="basic" id="2130968576" />
|
||||
<public type="color" name="basic_light1" id="2130968577" />
|
||||
<public type="color" name="basic_light2" id="2130968578" />
|
||||
<public type="color" name="basic_light3" id="2130968579" />
|
||||
<public type="color" name="basic_light4" id="2130968580" />
|
||||
<public type="color" name="alter" id="2130968581" />
|
||||
<public type="color" name="alter_light" id="2130968582" />
|
||||
<public type="color" name="alter_vivid" id="2130968583" />
|
||||
<public type="dimen" name="activity_horizontal_padding" id="2131034112" />
|
||||
<public type="dimen" name="activity_vertical_padding" id="2131034113" />
|
||||
<public type="dimen" name="element_bottom_padding" id="2131034114" />
|
||||
<public type="dimen" name="element_right_padding" id="2131034115" />
|
||||
<public type="dimen" name="minimal_padding" id="2131034116" />
|
||||
<public type="dimen" name="section_horizontal_padding" id="2131034117" />
|
||||
<public type="dimen" name="section_vertical_padding" id="2131034118" />
|
||||
<public type="dimen" name="section_top_padding" id="2131034119" />
|
||||
<public type="dimen" name="section_right_padding" id="2131034120" />
|
||||
<public type="dimen" name="section_bottom_padding" id="2131034121" />
|
||||
<public type="dimen" name="section_left_padding" id="2131034122" />
|
||||
<public type="dimen" name="arrow_header_expandable_section_right_padding" id="2131034123" />
|
||||
<public type="dimen" name="arrow_header_expandable_section_bottom_padding" id="2131034124" />
|
||||
<public type="dimen" name="arrow_header_expandable_section_top_padding" id="2131034125" />
|
||||
<public type="dimen" name="content_expandable_section_top_padding" id="2131034126" />
|
||||
<public type="dimen" name="content_expandable_section_bottom_padding" id="2131034127" />
|
||||
<public type="dimen" name="form_label_top_padding" id="2131034128" />
|
||||
<public type="dimen" name="form_label_left_padding" id="2131034129" />
|
||||
<public type="dimen" name="form_bottom_top_padding" id="2131034130" />
|
||||
<public type="dimen" name="wishlist_image_size" id="2131034131" />
|
||||
<public type="dimen" name="wish_edit_image_size" id="2131034132" />
|
||||
<public type="dimen" name="listview_column_padding_left" id="2131034133" />
|
||||
<public type="dimen" name="text_small" id="2131034134" />
|
||||
<public type="dimen" name="activity_horizontal_margin" id="2131034135" />
|
||||
<public type="id" name="layout1" id="2131099648" />
|
||||
<public type="id" name="layout2" id="2131099649" />
|
||||
<public type="id" name="layout3" id="2131099650" />
|
||||
<public type="id" name="view_image" id="2131099651" />
|
||||
<public type="id" name="login_form_login" id="2131099652" />
|
||||
<public type="id" name="login_form_password" id="2131099653" />
|
||||
<public type="id" name="login_form_password_repeat" id="2131099654" />
|
||||
<public type="id" name="login_form_submit" id="2131099655" />
|
||||
<public type="id" name="login_form_progress_bar" id="2131099656" />
|
||||
<public type="id" name="button_login_signin" id="2131099657" />
|
||||
<public type="id" name="button_login_signup" id="2131099658" />
|
||||
<public type="id" name="button_add_shortcut_photo_wish" id="2131099659" />
|
||||
<public type="id" name="button_add_shortcut_add_wish" id="2131099660" />
|
||||
<public type="id" name="wish_add_fragment" id="2131099661" />
|
||||
<public type="id" name="login_fragment" id="2131099662" />
|
||||
<public type="id" name="shortcuts_fragment" id="2131099663" />
|
||||
<public type="id" name="button_wish_add" id="2131099664" />
|
||||
<public type="id" name="scroll" id="2131099665" />
|
||||
<public type="id" name="wish_form_wish" id="2131099666" />
|
||||
<public type="id" name="wish_form_tags" id="2131099667" />
|
||||
<public type="id" name="wish_form_image_group" id="2131099668" />
|
||||
<public type="id" name="wish_form_image" id="2131099669" />
|
||||
<public type="id" name="wish_form_delete_picture" id="2131099670" />
|
||||
<public type="id" name="wish_form_image_add" id="2131099671" />
|
||||
<public type="id" name="wish_form_photo_picture" id="2131099672" />
|
||||
<public type="id" name="wish_form_choose_picture" id="2131099673" />
|
||||
<public type="id" name="wish_form_save1" id="2131099674" />
|
||||
<public type="id" name="wish_form_details" id="2131099675" />
|
||||
<public type="id" name="header1" id="2131099676" />
|
||||
<public type="id" name="text1" id="2131099677" />
|
||||
<public type="id" name="icon1" id="2131099678" />
|
||||
<public type="id" name="wish_form_details_group" id="2131099679" />
|
||||
<public type="id" name="wish_form_link" id="2131099680" />
|
||||
<public type="id" name="wish_form_price" id="2131099681" />
|
||||
<public type="id" name="wish_form_event" id="2131099682" />
|
||||
<public type="id" name="wish_form_post" id="2131099683" />
|
||||
<public type="id" name="text2" id="2131099684" />
|
||||
<public type="id" name="wish_form_rating" id="2131099685" />
|
||||
<public type="id" name="text3" id="2131099686" />
|
||||
<public type="id" name="wish_form_visible" id="2131099687" />
|
||||
<public type="id" name="text4" id="2131099688" />
|
||||
<public type="id" name="wish_form_realized" id="2131099689" />
|
||||
<public type="id" name="wish_form_save2" id="2131099690" />
|
||||
<public type="id" name="pager" id="2131099691" />
|
||||
<public type="id" name="view_wish" id="2131099692" />
|
||||
<public type="id" name="view_tags" id="2131099693" />
|
||||
<public type="id" name="view_link_section" id="2131099694" />
|
||||
<public type="id" name="view_link" id="2131099695" />
|
||||
<public type="id" name="view_price_event" id="2131099696" />
|
||||
<public type="id" name="view_price" id="2131099697" />
|
||||
<public type="id" name="view_event" id="2131099698" />
|
||||
<public type="id" name="view_post" id="2131099699" />
|
||||
<public type="id" name="view_rating" id="2131099700" />
|
||||
<public type="id" name="view_visible" id="2131099701" />
|
||||
<public type="id" name="menu_save" id="2131099702" />
|
||||
<public type="id" name="menu_cancel" id="2131099703" />
|
||||
<public type="id" name="menu_add" id="2131099704" />
|
||||
<public type="id" name="menu_realized" id="2131099705" />
|
||||
<public type="id" name="menu_edit" id="2131099706" />
|
||||
<public type="id" name="menu_share" id="2131099707" />
|
||||
<public type="id" name="menu_delete" id="2131099708" />
|
||||
<public type="id" name="menu_wishlist" id="2131099709" />
|
||||
<public type="id" name="menu_wishlistru" id="2131099710" />
|
||||
<public type="id" name="group_disconnected" id="2131099711" />
|
||||
<public type="id" name="menu_signin" id="2131099712" />
|
||||
<public type="id" name="menu_signup" id="2131099713" />
|
||||
<public type="id" name="group_connected" id="2131099714" />
|
||||
<public type="id" name="menu_my_wishlist" id="2131099715" />
|
||||
<public type="id" name="menu_resync" id="2131099716" />
|
||||
<public type="id" name="menu_signout" id="2131099717" />
|
||||
<public type="id" name="menu_website" id="2131099718" />
|
||||
<public type="id" name="menu_preferences" id="2131099719" />
|
||||
<public type="id" name="menu_reset" id="2131099720" />
|
||||
<public type="array" name="wish_visible_values" id="2131165184" />
|
||||
<public type="array" name="wish_visible_titles" id="2131165185" />
|
||||
<public type="string" name="app_name" id="2131230720" />
|
||||
<public type="string" name="action_settings" id="2131230721" />
|
||||
<public type="string" name="send" id="2131230722" />
|
||||
<public type="string" name="title_wish_list" id="2131230723" />
|
||||
<public type="string" name="menu_add" id="2131230724" />
|
||||
<public type="string" name="menu_edit" id="2131230725" />
|
||||
<public type="string" name="menu_share" id="2131230726" />
|
||||
<public type="string" name="menu_site" id="2131230727" />
|
||||
<public type="string" name="resolve_edit" id="2131230728" />
|
||||
<public type="string" name="title_create" id="2131230729" />
|
||||
<public type="string" name="title_edit" id="2131230730" />
|
||||
<public type="string" name="error_title" id="2131230731" />
|
||||
<public type="string" name="error_network" id="2131230732" />
|
||||
<public type="string" name="error_no_network" id="2131230733" />
|
||||
<public type="string" name="error_no_account" id="2131230734" />
|
||||
<public type="string" name="error_server" id="2131230735" />
|
||||
<public type="string" name="error_unauthorized" id="2131230736" />
|
||||
<public type="string" name="error_already_in_progress" id="2131230737" />
|
||||
<public type="string" name="wish" id="2131230738" />
|
||||
<public type="string" name="wish_post" id="2131230739" />
|
||||
<public type="string" name="add" id="2131230740" />
|
||||
<public type="string" name="save" id="2131230741" />
|
||||
<public type="string" name="cancel" id="2131230742" />
|
||||
<public type="string" name="delete" id="2131230743" />
|
||||
<public type="string" name="yes" id="2131230744" />
|
||||
<public type="string" name="no" id="2131230745" />
|
||||
<public type="string" name="install" id="2131230746" />
|
||||
<public type="string" name="take_picture" id="2131230747" />
|
||||
<public type="string" name="choose_picture" id="2131230748" />
|
||||
<public type="string" name="photo_picture" id="2131230749" />
|
||||
<public type="string" name="change_picture" id="2131230750" />
|
||||
<public type="string" name="delete_picture" id="2131230751" />
|
||||
<public type="string" name="menu_delete" id="2131230752" />
|
||||
<public type="string" name="signup" id="2131230753" />
|
||||
<public type="string" name="login" id="2131230754" />
|
||||
<public type="string" name="password" id="2131230755" />
|
||||
<public type="string" name="password_repeat" id="2131230756" />
|
||||
<public type="string" name="signin" id="2131230757" />
|
||||
<public type="string" name="signout" id="2131230758" />
|
||||
<public type="string" name="resync" id="2131230759" />
|
||||
<public type="string" name="skip" id="2131230760" />
|
||||
<public type="string" name="wishlistru" id="2131230761" />
|
||||
<public type="string" name="subject_in_my_wishlist" id="2131230762" />
|
||||
<public type="string" name="link" id="2131230763" />
|
||||
<public type="string" name="website" id="2131230764" />
|
||||
<public type="string" name="my_wishlist" id="2131230765" />
|
||||
<public type="string" name="op_signin" id="2131230766" />
|
||||
<public type="string" name="op_signup" id="2131230767" />
|
||||
<public type="string" name="op_upload" id="2131230768" />
|
||||
<public type="string" name="op_download" id="2131230769" />
|
||||
<public type="string" name="resync_complete" id="2131230770" />
|
||||
<public type="string" name="stat_new_wishes" id="2131230771" />
|
||||
<public type="string" name="stat_mod_wishes" id="2131230772" />
|
||||
<public type="string" name="stat_images" id="2131230773" />
|
||||
<public type="string" name="shortcut_add_wish" id="2131230774" />
|
||||
<public type="string" name="shortcut_photo_wish" id="2131230775" />
|
||||
<public type="string" name="add_wish" id="2131230776" />
|
||||
<public type="string" name="photo_wish" id="2131230777" />
|
||||
<public type="string" name="about_shortcuts" id="2131230778" />
|
||||
<public type="string" name="about_login" id="2131230779" />
|
||||
<public type="string" name="details" id="2131230780" />
|
||||
<public type="string" name="wish_tags" id="2131230781" />
|
||||
<public type="string" name="wish_price" id="2131230782" />
|
||||
<public type="string" name="wish_event" id="2131230783" />
|
||||
<public type="string" name="wish_visible" id="2131230784" />
|
||||
<public type="string" name="wish_realized" id="2131230785" />
|
||||
<public type="string" name="raiting" id="2131230786" />
|
||||
<public type="string" name="menu_preferences" id="2131230787" />
|
||||
<public type="string" name="full_reset" id="2131230788" />
|
||||
<public type="string" name="realized" id="2131230789" />
|
||||
<public type="string" name="wishlist" id="2131230790" />
|
||||
<public type="string" name="share_wishlist_login_required" id="2131230791" />
|
||||
<public type="string" name="confirmation" id="2131230792" />
|
||||
<public type="string" name="are_you_sure_to_delete" id="2131230793" />
|
||||
<public type="string" name="wishlist_is_ready" id="2131230794" />
|
||||
<public type="string" name="bapi_url" id="2131230795" />
|
||||
<public type="string" name="bimage_url_prefix" id="2131230796" />
|
||||
<public type="string" name="api_url" id="2131230797" />
|
||||
<public type="string" name="image_url_prefix" id="2131230798" />
|
||||
<public type="string" name="wish_url_prefix" id="2131230799" />
|
||||
<public type="string" name="wishlist_url_prefix" id="2131230800" />
|
||||
<public type="string" name="wishlist_url_login" id="2131230801" />
|
||||
<public type="string" name="wishlist_url" id="2131230802" />
|
||||
<public type="style" name="AppBaseTheme" id="2131296256" />
|
||||
<public type="style" name="AppTheme" id="2131296257" />
|
||||
<public type="style" name="App_EditTextStyle" id="2131296258" />
|
||||
<public type="style" name="App_RatingBarStyle" id="2131296259" />
|
||||
<public type="style" name="App_TextViewStyle" id="2131296260" />
|
||||
<public type="style" name="App_ListViewStyle" id="2131296261" />
|
||||
<public type="style" name="App_SpinnerItemStyle" id="2131296262" />
|
||||
<public type="style" name="LayoutSection" id="2131296263" />
|
||||
<public type="style" name="LayoutSectionDivided" id="2131296264" />
|
||||
<public type="style" name="ContentSection" id="2131296265" />
|
||||
<public type="style" name="TextHeader" id="2131296266" />
|
||||
<public type="style" name="TextHeaderSection" id="2131296267" />
|
||||
<public type="style" name="FormLabel" id="2131296268" />
|
||||
<public type="style" name="ArrowHeaderExpandableSection" id="2131296269" />
|
||||
<public type="style" name="ContentExpandableSection" id="2131296270" />
|
||||
<public type="style" name="LayoutFormBottom" id="2131296271" />
|
||||
<public type="style" name="TextRemark" id="2131296272" />
|
||||
<public type="style" name="LinkRemark" id="2131296273" />
|
||||
<public type="style" name="TextRemarkLast" id="2131296274" />
|
||||
<public type="menu" name="wish_edit_options_menu" id="2131361792" />
|
||||
<public type="menu" name="wish_options_menu" id="2131361793" />
|
||||
<public type="menu" name="wishlist_options_menu" id="2131361794" />
|
||||
</resources>
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">WISHLIST.RU</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="send">Send</string>
|
||||
<string name="title_wish_list">Wishlist</string>
|
||||
<string name="menu_add">Add</string>
|
||||
<string name="menu_edit">Edit</string>
|
||||
<string name="menu_share">Share</string>
|
||||
<string name="menu_site">Web site</string>
|
||||
<string name="resolve_edit">edit</string>
|
||||
<string name="title_create">Create</string>
|
||||
<string name="title_edit">Edit</string>
|
||||
<string name="error_title">Error</string>
|
||||
<string name="error_network">Network error</string>
|
||||
<string name="error_no_network">No network connection</string>
|
||||
<string name="error_no_account">No web site account</string>
|
||||
<string name="error_server">Server error</string>
|
||||
<string name="error_unauthorized">Invalid login or password</string>
|
||||
<string name="error_already_in_progress">Action already in progress</string>
|
||||
<string name="wish">Wish</string>
|
||||
<string name="wish_post">Details</string>
|
||||
<string name="add">Add</string>
|
||||
<string name="save">Save</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="delete">Delete</string>
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="install">Install</string>
|
||||
<string name="take_picture">Take picture</string>
|
||||
<string name="choose_picture">Choose picture</string>
|
||||
<string name="photo_picture">Take photo</string>
|
||||
<string name="change_picture">Replace picture</string>
|
||||
<string name="delete_picture">Delete picture</string>
|
||||
<string name="menu_delete">Delete</string>
|
||||
<string name="signup">Sign up</string>
|
||||
<string name="login">Login</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="password_repeat">Repeat password</string>
|
||||
<string name="signin">Sign in</string>
|
||||
<string name="signout">Sign out</string>
|
||||
<string name="resync">Synchronize</string>
|
||||
<string name="skip">Skip</string>
|
||||
<string name="wishlistru">WISHLIST.RU</string>
|
||||
<string name="subject_in_my_wishlist">On my wishlist</string>
|
||||
<string name="link">Link</string>
|
||||
<string name="website">Home page</string>
|
||||
<string name="my_wishlist">My wishlist</string>
|
||||
<string name="op_signin">Authorization</string>
|
||||
<string name="op_signup">Registration</string>
|
||||
<string name="op_upload">Uploading</string>
|
||||
<string name="op_download">Downloading</string>
|
||||
<string name="resync_complete">Synchronization complete</string>
|
||||
<string name="stat_new_wishes">new wishes</string>
|
||||
<string name="stat_mod_wishes">changed wishes</string>
|
||||
<string name="stat_images">images</string>
|
||||
<string name="shortcut_add_wish">+wish</string>
|
||||
<string name="shortcut_photo_wish">+photo</string>
|
||||
<string name="add_wish">Add wish</string>
|
||||
<string name="photo_wish">Take photo</string>
|
||||
<string name="about_shortcuts">You can install shortcuts to the home sreen to quickly add a new wish or take a photo for a new wish</string>
|
||||
<string name="about_login">Sign in if you already have a WISHLIST.RU web site account. Or sign up a new account with the app.</string>
|
||||
<string name="details">Extra</string>
|
||||
<string name="wish_tags">Tags</string>
|
||||
<string name="wish_price">Price</string>
|
||||
<string name="wish_event">Event</string>
|
||||
<string name="wish_visible">Visible</string>
|
||||
<string name="wish_realized">Fulfilled</string>
|
||||
<string name="raiting">Desire</string>
|
||||
<string name="menu_preferences">Preferences</string>
|
||||
<string name="full_reset">Delete all wishes</string>
|
||||
<string name="realized">Fulfilled</string>
|
||||
<string name="wishlist">Wishlist</string>
|
||||
<string name="share_wishlist_login_required">Please sign in to the WISHLIST.RU account first</string>
|
||||
<string name="confirmation">Confirmation</string>
|
||||
<string name="are_you_sure_to_delete">Are you shure?</string>
|
||||
<string name="wishlist_is_ready">Wishlist is ready, you can start adding your wishes</string>
|
||||
<string name="bapi_url">http://192.168.0.103:3010/api/</string>
|
||||
<string name="bimage_url_prefix">http://192.168.0.103:3010/</string>
|
||||
<string name="api_url">http://mywishlist.ru/api/</string>
|
||||
<string name="image_url_prefix">http://mywishlist.ru/</string>
|
||||
<string name="wish_url_prefix">http://mywishlist.ru/wish/</string>
|
||||
<string name="wishlist_url_prefix">http://mywishlist.ru/wishlist/</string>
|
||||
<string name="wishlist_url_login">http://mywishlist.ru/login</string>
|
||||
<string name="wishlist_url">http://mywishlist.ru/</string>
|
||||
</resources>
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="AppBaseTheme">
|
||||
<item name="android:spinnerItemStyle">@style/App_SpinnerItemStyle</item>
|
||||
</style>
|
||||
<style name="AppTheme">
|
||||
<item name="android:editTextStyle">@style/App_EditTextStyle</item>
|
||||
<item name="android:listViewStyle">@style/App_ListViewStyle</item>
|
||||
<item name="android:ratingBarStyle">@style/App_RatingBarStyle</item>
|
||||
<item name="android:textViewStyle">@style/App_TextViewStyle</item>
|
||||
</style>
|
||||
<style name="App_EditTextStyle">
|
||||
<item name="android:textColor">@color/basic</item>
|
||||
<item name="android:textColorHint">@color/basic_light1</item>
|
||||
<item name="android:background">@drawable/edit_text</item>
|
||||
<item name="android:padding">6dp</item>
|
||||
</style>
|
||||
<style name="App_RatingBarStyle">
|
||||
<item name="android:numStars">3</item>
|
||||
<item name="android:stepSize">1</item>
|
||||
</style>
|
||||
<style name="App_TextViewStyle">
|
||||
<item name="android:textColor">@color/basic</item>
|
||||
</style>
|
||||
<style name="App_ListViewStyle">
|
||||
<item name="android:divider">@color/basic_light4</item>
|
||||
<item name="android:dividerHeight">1dp</item>
|
||||
</style>
|
||||
<style name="App_SpinnerItemStyle">
|
||||
<item name="android:textColor">#000</item>
|
||||
</style>
|
||||
<style name="LayoutSection">
|
||||
<item name="android:orientation">vertical</item>
|
||||
<item name="android:paddingLeft">@dimen/section_left_padding</item>
|
||||
<item name="android:paddingTop">@dimen/section_top_padding</item>
|
||||
<item name="android:paddingRight">@dimen/section_right_padding</item>
|
||||
<item name="android:paddingBottom">@dimen/section_bottom_padding</item>
|
||||
</style>
|
||||
<style name="LayoutSectionDivided">
|
||||
<item name="android:background">@drawable/section_divided_background</item>
|
||||
</style>
|
||||
<style name="ContentSection">
|
||||
<item name="android:paddingTop">@dimen/section_top_padding</item>
|
||||
<item name="android:paddingBottom">@dimen/section_bottom_padding</item>
|
||||
</style>
|
||||
<style name="TextHeader">
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
<style name="TextHeaderSection">
|
||||
</style>
|
||||
<style name="FormLabel">
|
||||
<item name="android:paddingLeft">@dimen/form_label_left_padding</item>
|
||||
<item name="android:paddingTop">@dimen/form_label_top_padding</item>
|
||||
</style>
|
||||
<style name="ArrowHeaderExpandableSection">
|
||||
<item name="android:paddingTop">@dimen/arrow_header_expandable_section_top_padding</item>
|
||||
<item name="android:paddingRight">@dimen/arrow_header_expandable_section_right_padding</item>
|
||||
<item name="android:paddingBottom">@dimen/arrow_header_expandable_section_bottom_padding</item>
|
||||
</style>
|
||||
<style name="ContentExpandableSection">
|
||||
<item name="android:paddingTop">@dimen/content_expandable_section_top_padding</item>
|
||||
<item name="android:paddingBottom">@dimen/content_expandable_section_bottom_padding</item>
|
||||
</style>
|
||||
<style name="LayoutFormBottom">
|
||||
<item name="android:gravity">right</item>
|
||||
<item name="android:orientation">@null</item>
|
||||
<item name="android:paddingTop">@dimen/form_bottom_top_padding</item>
|
||||
</style>
|
||||
<style name="TextRemark">
|
||||
<item name="android:textSize">@dimen/text_small</item>
|
||||
<item name="android:textColor">@color/basic_light1</item>
|
||||
<item name="android:paddingRight">@dimen/element_right_padding</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
</style>
|
||||
<style name="LinkRemark">
|
||||
<item name="android:textColor">@color/alter</item>
|
||||
</style>
|
||||
<style name="TextRemarkLast">
|
||||
<item name="android:paddingRight">0dp</item>
|
||||
<item name="android:paddingBottom">0dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package p003ru.wishlist.extra;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.Editable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import p003ru.wishlist.extra.TextWatcherAdapter;
|
||||
|
||||
/* renamed from: ru.wishlist.extra.ClearableEditText */
|
||||
public class ClearableEditText extends EditText implements View.OnTouchListener, TextWatcherAdapter.TextWatcherListener {
|
||||
private View.OnTouchListener touch_listener;
|
||||
|
||||
/* renamed from: xD */
|
||||
private Drawable f5xD;
|
||||
|
||||
/* renamed from: xO */
|
||||
private Drawable f6xO;
|
||||
|
||||
public ClearableEditText(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public ClearableEditText(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public ClearableEditText(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
init();
|
||||
}
|
||||
|
||||
public void setOnTouchListener(View.OnTouchListener l) {
|
||||
this.touch_listener = l;
|
||||
}
|
||||
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
if (getCompoundDrawables()[2] != null && event.getAction() == 1) {
|
||||
if (event.getX() > ((float) ((getWidth() - getPaddingRight()) - this.f5xD.getIntrinsicWidth()))) {
|
||||
setText("");
|
||||
}
|
||||
}
|
||||
if (this.touch_listener != null) {
|
||||
return this.touch_listener.onTouch(v, event);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onTextChanged(EditText view, String text) {
|
||||
setClearIconVisible(isNotEmpty(text));
|
||||
}
|
||||
|
||||
private void init() {
|
||||
this.f5xD = getCompoundDrawables()[2];
|
||||
if (this.f5xD == null) {
|
||||
this.f5xD = getResources().getDrawable(getDefaultClearIconId());
|
||||
}
|
||||
this.f5xD.setBounds(0, 0, this.f5xD.getIntrinsicWidth(), this.f5xD.getIntrinsicHeight());
|
||||
this.f6xO = new ColorDrawable(0);
|
||||
this.f6xO.setBounds(0, 0, this.f5xD.getIntrinsicWidth(), this.f5xD.getIntrinsicHeight());
|
||||
super.setOnTouchListener(this);
|
||||
setClearIconVisible(isNotEmpty(getText()));
|
||||
addTextChangedListener(new TextWatcherAdapter(this, this));
|
||||
}
|
||||
|
||||
private int getDefaultClearIconId() {
|
||||
int id = getResources().getIdentifier("ic_clear", "drawable", "android");
|
||||
if (id == 0) {
|
||||
return 17301533;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void setClearIconVisible(boolean visible) {
|
||||
Drawable[] ds = getCompoundDrawables();
|
||||
setCompoundDrawables(ds[0], ds[1], visible ? this.f5xD : this.f6xO, ds[3]);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public boolean isNotEmpty(String s) {
|
||||
return s != null && s.length() > 0;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public boolean isNotEmpty(Editable e) {
|
||||
return e != null && e.length() > 0;
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package p003ru.wishlist.extra;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageView;
|
||||
|
||||
/* renamed from: ru.wishlist.extra.SquareImageView */
|
||||
public class SquareImageView extends ImageView {
|
||||
public SquareImageView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public SquareImageView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public SquareImageView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
int width = getMeasuredWidth();
|
||||
setMeasuredDimension(width, width);
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package p003ru.wishlist.extra;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageView;
|
||||
|
||||
/* renamed from: ru.wishlist.extra.SquareInwardImageView */
|
||||
public class SquareInwardImageView extends ImageView {
|
||||
public SquareInwardImageView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public SquareInwardImageView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public SquareInwardImageView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
int width = getMeasuredWidth();
|
||||
if (getMeasuredHeight() > width) {
|
||||
setMeasuredDimension(width, width);
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package p003ru.wishlist.extra;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.widget.EditText;
|
||||
|
||||
/* renamed from: ru.wishlist.extra.TextWatcherAdapter */
|
||||
public class TextWatcherAdapter implements TextWatcher {
|
||||
private final TextWatcherListener listener;
|
||||
private final EditText view;
|
||||
|
||||
/* renamed from: ru.wishlist.extra.TextWatcherAdapter$TextWatcherListener */
|
||||
public interface TextWatcherListener {
|
||||
void onTextChanged(EditText editText, String str);
|
||||
}
|
||||
|
||||
public TextWatcherAdapter(EditText editText, TextWatcherListener listener2) {
|
||||
this.view = editText;
|
||||
this.listener = listener2;
|
||||
}
|
||||
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
this.listener.onTextChanged(this.view, s.toString());
|
||||
}
|
||||
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
|
||||
public void afterTextChanged(Editable s) {
|
||||
}
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package p003ru.wishlist.server;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.widget.Toast;
|
||||
import p003ru.wishlist.server.Server;
|
||||
import p003ru.wishlist.wishlist.C0088R;
|
||||
import p003ru.wishlist.wishlist.WishListActivity;
|
||||
|
||||
/* renamed from: ru.wishlist.server.ResyncTask */
|
||||
public class ResyncTask extends AsyncTask<Void, Void, String> {
|
||||
Context context;
|
||||
Server server;
|
||||
StringBuffer taskResult = new StringBuffer();
|
||||
|
||||
public ResyncTask setContext(Context context2) {
|
||||
this.context = context2;
|
||||
return this;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.server.ResyncTask$RunnableUpload */
|
||||
class RunnableUpload implements Runnable {
|
||||
RunnableUpload() {
|
||||
}
|
||||
|
||||
public void run() {
|
||||
String result;
|
||||
try {
|
||||
result = ResyncTask.this.server.upload();
|
||||
} catch (Server.ServerException e) {
|
||||
result = e.toString();
|
||||
}
|
||||
if (result != null && result.length() > 0) {
|
||||
ResyncTask.this.appendTaskResult(String.valueOf(ResyncTask.this.context.getString(C0088R.string.op_upload)) + "\n" + result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.server.ResyncTask$RunnableDownload */
|
||||
class RunnableDownload implements Runnable {
|
||||
RunnableDownload() {
|
||||
}
|
||||
|
||||
public void run() {
|
||||
String result;
|
||||
try {
|
||||
result = ResyncTask.this.server.download();
|
||||
} catch (Server.ServerException e) {
|
||||
result = e.toString();
|
||||
}
|
||||
if (result != null && result.length() > 0) {
|
||||
ResyncTask.this.appendTaskResult(String.valueOf(ResyncTask.this.context.getString(C0088R.string.op_download)) + "\n" + result + "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public String doInBackground(Void... voids) {
|
||||
if (!Server.isOnline(this.context)) {
|
||||
return this.context.getString(C0088R.string.error_no_network);
|
||||
}
|
||||
if (!Server.isConnected(this.context)) {
|
||||
return this.context.getString(C0088R.string.error_no_account);
|
||||
}
|
||||
this.server = new Server(this.context, 3);
|
||||
Thread upload = new Thread(new RunnableUpload());
|
||||
upload.start();
|
||||
Thread download = new Thread(new RunnableDownload());
|
||||
download.start();
|
||||
try {
|
||||
upload.join();
|
||||
} catch (InterruptedException e) {
|
||||
appendTaskResult("upload interrupted\n");
|
||||
}
|
||||
try {
|
||||
download.join();
|
||||
} catch (InterruptedException e2) {
|
||||
appendTaskResult("upload interrupted\n");
|
||||
}
|
||||
Thread reupload = new Thread(new RunnableUpload());
|
||||
reupload.start();
|
||||
try {
|
||||
reupload.join();
|
||||
} catch (InterruptedException e3) {
|
||||
appendTaskResult("re-upload interrupted\n");
|
||||
}
|
||||
return this.taskResult.toString();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onPostExecute(String result) {
|
||||
int toast_length = 1;
|
||||
if (result == null || result.length() == 0) {
|
||||
result = this.context.getString(C0088R.string.resync_complete);
|
||||
toast_length = 0;
|
||||
}
|
||||
Toast.makeText(this.context, result, toast_length).show();
|
||||
if (this.context instanceof WishListActivity) {
|
||||
((WishListActivity) this.context).fixTitle();
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void appendTaskResult(String result) {
|
||||
synchronized (this.taskResult) {
|
||||
this.taskResult.append(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
+807
@@ -0,0 +1,807 @@
|
||||
package p003ru.wishlist.server;
|
||||
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.support.p000v4.app.NotificationCompat;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import p003ru.wishlist.util.HTTP;
|
||||
import p003ru.wishlist.util.Util;
|
||||
import p003ru.wishlist.wishlist.C0088R;
|
||||
import p003ru.wishlist.wishlist.WishList;
|
||||
import p003ru.wishlist.wishlist.WishListDatabase;
|
||||
import p003ru.wishlist.wishlist.model.Wish;
|
||||
|
||||
/* renamed from: ru.wishlist.server.Server */
|
||||
public class Server {
|
||||
public static final int DOWNLOAD_REFRESH = 60;
|
||||
public static final String IMAGE_TEMP_FILE = "_upload_image";
|
||||
public static final int IMAGE_UPLOAD_MAX_HEIGHT = 1536;
|
||||
public static final int IMAGE_UPLOAD_MAX_WIDTH = 1536;
|
||||
public static final int NOTIFICATIONS_MINIMAL = 1;
|
||||
public static final int NOTIFICATIONS_NORMAL = 2;
|
||||
public static final int NOTIFICATIONS_SILENT = 0;
|
||||
public static final int NOTIFICATIONS_VERBOSE = 3;
|
||||
public static final String PREFS_SYNC = "PrefsSync";
|
||||
public static final String PREF_LAST_DOWNLOAD_LOCAL = "last_download_local";
|
||||
public static final String PREF_LAST_DOWNLOAD_SERVER = "last_download_server";
|
||||
public static final String PREF_ME_KEYPASS = "me_keypass";
|
||||
public static final String PREF_ME_LOGNAME = "me_logname";
|
||||
private static String api_url;
|
||||
private static AtomicBoolean downloadLock = new AtomicBoolean(false);
|
||||
private static String image_url_prefix;
|
||||
private static AtomicBoolean loginLock = new AtomicBoolean(false);
|
||||
private static AtomicBoolean uploadLock = new AtomicBoolean(false);
|
||||
private Context context;
|
||||
private String keypass;
|
||||
private String logname;
|
||||
private int notifications;
|
||||
private Date server_time;
|
||||
|
||||
/* renamed from: ru.wishlist.server.Server$Params */
|
||||
public static class Params extends HashMap<String, String> {
|
||||
private static final long serialVersionUID = 1;
|
||||
}
|
||||
|
||||
public Server(Context context2) {
|
||||
this(context2, 0);
|
||||
}
|
||||
|
||||
public Server(Context context2, int notifications2) {
|
||||
this.server_time = null;
|
||||
this.context = context2;
|
||||
this.notifications = notifications2;
|
||||
api_setup(context2);
|
||||
}
|
||||
|
||||
static synchronized void api_setup(Context context2) {
|
||||
synchronized (Server.class) {
|
||||
if (api_url == null) {
|
||||
api_url = context2.getString(C0088R.string.api_url);
|
||||
}
|
||||
if (image_url_prefix == null) {
|
||||
image_url_prefix = context2.getString(C0088R.string.image_url_prefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isRegistered(Context context2) {
|
||||
return context2.getSharedPreferences(PREFS_SYNC, 0).contains(PREF_ME_LOGNAME);
|
||||
}
|
||||
|
||||
public static boolean isConnected(Context context2) {
|
||||
return context2.getSharedPreferences(PREFS_SYNC, 0).contains(PREF_ME_KEYPASS);
|
||||
}
|
||||
|
||||
public static boolean isOnline(Context context2) {
|
||||
NetworkInfo activeNetwork = ((ConnectivityManager) context2.getSystemService("connectivity")).getActiveNetworkInfo();
|
||||
return activeNetwork != null && activeNetwork.isConnectedOrConnecting();
|
||||
}
|
||||
|
||||
public static String currentLogname(Context context2) {
|
||||
return context2.getSharedPreferences(PREFS_SYNC, 0).getString(PREF_ME_LOGNAME, (String) null);
|
||||
}
|
||||
|
||||
public static String wishlistURLPublic(Context context2) {
|
||||
String logname2 = context2.getSharedPreferences(PREFS_SYNC, 0).getString(PREF_ME_LOGNAME, (String) null);
|
||||
if (logname2 == null) {
|
||||
return null;
|
||||
}
|
||||
return String.valueOf(context2.getString(C0088R.string.wishlist_url_prefix)) + logname2;
|
||||
}
|
||||
|
||||
public static String wishlistURLPrivate(Context context2) {
|
||||
SharedPreferences settings = context2.getSharedPreferences(PREFS_SYNC, 0);
|
||||
String logname2 = settings.getString(PREF_ME_LOGNAME, (String) null);
|
||||
if (logname2 == null) {
|
||||
return null;
|
||||
}
|
||||
Params params = new Params();
|
||||
params.put("logname", logname2);
|
||||
params.put("keypass", settings.getString(PREF_ME_KEYPASS, (String) null));
|
||||
try {
|
||||
return String.valueOf(context2.getString(C0088R.string.wishlist_url_login)) + "?" + HTTP.queryString(params);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Wish[] meWishes() throws IOException {
|
||||
return meWishes((Date) null, (Date) null);
|
||||
}
|
||||
|
||||
public Wish[] meWishes(Date changed_min, Date changed_max) throws IOException {
|
||||
Params params = paramsMe();
|
||||
if (changed_min != null) {
|
||||
params.put("changed_time_min", String.valueOf(dateForServer(changed_min)));
|
||||
}
|
||||
if (changed_max != null) {
|
||||
params.put("changed_time_max", String.valueOf(dateForServer(changed_max)));
|
||||
}
|
||||
try {
|
||||
JSONObject json_reply = getHTTPJSONObject("me/wish/list.json", params);
|
||||
if (json_reply.has("current_time")) {
|
||||
this.server_time = optJSONDate(json_reply, "current_time");
|
||||
}
|
||||
JSONArray json_wishes = json_reply.getJSONArray(WishList.Wishes.NAME);
|
||||
Wish[] wishes = new Wish[json_wishes.length()];
|
||||
for (int i = 0; i < json_wishes.length(); i++) {
|
||||
wishes[i] = wishFromJSON(json_wishes.getJSONObject(i));
|
||||
}
|
||||
return wishes;
|
||||
} catch (JSONException e) {
|
||||
Log.e("my_wishes", "exception", e);
|
||||
return new Wish[0];
|
||||
}
|
||||
}
|
||||
|
||||
public long meWishCreate(Wish wish) throws IOException {
|
||||
try {
|
||||
JSONObject json_res = getHTTPJSONObject("me/wish/create.json", paramsMe(wishToParams(wish)));
|
||||
if (json_res.has("id")) {
|
||||
return json_res.getLong("id");
|
||||
}
|
||||
if (json_res.has("error")) {
|
||||
Log.w("meWishCreate", json_res.getString("error"));
|
||||
}
|
||||
return 0;
|
||||
} catch (JSONException e) {
|
||||
Log.e("meWishCreate", "exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean meWishUpdate(Wish wish) throws IOException {
|
||||
try {
|
||||
JSONObject json_res = getHTTPJSONObject("me/wish/update.json", paramsMe(wishToParams(wish)));
|
||||
if (json_res.has("result") && json_res.getInt("result") == 1) {
|
||||
return true;
|
||||
}
|
||||
if (json_res.has("error")) {
|
||||
Log.w("meWishUpdate", json_res.getString("error"));
|
||||
}
|
||||
return false;
|
||||
} catch (JSONException e) {
|
||||
Log.e("meWishUpdate", "exception", e);
|
||||
}
|
||||
}
|
||||
|
||||
public String meWishImageUpload(Wish wish) throws IOException {
|
||||
int res;
|
||||
Params params = paramsMe();
|
||||
String server_id = String.valueOf(wish.getServerID());
|
||||
params.put("id", server_id);
|
||||
if (wish.image_changed != null) {
|
||||
params.put("changed_time", String.valueOf(dateForServer(wish.image_changed)));
|
||||
}
|
||||
File image_file = new File(wish.getImageFile());
|
||||
String upload_url = String.valueOf(api_url) + "me/wish/image";
|
||||
if (Util.checkBitmapSize(image_file, 1536, 1536)) {
|
||||
Log.d("meWishImageUpload", "upload file");
|
||||
res = HTTP.uploadPut(image_file, upload_url, (Map<String, String>) params);
|
||||
} else {
|
||||
Log.d("meWishImageUpload", "upload downsampled");
|
||||
res = HTTP.uploadPut(Util.loadBitmapDownsampled(image_file, 1536, 1536), upload_url, (Map<String, String>) params);
|
||||
}
|
||||
Log.d("meWishImageUpload", "upload res: " + String.valueOf(res));
|
||||
if (res < 200 || res > 299) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
Params params2 = paramsMe();
|
||||
params2.put("id", server_id);
|
||||
JSONObject json_res = getHTTPJSONObject("me/wish/image_link.json", params2);
|
||||
if (json_res.has(WishList.PlainWishes.IMAGE_LINK)) {
|
||||
return json_res.getString(WishList.PlainWishes.IMAGE_LINK);
|
||||
}
|
||||
if (!json_res.has("error")) {
|
||||
return null;
|
||||
}
|
||||
Log.w("meWishImageUpload", json_res.getString("error"));
|
||||
return null;
|
||||
} catch (JSONException e) {
|
||||
Log.e("meWishImageUpload", "exception", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String loginSignin(String login, String password) throws IOException {
|
||||
if (!loginLock.compareAndSet(false, true)) {
|
||||
return this.context.getString(C0088R.string.error_already_in_progress);
|
||||
}
|
||||
Params params = new Params();
|
||||
params.put("login", login);
|
||||
params.put("password", password);
|
||||
try {
|
||||
if (this.notifications >= 3) {
|
||||
notificationInfo(C0088R.string.op_signin, 17301599);
|
||||
}
|
||||
JSONObject json_res = postHTTPJSONObject("login/signin.json", params);
|
||||
if (json_res.has("result") && json_res.getInt("result") == 1) {
|
||||
this.logname = json_res.getString("logname");
|
||||
this.keypass = json_res.getString("keypass");
|
||||
SharedPreferences.Editor editor = this.context.getSharedPreferences(PREFS_SYNC, 0).edit();
|
||||
editor.putString(PREF_ME_LOGNAME, this.logname);
|
||||
editor.putString(PREF_ME_KEYPASS, this.keypass);
|
||||
editor.commit();
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signin);
|
||||
}
|
||||
loginLock.set(false);
|
||||
return null;
|
||||
} else if (json_res.has("error")) {
|
||||
String string = json_res.getString("error");
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signin);
|
||||
}
|
||||
loginLock.set(false);
|
||||
return string;
|
||||
} else {
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signin);
|
||||
}
|
||||
loginLock.set(false);
|
||||
return this.context.getString(C0088R.string.error_network);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
Log.e("loginSignin", "exception", e);
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signin);
|
||||
}
|
||||
loginLock.set(false);
|
||||
} catch (Throwable th) {
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signin);
|
||||
}
|
||||
loginLock.set(false);
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
public String loginSignup(String login, String password) throws IOException {
|
||||
if (!loginLock.compareAndSet(false, true)) {
|
||||
return this.context.getString(C0088R.string.error_already_in_progress);
|
||||
}
|
||||
Params params = new Params();
|
||||
params.put("login", login);
|
||||
params.put("password", password);
|
||||
try {
|
||||
if (this.notifications >= 3) {
|
||||
notificationInfo(C0088R.string.op_signup, 17301599);
|
||||
}
|
||||
JSONObject json_res = postHTTPJSONObject("login/signup.json", params);
|
||||
if (json_res.has("error")) {
|
||||
String string = json_res.getString("error");
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signup);
|
||||
}
|
||||
loginLock.set(false);
|
||||
return string;
|
||||
} else if (!json_res.has("result") || json_res.getInt("result") != 1) {
|
||||
String string2 = this.context.getString(C0088R.string.error_network);
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signup);
|
||||
}
|
||||
loginLock.set(false);
|
||||
return string2;
|
||||
} else {
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signup);
|
||||
}
|
||||
loginLock.set(false);
|
||||
return loginSignin(login, password);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
Log.e("loginSignup", "exception", e);
|
||||
String string3 = this.context.getString(C0088R.string.error_network);
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signup);
|
||||
}
|
||||
loginLock.set(false);
|
||||
return string3;
|
||||
} catch (Throwable th) {
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_signup);
|
||||
}
|
||||
loginLock.set(false);
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
public void loginSignout() {
|
||||
disconnect();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public Wish wishFromJSON(JSONObject json) {
|
||||
Wish wish = new Wish(this.context);
|
||||
wish.wish = json.optString("wish");
|
||||
wish.tags = json.optString("tags");
|
||||
wish.link = json.optString("link");
|
||||
wish.price = json.optString("price");
|
||||
wish.event = json.optString("event");
|
||||
wish.post = json.optString("post");
|
||||
wish.rating = json.optInt("rating");
|
||||
wish.visible = json.optInt("visible");
|
||||
wish.realized = json.optInt("realized") == 1;
|
||||
wish.setServerID(json.optLong("id"));
|
||||
wish.created = optJSONDate(json, "created_time");
|
||||
wish.changed = optJSONDate(json, "changed_time");
|
||||
wish.image_link = json.optString(WishList.PlainWishes.IMAGE_LINK);
|
||||
wish.setServerSync(true);
|
||||
wish.setImageServerSync(false);
|
||||
return wish;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public Params wishToParams(Wish wish) {
|
||||
Params params = new Params();
|
||||
if (wish.wish != null) {
|
||||
params.put("wish", wish.wish);
|
||||
}
|
||||
if (wish.tags != null) {
|
||||
params.put("tags", wish.tags);
|
||||
}
|
||||
if (wish.link != null) {
|
||||
params.put("link", wish.link);
|
||||
}
|
||||
if (wish.price != null) {
|
||||
params.put("price", wish.price);
|
||||
}
|
||||
if (wish.event != null) {
|
||||
params.put("event", wish.event);
|
||||
}
|
||||
if (wish.post != null) {
|
||||
params.put("post", wish.post);
|
||||
}
|
||||
params.put("rating", String.valueOf(wish.rating));
|
||||
params.put("visible", String.valueOf(wish.visible));
|
||||
params.put("realized", wish.realized ? "1" : "0");
|
||||
if (wish.issetServerID()) {
|
||||
params.put("id", String.valueOf(wish.getServerID()));
|
||||
}
|
||||
if (wish.changed != null) {
|
||||
params.put("changed_time", String.valueOf(dateForServer(wish.changed)));
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public String getHTTPString(String action, Params params) throws IOException {
|
||||
return HTTP.readGet(String.valueOf(api_url) + action, params);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public JSONObject getHTTPJSONObject(String action, Params params) throws JSONException, IOException {
|
||||
return new JSONObject(getHTTPString(action, params));
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public JSONArray getHTTPJSONArray(String action, Params params) throws JSONException, IOException {
|
||||
return new JSONArray(getHTTPString(action, params));
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public String postHTTPString(String action, Params params) throws IOException {
|
||||
return HTTP.readPost(String.valueOf(api_url) + action, params);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public JSONObject postHTTPJSONObject(String action, Params params) throws JSONException, IOException {
|
||||
return new JSONObject(postHTTPString(action, params));
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public JSONArray postHTTPJSONArray(String action, Params params) throws JSONException, IOException {
|
||||
return new JSONArray(postHTTPString(action, params));
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public Date getHTTPHeadLMT(String url) {
|
||||
Date date = null;
|
||||
Log.d("getHTTPHeadLMT", "url: " + String.valueOf(url));
|
||||
SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
|
||||
try {
|
||||
loop0:
|
||||
for (Map.Entry<String, List<String>> header : HTTP.headersHead(url, (Map<String, String>) null).entrySet()) {
|
||||
if ("last-modified".equalsIgnoreCase(header.getKey())) {
|
||||
for (String value : header.getValue()) {
|
||||
try {
|
||||
date = format.parse(value);
|
||||
break loop0;
|
||||
} catch (ParseException e) {
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} catch (IOException e2) {
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public String getImageURL(String str) {
|
||||
if (str.charAt(0) == '/') {
|
||||
return String.valueOf(image_url_prefix) + str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private Params paramsMe(Params params) {
|
||||
if (this.logname == null || this.keypass == null) {
|
||||
SharedPreferences settings = this.context.getSharedPreferences(PREFS_SYNC, 0);
|
||||
this.logname = settings.getString(PREF_ME_LOGNAME, (String) null);
|
||||
this.keypass = settings.getString(PREF_ME_KEYPASS, (String) null);
|
||||
}
|
||||
if (this.logname != null) {
|
||||
params.put("logname", this.logname);
|
||||
}
|
||||
if (this.keypass != null) {
|
||||
params.put("keypass", this.keypass);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
private Params paramsMe() {
|
||||
return paramsMe(new Params());
|
||||
}
|
||||
|
||||
private Date optJSONDate(JSONObject obj, String key) {
|
||||
if (obj.has(key)) {
|
||||
return new Date(Long.valueOf(obj.optString(key)).longValue() * 1000);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private long dateForServer(Date date) {
|
||||
return date.getTime() / 1000;
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
SharedPreferences.Editor editor = this.context.getSharedPreferences(PREFS_SYNC, 0).edit();
|
||||
editor.clear();
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
public void disconnect() {
|
||||
Log.d("Server", "disconnect");
|
||||
SharedPreferences.Editor editor = this.context.getSharedPreferences(PREFS_SYNC, 0).edit();
|
||||
editor.remove(PREF_ME_KEYPASS);
|
||||
editor.remove(PREF_LAST_DOWNLOAD_SERVER);
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
public String download_refresh() throws ServerException {
|
||||
SharedPreferences settings = this.context.getSharedPreferences(PREFS_SYNC, 0);
|
||||
long last = settings.getLong(PREF_LAST_DOWNLOAD_LOCAL, 0);
|
||||
long curr = new Date().getTime();
|
||||
if (curr - last < 60000) {
|
||||
return null;
|
||||
}
|
||||
SharedPreferences.Editor editor = settings.edit();
|
||||
editor.putLong(PREF_LAST_DOWNLOAD_LOCAL, curr);
|
||||
editor.commit();
|
||||
return download();
|
||||
}
|
||||
|
||||
public String download() throws ServerException {
|
||||
Date image_url_date;
|
||||
if (!isConnected(this.context) || !isOnline(this.context) || !downloadLock.compareAndSet(false, true)) {
|
||||
return null;
|
||||
}
|
||||
Log.d("download", "start");
|
||||
if (this.notifications >= 3) {
|
||||
notificationInfo(C0088R.string.op_download, 17301633);
|
||||
}
|
||||
int new_wishes = 0;
|
||||
int mod_wishes = 0;
|
||||
int images = 0;
|
||||
SharedPreferences settings = this.context.getSharedPreferences(PREFS_SYNC, 0);
|
||||
long last_download = settings.getLong(PREF_LAST_DOWNLOAD_SERVER, 0);
|
||||
Date changed_min = last_download == 0 ? null : new Date(last_download);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
try {
|
||||
Wish[] server_wishes = meWishes(changed_min, (Date) null);
|
||||
downloadLock.set(false);
|
||||
if (server_wishes.length == 0) {
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_download);
|
||||
}
|
||||
downloadLock.set(false);
|
||||
return null;
|
||||
}
|
||||
if (this.notifications >= 2) {
|
||||
notificationInfo(C0088R.string.op_download, 17301633);
|
||||
}
|
||||
long last_download2 = this.server_time == null ? new Date().getTime() : this.server_time.getTime();
|
||||
WishListDatabase wishListDatabase = new WishListDatabase(this.context);
|
||||
wishListDatabase.getClass();
|
||||
WishListDatabase.WishFinder finder = new WishListDatabase.WishFinder();
|
||||
int length = server_wishes.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
Wish swish = server_wishes[i];
|
||||
Wish lwish = finder.server_id(swish.getServerID());
|
||||
if (lwish == null) {
|
||||
Log.d("download", "new wish, just save, id: " + String.valueOf(swish.server_id));
|
||||
swish.save();
|
||||
new_wishes++;
|
||||
} else {
|
||||
if (lwish.image_link != null && lwish.image_link.equals(swish.image_link)) {
|
||||
swish.transferLocalImage(lwish);
|
||||
}
|
||||
if (lwish.getServerSync()) {
|
||||
if (dateForServer(lwish.changed) == dateForServer(swish.changed)) {
|
||||
Log.d("download", "local is server_sync ok and changed dates are equal, ignore update, id: " + String.valueOf(swish.server_id));
|
||||
} else {
|
||||
Log.d("download", "local is server_sync ok, replace with server, id: " + String.valueOf(swish.server_id));
|
||||
mod_wishes++;
|
||||
lwish.destroy();
|
||||
if (swish.isTrashed()) {
|
||||
swish.destroy();
|
||||
} else {
|
||||
swish.save();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (dateForServer(lwish.changed) < dateForServer(swish.changed)) {
|
||||
Log.w("download", "wish conflict, server is newer, replace with server, id: " + String.valueOf(swish.server_id));
|
||||
lwish.destroy();
|
||||
mod_wishes++;
|
||||
if (swish.isTrashed()) {
|
||||
swish.destroy();
|
||||
} else {
|
||||
swish.save();
|
||||
}
|
||||
} else {
|
||||
Log.w("download", "wish conflict, local is newer, leave local and mark it off sync, id: " + String.valueOf(swish.server_id));
|
||||
lwish.setServerSync(false);
|
||||
lwish.setImageServerSync(false);
|
||||
lwish.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
int image_errors = 0;
|
||||
Wish[] sync_image = finder.all_image_no_server_sync_with_link();
|
||||
int length2 = sync_image.length;
|
||||
for (int i2 = 0; i2 < length2; i2++) {
|
||||
Wish wish = sync_image[i2];
|
||||
Log.d("download", "to download image for: " + String.valueOf(wish.getID()));
|
||||
File tempFile = null;
|
||||
try {
|
||||
tempFile = wish.getTempImageFile("_download_wish_image");
|
||||
String image_url = getImageURL(wish.image_link);
|
||||
try {
|
||||
if (!(!wish.issetImageFile() || wish.image_changed == null || (image_url_date = getHTTPHeadLMT(image_url)) == null)) {
|
||||
if (dateForServer(image_url_date) <= dateForServer(wish.image_changed)) {
|
||||
}
|
||||
}
|
||||
HTTP.downloadGet(tempFile, image_url, (Map<String, String>) null);
|
||||
wish.setTempImageFile(tempFile.getAbsolutePath());
|
||||
wish.setImageServerSync(true);
|
||||
wish.save(false);
|
||||
images++;
|
||||
} catch (HTTP.HTTPException e) {
|
||||
Log.e("download", "can't download image for id: " + String.valueOf(wish.getID()), e);
|
||||
if (e.code >= 400) {
|
||||
wish.setImageFile((String) null);
|
||||
wish.setImageServerSync(true);
|
||||
wish.save();
|
||||
} else {
|
||||
image_errors++;
|
||||
}
|
||||
tempFile.delete();
|
||||
}
|
||||
} catch (IOException e2) {
|
||||
image_errors++;
|
||||
tempFile.delete();
|
||||
Log.e("download", "can't save image for id: " + String.valueOf(wish.getID()), e2);
|
||||
}
|
||||
}
|
||||
if (image_errors == 0) {
|
||||
SharedPreferences.Editor editor = settings.edit();
|
||||
editor.putLong(PREF_LAST_DOWNLOAD_SERVER, last_download2);
|
||||
editor.commit();
|
||||
}
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_download);
|
||||
}
|
||||
if (new_wishes > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(C0088R.string.stat_new_wishes)) + ": " + String.valueOf(new_wishes) + "\n");
|
||||
}
|
||||
if (mod_wishes > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(C0088R.string.stat_mod_wishes)) + ": " + String.valueOf(mod_wishes) + "\n");
|
||||
}
|
||||
if (images > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(C0088R.string.stat_images)) + ": " + String.valueOf(images) + "\n");
|
||||
}
|
||||
return sb.toString();
|
||||
} catch (HTTP.HTTPException e3) {
|
||||
return handleIOException(e3, C0088R.string.op_download);
|
||||
} catch (IOException e4) {
|
||||
return handleIOException(e4, C0088R.string.op_download);
|
||||
} finally {
|
||||
downloadLock.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
public String upload() throws ServerException {
|
||||
if (!isConnected(this.context) || !isOnline(this.context)) {
|
||||
return null;
|
||||
}
|
||||
StringBuffer sb = new StringBuffer();
|
||||
int new_wishes = 0;
|
||||
int mod_wishes = 0;
|
||||
int images = 0;
|
||||
if (!uploadLock.compareAndSet(false, true)) {
|
||||
return null;
|
||||
}
|
||||
Log.d("upload", "start");
|
||||
if (this.notifications >= 3) {
|
||||
notificationInfo(C0088R.string.op_upload, 17301640);
|
||||
}
|
||||
WishListDatabase wishListDatabase = new WishListDatabase(this.context);
|
||||
wishListDatabase.getClass();
|
||||
WishListDatabase.WishFinder finder = new WishListDatabase.WishFinder();
|
||||
Wish[] local_wishes = finder.all_no_server_sync();
|
||||
Wish[] sync_images = finder.all_image_no_server_sync_no_link();
|
||||
if (local_wishes.length == 0 && sync_images.length == 0) {
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_upload);
|
||||
}
|
||||
Log.d("upload", "nothing to upload");
|
||||
uploadLock.set(false);
|
||||
return null;
|
||||
}
|
||||
if (this.notifications >= 2) {
|
||||
notificationInfo(C0088R.string.op_upload, 17301640);
|
||||
}
|
||||
try {
|
||||
int length = local_wishes.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
Wish wish = local_wishes[i];
|
||||
if (!wish.issetServerID()) {
|
||||
long id = meWishCreate(wish);
|
||||
if (id > 0) {
|
||||
Log.d("upload", "create ok, id: " + String.valueOf(id));
|
||||
wish.setServerID(id);
|
||||
new_wishes++;
|
||||
} else {
|
||||
Log.w("upload", "server hasn't accepted upload_create id: " + String.valueOf(wish.getID()));
|
||||
}
|
||||
} else if (meWishUpdate(wish)) {
|
||||
Log.d("upload", "update ok for id: " + String.valueOf(wish.server_id));
|
||||
mod_wishes++;
|
||||
} else {
|
||||
Log.w("upload", "server hasn't accepted upload_update id: " + String.valueOf(wish.server_id));
|
||||
}
|
||||
if (wish.isTrashed()) {
|
||||
wish.destroy();
|
||||
} else {
|
||||
wish.setServerSync(true);
|
||||
wish.save();
|
||||
}
|
||||
}
|
||||
Wish[] sync_images2 = finder.all_image_no_server_sync_no_link();
|
||||
int length2 = sync_images2.length;
|
||||
for (int i2 = 0; i2 < length2; i2++) {
|
||||
Wish wish2 = sync_images2[i2];
|
||||
Log.w("upload", "to upload image for: " + String.valueOf(wish2.getID()));
|
||||
String image_link = meWishImageUpload(wish2);
|
||||
if (image_link != null) {
|
||||
wish2.image_link = image_link;
|
||||
wish2.setImageServerSync(true);
|
||||
wish2.save();
|
||||
images++;
|
||||
}
|
||||
}
|
||||
uploadLock.set(false);
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(C0088R.string.op_upload);
|
||||
}
|
||||
if (new_wishes > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(C0088R.string.stat_new_wishes)) + ": " + String.valueOf(new_wishes) + "\n");
|
||||
}
|
||||
if (mod_wishes > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(C0088R.string.stat_mod_wishes)) + ": " + String.valueOf(mod_wishes) + "\n");
|
||||
}
|
||||
if (images > 0) {
|
||||
sb.append(String.valueOf(this.context.getString(C0088R.string.stat_images)) + ": " + String.valueOf(images) + "\n");
|
||||
}
|
||||
return sb.toString();
|
||||
} catch (HTTP.HTTPException e) {
|
||||
String handleIOException = handleIOException(e, C0088R.string.op_upload);
|
||||
uploadLock.set(false);
|
||||
return handleIOException;
|
||||
} catch (IOException e2) {
|
||||
String handleIOException2 = handleIOException(e2, C0088R.string.op_upload);
|
||||
uploadLock.set(false);
|
||||
return handleIOException2;
|
||||
} catch (Throwable th) {
|
||||
uploadLock.set(false);
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
public String signin(String login, String password) throws IOException {
|
||||
return loginSignin(login, password);
|
||||
}
|
||||
|
||||
public String signup(String login, String password) throws IOException {
|
||||
return loginSignup(login, password);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void notificationInfo(int resID, int icon_resID) {
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this.context).setContentTitle(this.context.getText(C0088R.string.wishlistru)).setContentText(this.context.getText(resID)).setContentIntent(PendingIntent.getActivity(this.context, 0, new Intent(), 0)).setTicker(this.context.getText(resID)).setSmallIcon(icon_resID);
|
||||
builder.setProgress(0, 0, true);
|
||||
((NotificationManager) this.context.getSystemService("notification")).notify(resID, builder.build());
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void notificationHide(int resID) {
|
||||
((NotificationManager) this.context.getSystemService("notification")).cancel(resID);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void notificationError(int resID, String error) {
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this.context).setContentTitle(this.context.getText(C0088R.string.wishlistru)).setContentText(error).setContentIntent(PendingIntent.getActivity(this.context, 0, new Intent(), 0)).setTicker(this.context.getText(resID)).setAutoCancel(true).setSmallIcon(17301624);
|
||||
builder.setProgress(0, 0, true);
|
||||
((NotificationManager) this.context.getSystemService("notification")).notify(resID, builder.build());
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void toastShow(String text) {
|
||||
Toast.makeText(this.context, text, 0).show();
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.server.Server$ServerException */
|
||||
public class ServerException extends IOException {
|
||||
private static final long serialVersionUID = 1;
|
||||
private String msg = null;
|
||||
|
||||
public ServerException(String string) {
|
||||
this.msg = string;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.msg;
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public String handleIOException(IOException ex, int resID) throws ServerException {
|
||||
String msg;
|
||||
if (!(ex instanceof HTTP.HTTPException) || ((HTTP.HTTPException) ex).code != 401) {
|
||||
msg = ex.toString();
|
||||
} else {
|
||||
disconnect();
|
||||
msg = this.context.getString(C0088R.string.error_unauthorized);
|
||||
}
|
||||
if (this.notifications > 0) {
|
||||
notificationHide(resID);
|
||||
}
|
||||
if (this.notifications >= 1) {
|
||||
notificationError(resID, msg);
|
||||
}
|
||||
throw new ServerException(msg);
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package p003ru.wishlist.util;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.widget.EditText;
|
||||
|
||||
/* renamed from: ru.wishlist.util.EditTextValidator */
|
||||
public class EditTextValidator implements TextWatcher, Validatable {
|
||||
private EditText edittext;
|
||||
public boolean empty;
|
||||
public boolean valid;
|
||||
private ValidatorWaiter waiter;
|
||||
|
||||
public EditTextValidator(ValidatorWaiter waiter2, EditText edittext2) {
|
||||
this.waiter = waiter2;
|
||||
this.edittext = edittext2;
|
||||
edittext2.addTextChangedListener(this);
|
||||
afterTextChanged(edittext2.getText());
|
||||
}
|
||||
|
||||
public boolean validEditable(Editable editable) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void afterTextChanged(Editable editable) {
|
||||
boolean newvalid = validEditable(editable);
|
||||
boolean newempty = editable.length() == 0;
|
||||
if (this.valid != newvalid || this.empty != newempty) {
|
||||
this.valid = newvalid;
|
||||
this.empty = newempty;
|
||||
this.waiter.onChange(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
}
|
||||
|
||||
public boolean valid() {
|
||||
return this.valid;
|
||||
}
|
||||
|
||||
public boolean empty() {
|
||||
return this.empty;
|
||||
}
|
||||
}
|
||||
+352
@@ -0,0 +1,352 @@
|
||||
package p003ru.wishlist.util;
|
||||
|
||||
import android.os.Build;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Map;
|
||||
|
||||
/* renamed from: ru.wishlist.util.HTTP */
|
||||
public final class HTTP {
|
||||
public static final int STATUS_UNAUTHORIZED = 401;
|
||||
|
||||
static {
|
||||
if (Integer.parseInt(Build.VERSION.SDK) < 8) {
|
||||
System.setProperty("http.keepAlive", "false");
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.util.HTTP$HTTPException */
|
||||
public static class HTTPException extends IOException {
|
||||
private static final long serialVersionUID = 1;
|
||||
public int code = 0;
|
||||
|
||||
public HTTPException(int code2) {
|
||||
this.code = code2;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
if (this.code == 0) {
|
||||
return "";
|
||||
}
|
||||
return String.valueOf(this.code);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARNING: Removed duplicated region for block: B:8:0x003b */
|
||||
/* Code decompiled incorrectly, please refer to instructions dump. */
|
||||
public static java.lang.String readGet(java.lang.String r6, java.util.Map<java.lang.String, java.lang.String> r7) throws java.io.IOException {
|
||||
/*
|
||||
r1 = 0
|
||||
if (r7 == 0) goto L_0x003f
|
||||
int r4 = r7.size() // Catch:{ IOException -> 0x0045 }
|
||||
if (r4 <= 0) goto L_0x003f
|
||||
java.net.URL r3 = new java.net.URL // Catch:{ IOException -> 0x0045 }
|
||||
java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0045 }
|
||||
java.lang.String r5 = java.lang.String.valueOf(r6) // Catch:{ IOException -> 0x0045 }
|
||||
r4.<init>(r5) // Catch:{ IOException -> 0x0045 }
|
||||
java.lang.String r5 = "?"
|
||||
java.lang.StringBuilder r4 = r4.append(r5) // Catch:{ IOException -> 0x0045 }
|
||||
java.lang.String r5 = queryString(r7) // Catch:{ IOException -> 0x0045 }
|
||||
java.lang.StringBuilder r4 = r4.append(r5) // Catch:{ IOException -> 0x0045 }
|
||||
java.lang.String r4 = r4.toString() // Catch:{ IOException -> 0x0045 }
|
||||
r3.<init>(r4) // Catch:{ IOException -> 0x0045 }
|
||||
L_0x0029:
|
||||
java.net.URLConnection r4 = r3.openConnection() // Catch:{ IOException -> 0x0045 }
|
||||
r0 = r4
|
||||
java.net.HttpURLConnection r0 = (java.net.HttpURLConnection) r0 // Catch:{ IOException -> 0x0045 }
|
||||
r1 = r0
|
||||
java.io.InputStream r4 = r1.getInputStream() // Catch:{ IOException -> 0x0045 }
|
||||
java.lang.String r4 = p003ru.wishlist.util.Util.readInputStream(r4) // Catch:{ IOException -> 0x0045 }
|
||||
if (r1 == 0) goto L_0x003e
|
||||
r1.disconnect()
|
||||
L_0x003e:
|
||||
return r4
|
||||
L_0x003f:
|
||||
java.net.URL r3 = new java.net.URL // Catch:{ IOException -> 0x0045 }
|
||||
r3.<init>(r6) // Catch:{ IOException -> 0x0045 }
|
||||
goto L_0x0029
|
||||
L_0x0045:
|
||||
r2 = move-exception
|
||||
int r4 = r1.getResponseCode() // Catch:{ all -> 0x004e }
|
||||
throwResponse(r4) // Catch:{ all -> 0x004e }
|
||||
throw r2 // Catch:{ all -> 0x004e }
|
||||
L_0x004e:
|
||||
r4 = move-exception
|
||||
if (r1 == 0) goto L_0x0054
|
||||
r1.disconnect()
|
||||
L_0x0054:
|
||||
throw r4
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: p003ru.wishlist.util.HTTP.readGet(java.lang.String, java.util.Map):java.lang.String");
|
||||
}
|
||||
|
||||
public static String readPost(String url_str, Map<String, String> values) throws IOException {
|
||||
HttpURLConnection conn = null;
|
||||
try {
|
||||
HttpURLConnection conn2 = (HttpURLConnection) new URL(url_str).openConnection();
|
||||
conn2.setDoOutput(true);
|
||||
conn2.setRequestMethod("POST");
|
||||
if (values != null && values.size() > 0) {
|
||||
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(conn2.getOutputStream(), "UTF-8"));
|
||||
writer.write(queryString(values));
|
||||
writer.close();
|
||||
}
|
||||
String readInputStream = Util.readInputStream(conn2.getInputStream());
|
||||
if (conn2 != null) {
|
||||
conn2.disconnect();
|
||||
}
|
||||
return readInputStream;
|
||||
} catch (IOException e) {
|
||||
throwResponse(conn.getResponseCode());
|
||||
throw e;
|
||||
} catch (Throwable th) {
|
||||
if (conn != null) {
|
||||
conn.disconnect();
|
||||
}
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARNING: Removed duplicated region for block: B:21:? A[RETURN, SYNTHETIC] */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:8:0x003f */
|
||||
/* Code decompiled incorrectly, please refer to instructions dump. */
|
||||
public static void downloadGet(java.io.File r8, java.lang.String r9, java.util.Map<java.lang.String, java.lang.String> r10) throws java.io.IOException {
|
||||
/*
|
||||
r1 = 0
|
||||
if (r10 == 0) goto L_0x0043
|
||||
int r6 = r10.size() // Catch:{ IOException -> 0x0049 }
|
||||
if (r6 <= 0) goto L_0x0043
|
||||
java.net.URL r5 = new java.net.URL // Catch:{ IOException -> 0x0049 }
|
||||
java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0049 }
|
||||
java.lang.String r7 = java.lang.String.valueOf(r9) // Catch:{ IOException -> 0x0049 }
|
||||
r6.<init>(r7) // Catch:{ IOException -> 0x0049 }
|
||||
java.lang.String r7 = "?"
|
||||
java.lang.StringBuilder r6 = r6.append(r7) // Catch:{ IOException -> 0x0049 }
|
||||
java.lang.String r7 = queryString(r10) // Catch:{ IOException -> 0x0049 }
|
||||
java.lang.StringBuilder r6 = r6.append(r7) // Catch:{ IOException -> 0x0049 }
|
||||
java.lang.String r6 = r6.toString() // Catch:{ IOException -> 0x0049 }
|
||||
r5.<init>(r6) // Catch:{ IOException -> 0x0049 }
|
||||
L_0x0029:
|
||||
java.net.URLConnection r6 = r5.openConnection() // Catch:{ IOException -> 0x0049 }
|
||||
r0 = r6
|
||||
java.net.HttpURLConnection r0 = (java.net.HttpURLConnection) r0 // Catch:{ IOException -> 0x0049 }
|
||||
r1 = r0
|
||||
java.io.FileOutputStream r4 = new java.io.FileOutputStream // Catch:{ IOException -> 0x0049 }
|
||||
r4.<init>(r8) // Catch:{ IOException -> 0x0049 }
|
||||
java.io.InputStream r3 = r1.getInputStream() // Catch:{ IOException -> 0x0049 }
|
||||
p003ru.wishlist.util.Util.copyStreamInOut(r3, r4) // Catch:{ IOException -> 0x0049 }
|
||||
if (r1 == 0) goto L_0x0042
|
||||
r1.disconnect()
|
||||
L_0x0042:
|
||||
return
|
||||
L_0x0043:
|
||||
java.net.URL r5 = new java.net.URL // Catch:{ IOException -> 0x0049 }
|
||||
r5.<init>(r9) // Catch:{ IOException -> 0x0049 }
|
||||
goto L_0x0029
|
||||
L_0x0049:
|
||||
r2 = move-exception
|
||||
if (r1 == 0) goto L_0x0053
|
||||
int r6 = r1.getResponseCode() // Catch:{ all -> 0x0054 }
|
||||
throwResponse(r6) // Catch:{ all -> 0x0054 }
|
||||
L_0x0053:
|
||||
throw r2 // Catch:{ all -> 0x0054 }
|
||||
L_0x0054:
|
||||
r6 = move-exception
|
||||
if (r1 == 0) goto L_0x005a
|
||||
r1.disconnect()
|
||||
L_0x005a:
|
||||
throw r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: p003ru.wishlist.util.HTTP.downloadGet(java.io.File, java.lang.String, java.util.Map):void");
|
||||
}
|
||||
|
||||
/* JADX WARNING: Removed duplicated region for block: B:8:0x0053 */
|
||||
/* Code decompiled incorrectly, please refer to instructions dump. */
|
||||
public static int uploadPut(java.io.File r8, java.lang.String r9, java.util.Map<java.lang.String, java.lang.String> r10) throws java.io.IOException {
|
||||
/*
|
||||
r1 = 0
|
||||
if (r10 == 0) goto L_0x0057
|
||||
int r6 = r10.size() // Catch:{ IOException -> 0x005d }
|
||||
if (r6 <= 0) goto L_0x0057
|
||||
java.net.URL r5 = new java.net.URL // Catch:{ IOException -> 0x005d }
|
||||
java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ IOException -> 0x005d }
|
||||
java.lang.String r7 = java.lang.String.valueOf(r9) // Catch:{ IOException -> 0x005d }
|
||||
r6.<init>(r7) // Catch:{ IOException -> 0x005d }
|
||||
java.lang.String r7 = "?"
|
||||
java.lang.StringBuilder r6 = r6.append(r7) // Catch:{ IOException -> 0x005d }
|
||||
java.lang.String r7 = queryString(r10) // Catch:{ IOException -> 0x005d }
|
||||
java.lang.StringBuilder r6 = r6.append(r7) // Catch:{ IOException -> 0x005d }
|
||||
java.lang.String r6 = r6.toString() // Catch:{ IOException -> 0x005d }
|
||||
r5.<init>(r6) // Catch:{ IOException -> 0x005d }
|
||||
L_0x0029:
|
||||
java.net.URLConnection r6 = r5.openConnection() // Catch:{ IOException -> 0x005d }
|
||||
r0 = r6
|
||||
java.net.HttpURLConnection r0 = (java.net.HttpURLConnection) r0 // Catch:{ IOException -> 0x005d }
|
||||
r1 = r0
|
||||
r6 = 1
|
||||
r1.setDoOutput(r6) // Catch:{ IOException -> 0x005d }
|
||||
java.lang.String r6 = "PUT"
|
||||
r1.setRequestMethod(r6) // Catch:{ IOException -> 0x005d }
|
||||
java.lang.String r6 = "Content-type"
|
||||
java.lang.String r7 = "application/octet-stream"
|
||||
r1.setRequestProperty(r6, r7) // Catch:{ IOException -> 0x005d }
|
||||
java.io.OutputStream r4 = r1.getOutputStream() // Catch:{ IOException -> 0x005d }
|
||||
java.io.FileInputStream r3 = new java.io.FileInputStream // Catch:{ IOException -> 0x005d }
|
||||
r3.<init>(r8) // Catch:{ IOException -> 0x005d }
|
||||
p003ru.wishlist.util.Util.copyStreamInOut(r3, r4) // Catch:{ IOException -> 0x005d }
|
||||
int r6 = r1.getResponseCode() // Catch:{ IOException -> 0x005d }
|
||||
if (r1 == 0) goto L_0x0056
|
||||
r1.disconnect()
|
||||
L_0x0056:
|
||||
return r6
|
||||
L_0x0057:
|
||||
java.net.URL r5 = new java.net.URL // Catch:{ IOException -> 0x005d }
|
||||
r5.<init>(r9) // Catch:{ IOException -> 0x005d }
|
||||
goto L_0x0029
|
||||
L_0x005d:
|
||||
r2 = move-exception
|
||||
int r6 = r1.getResponseCode() // Catch:{ all -> 0x0066 }
|
||||
throwResponse(r6) // Catch:{ all -> 0x0066 }
|
||||
throw r2 // Catch:{ all -> 0x0066 }
|
||||
L_0x0066:
|
||||
r6 = move-exception
|
||||
if (r1 == 0) goto L_0x006c
|
||||
r1.disconnect()
|
||||
L_0x006c:
|
||||
throw r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: p003ru.wishlist.util.HTTP.uploadPut(java.io.File, java.lang.String, java.util.Map):int");
|
||||
}
|
||||
|
||||
/* JADX WARNING: Removed duplicated region for block: B:8:0x0052 */
|
||||
/* Code decompiled incorrectly, please refer to instructions dump. */
|
||||
public static int uploadPut(android.graphics.Bitmap r7, java.lang.String r8, java.util.Map<java.lang.String, java.lang.String> r9) throws java.io.IOException {
|
||||
/*
|
||||
r1 = 0
|
||||
if (r9 == 0) goto L_0x0056
|
||||
int r5 = r9.size() // Catch:{ IOException -> 0x005c }
|
||||
if (r5 <= 0) goto L_0x0056
|
||||
java.net.URL r4 = new java.net.URL // Catch:{ IOException -> 0x005c }
|
||||
java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x005c }
|
||||
java.lang.String r6 = java.lang.String.valueOf(r8) // Catch:{ IOException -> 0x005c }
|
||||
r5.<init>(r6) // Catch:{ IOException -> 0x005c }
|
||||
java.lang.String r6 = "?"
|
||||
java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ IOException -> 0x005c }
|
||||
java.lang.String r6 = queryString(r9) // Catch:{ IOException -> 0x005c }
|
||||
java.lang.StringBuilder r5 = r5.append(r6) // Catch:{ IOException -> 0x005c }
|
||||
java.lang.String r5 = r5.toString() // Catch:{ IOException -> 0x005c }
|
||||
r4.<init>(r5) // Catch:{ IOException -> 0x005c }
|
||||
L_0x0029:
|
||||
java.net.URLConnection r5 = r4.openConnection() // Catch:{ IOException -> 0x005c }
|
||||
r0 = r5
|
||||
java.net.HttpURLConnection r0 = (java.net.HttpURLConnection) r0 // Catch:{ IOException -> 0x005c }
|
||||
r1 = r0
|
||||
r5 = 1
|
||||
r1.setDoOutput(r5) // Catch:{ IOException -> 0x005c }
|
||||
java.lang.String r5 = "PUT"
|
||||
r1.setRequestMethod(r5) // Catch:{ IOException -> 0x005c }
|
||||
java.lang.String r5 = "Content-type"
|
||||
java.lang.String r6 = "application/octet-stream"
|
||||
r1.setRequestProperty(r5, r6) // Catch:{ IOException -> 0x005c }
|
||||
java.io.OutputStream r3 = r1.getOutputStream() // Catch:{ IOException -> 0x005c }
|
||||
android.graphics.Bitmap$CompressFormat r5 = android.graphics.Bitmap.CompressFormat.JPEG // Catch:{ IOException -> 0x005c }
|
||||
r6 = 90
|
||||
r7.compress(r5, r6, r3) // Catch:{ IOException -> 0x005c }
|
||||
int r5 = r1.getResponseCode() // Catch:{ IOException -> 0x005c }
|
||||
if (r1 == 0) goto L_0x0055
|
||||
r1.disconnect()
|
||||
L_0x0055:
|
||||
return r5
|
||||
L_0x0056:
|
||||
java.net.URL r4 = new java.net.URL // Catch:{ IOException -> 0x005c }
|
||||
r4.<init>(r8) // Catch:{ IOException -> 0x005c }
|
||||
goto L_0x0029
|
||||
L_0x005c:
|
||||
r2 = move-exception
|
||||
int r5 = r1.getResponseCode() // Catch:{ all -> 0x0065 }
|
||||
throwResponse(r5) // Catch:{ all -> 0x0065 }
|
||||
throw r2 // Catch:{ all -> 0x0065 }
|
||||
L_0x0065:
|
||||
r5 = move-exception
|
||||
if (r1 == 0) goto L_0x006b
|
||||
r1.disconnect()
|
||||
L_0x006b:
|
||||
throw r5
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: p003ru.wishlist.util.HTTP.uploadPut(android.graphics.Bitmap, java.lang.String, java.util.Map):int");
|
||||
}
|
||||
|
||||
/* JADX WARNING: Removed duplicated region for block: B:8:0x003c */
|
||||
/* Code decompiled incorrectly, please refer to instructions dump. */
|
||||
public static java.util.Map<java.lang.String, java.util.List<java.lang.String>> headersHead(java.lang.String r6, java.util.Map<java.lang.String, java.lang.String> r7) throws java.io.IOException {
|
||||
/*
|
||||
r1 = 0
|
||||
if (r7 == 0) goto L_0x0040
|
||||
int r4 = r7.size() // Catch:{ IOException -> 0x0046 }
|
||||
if (r4 <= 0) goto L_0x0040
|
||||
java.net.URL r3 = new java.net.URL // Catch:{ IOException -> 0x0046 }
|
||||
java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0046 }
|
||||
java.lang.String r5 = java.lang.String.valueOf(r6) // Catch:{ IOException -> 0x0046 }
|
||||
r4.<init>(r5) // Catch:{ IOException -> 0x0046 }
|
||||
java.lang.String r5 = "?"
|
||||
java.lang.StringBuilder r4 = r4.append(r5) // Catch:{ IOException -> 0x0046 }
|
||||
java.lang.String r5 = queryString(r7) // Catch:{ IOException -> 0x0046 }
|
||||
java.lang.StringBuilder r4 = r4.append(r5) // Catch:{ IOException -> 0x0046 }
|
||||
java.lang.String r4 = r4.toString() // Catch:{ IOException -> 0x0046 }
|
||||
r3.<init>(r4) // Catch:{ IOException -> 0x0046 }
|
||||
L_0x0029:
|
||||
java.net.URLConnection r4 = r3.openConnection() // Catch:{ IOException -> 0x0046 }
|
||||
r0 = r4
|
||||
java.net.HttpURLConnection r0 = (java.net.HttpURLConnection) r0 // Catch:{ IOException -> 0x0046 }
|
||||
r1 = r0
|
||||
java.lang.String r4 = "HEAD"
|
||||
r1.setRequestMethod(r4) // Catch:{ IOException -> 0x0046 }
|
||||
java.util.Map r4 = r1.getHeaderFields() // Catch:{ IOException -> 0x0046 }
|
||||
if (r1 == 0) goto L_0x003f
|
||||
r1.disconnect()
|
||||
L_0x003f:
|
||||
return r4
|
||||
L_0x0040:
|
||||
java.net.URL r3 = new java.net.URL // Catch:{ IOException -> 0x0046 }
|
||||
r3.<init>(r6) // Catch:{ IOException -> 0x0046 }
|
||||
goto L_0x0029
|
||||
L_0x0046:
|
||||
r2 = move-exception
|
||||
if (r1 == 0) goto L_0x0050
|
||||
int r4 = r1.getResponseCode() // Catch:{ all -> 0x0051 }
|
||||
throwResponse(r4) // Catch:{ all -> 0x0051 }
|
||||
L_0x0050:
|
||||
throw r2 // Catch:{ all -> 0x0051 }
|
||||
L_0x0051:
|
||||
r4 = move-exception
|
||||
if (r1 == 0) goto L_0x0057
|
||||
r1.disconnect()
|
||||
L_0x0057:
|
||||
throw r4
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: p003ru.wishlist.util.HTTP.headersHead(java.lang.String, java.util.Map):java.util.Map");
|
||||
}
|
||||
|
||||
public static String queryString(Map<String, String> values) throws UnsupportedEncodingException {
|
||||
StringBuffer req = new StringBuffer();
|
||||
for (Map.Entry<String, String> entry : values.entrySet()) {
|
||||
req.append(URLEncoder.encode(entry.getKey(), "UTF-8"));
|
||||
req.append("=");
|
||||
req.append(URLEncoder.encode(entry.getValue(), "UTF-8"));
|
||||
req.append("&");
|
||||
}
|
||||
return req.toString();
|
||||
}
|
||||
|
||||
static int throwResponse(int response) throws HTTPException {
|
||||
if (response < 400 || response > 599) {
|
||||
return response;
|
||||
}
|
||||
throw new HTTPException(response);
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package p003ru.wishlist.util;
|
||||
|
||||
/* renamed from: ru.wishlist.util.NonNullValidator */
|
||||
public class NonNullValidator implements Validatable {
|
||||
public boolean empty;
|
||||
public boolean valid;
|
||||
private ValidatorWaiter waiter;
|
||||
|
||||
public NonNullValidator(ValidatorWaiter waiter2) {
|
||||
this.waiter = waiter2;
|
||||
}
|
||||
|
||||
public boolean validCheck(Object object) {
|
||||
return object != null;
|
||||
}
|
||||
|
||||
public boolean emptyCheck(Object object) {
|
||||
return object == null;
|
||||
}
|
||||
|
||||
public void afterObjectChanged(Object object) {
|
||||
boolean newvalid = validCheck(object);
|
||||
boolean newempty = emptyCheck(object);
|
||||
if (this.valid != newvalid || this.empty != newempty) {
|
||||
this.valid = newvalid;
|
||||
this.empty = newempty;
|
||||
this.waiter.onChange(this);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean valid() {
|
||||
return this.valid;
|
||||
}
|
||||
|
||||
public boolean empty() {
|
||||
return this.empty;
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package p003ru.wishlist.util;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Rect;
|
||||
import android.util.Log;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/* renamed from: ru.wishlist.util.Util */
|
||||
public final class Util {
|
||||
public static Bitmap loadBitmapDownsampled(File file, int maxWidth, int maxHeight) {
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
try {
|
||||
InputStream input = new FileInputStream(file);
|
||||
options.inJustDecodeBounds = true;
|
||||
BitmapFactory.decodeStream(input, (Rect) null, options);
|
||||
input.close();
|
||||
options.inSampleSize = 1;
|
||||
while (true) {
|
||||
if (options.outWidth / options.inSampleSize > maxWidth || options.outWidth / options.inSampleSize > maxHeight) {
|
||||
options.inSampleSize *= 2;
|
||||
} else {
|
||||
try {
|
||||
options.inJustDecodeBounds = false;
|
||||
options.inPurgeable = true;
|
||||
options.inInputShareable = true;
|
||||
FileInputStream fileInputStream = new FileInputStream(file);
|
||||
try {
|
||||
Bitmap bitmap = BitmapFactory.decodeStream(fileInputStream, (Rect) null, options);
|
||||
fileInputStream.close();
|
||||
return bitmap;
|
||||
} catch (Exception e) {
|
||||
e = e;
|
||||
FileInputStream fileInputStream2 = fileInputStream;
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
e = e2;
|
||||
Log.e("loadBitmapDownsampled", "on read bitmap", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e3) {
|
||||
Log.e("loadBitmapDownsampled", "on read image details", e3);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean checkBitmapSize(File file, int maxWidth, int maxHeight) {
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
try {
|
||||
InputStream input = new FileInputStream(file);
|
||||
options.inJustDecodeBounds = true;
|
||||
BitmapFactory.decodeStream(input, (Rect) null, options);
|
||||
input.close();
|
||||
if (options.outWidth >= maxWidth || options.outHeight >= maxHeight) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Log.e("checkBitmapSize", "on read image details", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static String readInputStream(InputStream in) throws IOException {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
||||
StringBuilder response = new StringBuilder();
|
||||
while (true) {
|
||||
String buf = reader.readLine();
|
||||
if (buf == null) {
|
||||
return response.toString();
|
||||
}
|
||||
response.append(buf);
|
||||
}
|
||||
}
|
||||
|
||||
public static int copyStreamInOut(InputStream is, OutputStream os) throws IOException {
|
||||
try {
|
||||
byte[] buf = new byte[131072];
|
||||
while (true) {
|
||||
int len = is.read(buf);
|
||||
if (len <= 0) {
|
||||
break;
|
||||
}
|
||||
os.write(buf, 0, len);
|
||||
}
|
||||
return 0;
|
||||
} finally {
|
||||
if (is != null) {
|
||||
is.close();
|
||||
}
|
||||
if (os != null) {
|
||||
os.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package p003ru.wishlist.util;
|
||||
|
||||
/* renamed from: ru.wishlist.util.Validatable */
|
||||
public interface Validatable {
|
||||
boolean empty();
|
||||
|
||||
boolean valid();
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package p003ru.wishlist.util;
|
||||
|
||||
/* renamed from: ru.wishlist.util.ValidatorWaiter */
|
||||
public abstract class ValidatorWaiter {
|
||||
public Validatable[] validators = new Validatable[0];
|
||||
public Validatable[] validators_all_nonempty = new Validatable[0];
|
||||
public Validatable[] validators_any_nonempty = new Validatable[0];
|
||||
|
||||
public abstract void onChangeInvalid();
|
||||
|
||||
public abstract void onChangeValid();
|
||||
|
||||
public boolean valid_all() {
|
||||
boolean valid = true;
|
||||
for (Validatable v : this.validators) {
|
||||
valid &= v.valid();
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
|
||||
public boolean validate_any_nonempty() {
|
||||
if (this.validators_any_nonempty.length == 0) {
|
||||
return true;
|
||||
}
|
||||
for (Validatable v : this.validators_any_nonempty) {
|
||||
if (!v.empty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean validate_all_nonempty() {
|
||||
for (Validatable v : this.validators_all_nonempty) {
|
||||
if (v.empty()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onChange(Validatable validator) {
|
||||
if (!valid_all() || !validate_any_nonempty() || !validate_all_nonempty() || !validate_custom()) {
|
||||
onChangeInvalid();
|
||||
} else {
|
||||
onChangeValid();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean validate_custom() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.BuildConfig */
|
||||
public final class BuildConfig {
|
||||
public static final boolean DEBUG = true;
|
||||
}
|
||||
+278
@@ -0,0 +1,278 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R */
|
||||
public final class C0088R {
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$array */
|
||||
public static final class array {
|
||||
public static final int wish_visible_titles = 2131165185;
|
||||
public static final int wish_visible_values = 2131165184;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$attr */
|
||||
public static final class attr {
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$color */
|
||||
public static final class color {
|
||||
public static final int alter = 2130968581;
|
||||
public static final int alter_light = 2130968582;
|
||||
public static final int alter_vivid = 2130968583;
|
||||
public static final int basic = 2130968576;
|
||||
public static final int basic_light1 = 2130968577;
|
||||
public static final int basic_light2 = 2130968578;
|
||||
public static final int basic_light3 = 2130968579;
|
||||
public static final int basic_light4 = 2130968580;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$dimen */
|
||||
public static final class dimen {
|
||||
public static final int activity_horizontal_margin = 2131034135;
|
||||
public static final int activity_horizontal_padding = 2131034112;
|
||||
public static final int activity_vertical_padding = 2131034113;
|
||||
public static final int arrow_header_expandable_section_bottom_padding = 2131034124;
|
||||
public static final int arrow_header_expandable_section_right_padding = 2131034123;
|
||||
public static final int arrow_header_expandable_section_top_padding = 2131034125;
|
||||
public static final int content_expandable_section_bottom_padding = 2131034127;
|
||||
public static final int content_expandable_section_top_padding = 2131034126;
|
||||
public static final int element_bottom_padding = 2131034114;
|
||||
public static final int element_right_padding = 2131034115;
|
||||
public static final int form_bottom_top_padding = 2131034130;
|
||||
public static final int form_label_left_padding = 2131034129;
|
||||
public static final int form_label_top_padding = 2131034128;
|
||||
public static final int listview_column_padding_left = 2131034133;
|
||||
public static final int minimal_padding = 2131034116;
|
||||
public static final int section_bottom_padding = 2131034121;
|
||||
public static final int section_horizontal_padding = 2131034117;
|
||||
public static final int section_left_padding = 2131034122;
|
||||
public static final int section_right_padding = 2131034120;
|
||||
public static final int section_top_padding = 2131034119;
|
||||
public static final int section_vertical_padding = 2131034118;
|
||||
public static final int text_small = 2131034134;
|
||||
public static final int wish_edit_image_size = 2131034132;
|
||||
public static final int wishlist_image_size = 2131034131;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$drawable */
|
||||
public static final class C0089drawable {
|
||||
public static final int border = 2130837504;
|
||||
public static final int divider = 2130837505;
|
||||
public static final int edit_text = 2130837506;
|
||||
public static final int ic_launcher = 2130837507;
|
||||
public static final int section_divided_background = 2130837508;
|
||||
public static final int textfield_default = 2130837509;
|
||||
public static final int textfield_pressed = 2130837510;
|
||||
public static final int textfield_selected = 2130837511;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$id */
|
||||
public static final class C0090id {
|
||||
public static final int button_add_shortcut_add_wish = 2131099660;
|
||||
public static final int button_add_shortcut_photo_wish = 2131099659;
|
||||
public static final int button_login_signin = 2131099657;
|
||||
public static final int button_login_signup = 2131099658;
|
||||
public static final int button_wish_add = 2131099664;
|
||||
public static final int group_connected = 2131099714;
|
||||
public static final int group_disconnected = 2131099711;
|
||||
public static final int header1 = 2131099676;
|
||||
public static final int icon1 = 2131099678;
|
||||
public static final int layout1 = 2131099648;
|
||||
public static final int layout2 = 2131099649;
|
||||
public static final int layout3 = 2131099650;
|
||||
public static final int login_form_login = 2131099652;
|
||||
public static final int login_form_password = 2131099653;
|
||||
public static final int login_form_password_repeat = 2131099654;
|
||||
public static final int login_form_progress_bar = 2131099656;
|
||||
public static final int login_form_submit = 2131099655;
|
||||
public static final int login_fragment = 2131099662;
|
||||
public static final int menu_add = 2131099704;
|
||||
public static final int menu_cancel = 2131099703;
|
||||
public static final int menu_delete = 2131099708;
|
||||
public static final int menu_edit = 2131099706;
|
||||
public static final int menu_my_wishlist = 2131099715;
|
||||
public static final int menu_preferences = 2131099719;
|
||||
public static final int menu_realized = 2131099705;
|
||||
public static final int menu_reset = 2131099720;
|
||||
public static final int menu_resync = 2131099716;
|
||||
public static final int menu_save = 2131099702;
|
||||
public static final int menu_share = 2131099707;
|
||||
public static final int menu_signin = 2131099712;
|
||||
public static final int menu_signout = 2131099717;
|
||||
public static final int menu_signup = 2131099713;
|
||||
public static final int menu_website = 2131099718;
|
||||
public static final int menu_wishlist = 2131099709;
|
||||
public static final int menu_wishlistru = 2131099710;
|
||||
public static final int pager = 2131099691;
|
||||
public static final int scroll = 2131099665;
|
||||
public static final int shortcuts_fragment = 2131099663;
|
||||
public static final int text1 = 2131099677;
|
||||
public static final int text2 = 2131099684;
|
||||
public static final int text3 = 2131099686;
|
||||
public static final int text4 = 2131099688;
|
||||
public static final int view_event = 2131099698;
|
||||
public static final int view_image = 2131099651;
|
||||
public static final int view_link = 2131099695;
|
||||
public static final int view_link_section = 2131099694;
|
||||
public static final int view_post = 2131099699;
|
||||
public static final int view_price = 2131099697;
|
||||
public static final int view_price_event = 2131099696;
|
||||
public static final int view_rating = 2131099700;
|
||||
public static final int view_tags = 2131099693;
|
||||
public static final int view_visible = 2131099701;
|
||||
public static final int view_wish = 2131099692;
|
||||
public static final int wish_add_fragment = 2131099661;
|
||||
public static final int wish_form_choose_picture = 2131099673;
|
||||
public static final int wish_form_delete_picture = 2131099670;
|
||||
public static final int wish_form_details = 2131099675;
|
||||
public static final int wish_form_details_group = 2131099679;
|
||||
public static final int wish_form_event = 2131099682;
|
||||
public static final int wish_form_image = 2131099669;
|
||||
public static final int wish_form_image_add = 2131099671;
|
||||
public static final int wish_form_image_group = 2131099668;
|
||||
public static final int wish_form_link = 2131099680;
|
||||
public static final int wish_form_photo_picture = 2131099672;
|
||||
public static final int wish_form_post = 2131099683;
|
||||
public static final int wish_form_price = 2131099681;
|
||||
public static final int wish_form_rating = 2131099685;
|
||||
public static final int wish_form_realized = 2131099689;
|
||||
public static final int wish_form_save1 = 2131099674;
|
||||
public static final int wish_form_save2 = 2131099690;
|
||||
public static final int wish_form_tags = 2131099667;
|
||||
public static final int wish_form_visible = 2131099687;
|
||||
public static final int wish_form_wish = 2131099666;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$layout */
|
||||
public static final class layout {
|
||||
public static final int divider_horizontal = 2130903040;
|
||||
public static final int image_view = 2130903041;
|
||||
public static final int login_form = 2130903042;
|
||||
public static final int login_fragment = 2130903043;
|
||||
public static final int shortcuts_fragment = 2130903044;
|
||||
public static final int welcome = 2130903045;
|
||||
public static final int wish_add_fragment = 2130903046;
|
||||
public static final int wish_form = 2130903047;
|
||||
public static final int wish_slide_pager = 2130903048;
|
||||
public static final int wish_view = 2130903049;
|
||||
public static final int wishlist_item = 2130903050;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$menu */
|
||||
public static final class menu {
|
||||
public static final int wish_edit_options_menu = 2131361792;
|
||||
public static final int wish_options_menu = 2131361793;
|
||||
public static final int wishlist_options_menu = 2131361794;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$string */
|
||||
public static final class string {
|
||||
public static final int about_login = 2131230779;
|
||||
public static final int about_shortcuts = 2131230778;
|
||||
public static final int action_settings = 2131230721;
|
||||
public static final int add = 2131230740;
|
||||
public static final int add_wish = 2131230776;
|
||||
public static final int api_url = 2131230797;
|
||||
public static final int app_name = 2131230720;
|
||||
public static final int are_you_sure_to_delete = 2131230793;
|
||||
public static final int bapi_url = 2131230795;
|
||||
public static final int bimage_url_prefix = 2131230796;
|
||||
public static final int cancel = 2131230742;
|
||||
public static final int change_picture = 2131230750;
|
||||
public static final int choose_picture = 2131230748;
|
||||
public static final int confirmation = 2131230792;
|
||||
public static final int delete = 2131230743;
|
||||
public static final int delete_picture = 2131230751;
|
||||
public static final int details = 2131230780;
|
||||
public static final int error_already_in_progress = 2131230737;
|
||||
public static final int error_network = 2131230732;
|
||||
public static final int error_no_account = 2131230734;
|
||||
public static final int error_no_network = 2131230733;
|
||||
public static final int error_server = 2131230735;
|
||||
public static final int error_title = 2131230731;
|
||||
public static final int error_unauthorized = 2131230736;
|
||||
public static final int full_reset = 2131230788;
|
||||
public static final int image_url_prefix = 2131230798;
|
||||
public static final int install = 2131230746;
|
||||
public static final int link = 2131230763;
|
||||
public static final int login = 2131230754;
|
||||
public static final int menu_add = 2131230724;
|
||||
public static final int menu_delete = 2131230752;
|
||||
public static final int menu_edit = 2131230725;
|
||||
public static final int menu_preferences = 2131230787;
|
||||
public static final int menu_share = 2131230726;
|
||||
public static final int menu_site = 2131230727;
|
||||
public static final int my_wishlist = 2131230765;
|
||||
|
||||
/* renamed from: no */
|
||||
public static final int f7no = 2131230745;
|
||||
public static final int op_download = 2131230769;
|
||||
public static final int op_signin = 2131230766;
|
||||
public static final int op_signup = 2131230767;
|
||||
public static final int op_upload = 2131230768;
|
||||
public static final int password = 2131230755;
|
||||
public static final int password_repeat = 2131230756;
|
||||
public static final int photo_picture = 2131230749;
|
||||
public static final int photo_wish = 2131230777;
|
||||
public static final int raiting = 2131230786;
|
||||
public static final int realized = 2131230789;
|
||||
public static final int resolve_edit = 2131230728;
|
||||
public static final int resync = 2131230759;
|
||||
public static final int resync_complete = 2131230770;
|
||||
public static final int save = 2131230741;
|
||||
public static final int send = 2131230722;
|
||||
public static final int share_wishlist_login_required = 2131230791;
|
||||
public static final int shortcut_add_wish = 2131230774;
|
||||
public static final int shortcut_photo_wish = 2131230775;
|
||||
public static final int signin = 2131230757;
|
||||
public static final int signout = 2131230758;
|
||||
public static final int signup = 2131230753;
|
||||
public static final int skip = 2131230760;
|
||||
public static final int stat_images = 2131230773;
|
||||
public static final int stat_mod_wishes = 2131230772;
|
||||
public static final int stat_new_wishes = 2131230771;
|
||||
public static final int subject_in_my_wishlist = 2131230762;
|
||||
public static final int take_picture = 2131230747;
|
||||
public static final int title_create = 2131230729;
|
||||
public static final int title_edit = 2131230730;
|
||||
public static final int title_wish_list = 2131230723;
|
||||
public static final int website = 2131230764;
|
||||
public static final int wish = 2131230738;
|
||||
public static final int wish_event = 2131230783;
|
||||
public static final int wish_post = 2131230739;
|
||||
public static final int wish_price = 2131230782;
|
||||
public static final int wish_realized = 2131230785;
|
||||
public static final int wish_tags = 2131230781;
|
||||
public static final int wish_url_prefix = 2131230799;
|
||||
public static final int wish_visible = 2131230784;
|
||||
public static final int wishlist = 2131230790;
|
||||
public static final int wishlist_is_ready = 2131230794;
|
||||
public static final int wishlist_url = 2131230802;
|
||||
public static final int wishlist_url_login = 2131230801;
|
||||
public static final int wishlist_url_prefix = 2131230800;
|
||||
public static final int wishlistru = 2131230761;
|
||||
public static final int yes = 2131230744;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.R$style */
|
||||
public static final class style {
|
||||
public static final int AppBaseTheme = 2131296256;
|
||||
public static final int AppTheme = 2131296257;
|
||||
public static final int App_EditTextStyle = 2131296258;
|
||||
public static final int App_ListViewStyle = 2131296261;
|
||||
public static final int App_RatingBarStyle = 2131296259;
|
||||
public static final int App_SpinnerItemStyle = 2131296262;
|
||||
public static final int App_TextViewStyle = 2131296260;
|
||||
public static final int ArrowHeaderExpandableSection = 2131296269;
|
||||
public static final int ContentExpandableSection = 2131296270;
|
||||
public static final int ContentSection = 2131296265;
|
||||
public static final int FormLabel = 2131296268;
|
||||
public static final int LayoutFormBottom = 2131296271;
|
||||
public static final int LayoutSection = 2131296263;
|
||||
public static final int LayoutSectionDivided = 2131296264;
|
||||
public static final int LinkRemark = 2131296273;
|
||||
public static final int TextHeader = 2131296266;
|
||||
public static final int TextHeaderSection = 2131296267;
|
||||
public static final int TextRemark = 2131296272;
|
||||
public static final int TextRemarkLast = 2131296274;
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.Toast;
|
||||
import p003ru.wishlist.server.Server;
|
||||
import p003ru.wishlist.wishlist.model.Wish;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.CommonActivity */
|
||||
public abstract class CommonActivity {
|
||||
public static void inflateMenuWish(Activity activity, Menu menu, Uri uri, MenuInflater inflater) {
|
||||
MenuItem item;
|
||||
inflater.inflate(C0088R.menu.wish_options_menu, menu);
|
||||
if (((Wish) new Wish(activity, uri).load()).realized && (item = menu.findItem(C0088R.C0090id.menu_realized)) != null) {
|
||||
item.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
public static void inflateMenuWish(Activity activity, Menu menu, Uri uri) {
|
||||
inflateMenuWish(activity, menu, uri, activity.getMenuInflater());
|
||||
}
|
||||
|
||||
public static boolean handleMenuWish(Activity activity, MenuItem item, Uri uri) {
|
||||
if (uri == null) {
|
||||
uri = activity.getIntent().getData();
|
||||
}
|
||||
switch (item.getItemId()) {
|
||||
case C0088R.C0090id.menu_add:
|
||||
Intent intent = new Intent(activity, WishEditActivity.class);
|
||||
intent.setAction(WishEditActivity.ACTION_ADD_WISH);
|
||||
activity.startActivity(intent);
|
||||
return true;
|
||||
case C0088R.C0090id.menu_realized:
|
||||
item.setVisible(false);
|
||||
return realizedWish(activity, uri);
|
||||
case C0088R.C0090id.menu_edit:
|
||||
activity.startActivity(new Intent("android.intent.action.EDIT", uri));
|
||||
return true;
|
||||
case C0088R.C0090id.menu_share:
|
||||
return shareWish(activity, uri);
|
||||
case C0088R.C0090id.menu_delete:
|
||||
activity.startActivity(new Intent("android.intent.action.DELETE", uri));
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static boolean shareWish(Activity activity, Uri uri) {
|
||||
Intent sendIntent = new Intent();
|
||||
Wish wish = new Wish(activity, uri);
|
||||
wish.load();
|
||||
String text = wish.wish;
|
||||
if (wish.issetServerID()) {
|
||||
text = String.valueOf(text) + "\n" + wish.getServerURL();
|
||||
}
|
||||
sendIntent.putExtra("android.intent.extra.TEXT", text);
|
||||
sendIntent.putExtra("android.intent.extra.SUBJECT", activity.getString(C0088R.string.subject_in_my_wishlist));
|
||||
sendIntent.setAction("android.intent.action.SEND");
|
||||
sendIntent.setType("text/plain");
|
||||
activity.startActivity(Intent.createChooser(sendIntent, activity.getString(C0088R.string.menu_share)));
|
||||
return true;
|
||||
}
|
||||
|
||||
static boolean realizedWish(Activity activity, Uri uri) {
|
||||
Wish wish = (Wish) new Wish(activity, uri).load();
|
||||
wish.realized = true;
|
||||
wish.setFlagLocalEdit(true);
|
||||
wish.save();
|
||||
new ServerUploadTask().setContext(activity).execute(new Void[0]);
|
||||
Toast.makeText(activity, activity.getString(C0088R.string.wish_realized), 0).show();
|
||||
return true;
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.CommonActivity$ServerUploadTask */
|
||||
static class ServerUploadTask extends AsyncTask<Void, Void, Void> {
|
||||
Context context;
|
||||
|
||||
ServerUploadTask() {
|
||||
}
|
||||
|
||||
public ServerUploadTask setContext(Context context2) {
|
||||
this.context = context2;
|
||||
return this;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public Void doInBackground(Void... voids) {
|
||||
try {
|
||||
new Server(this.context, 1).upload();
|
||||
return null;
|
||||
} catch (Server.ServerException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.Display;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import java.io.File;
|
||||
import p003ru.wishlist.util.Util;
|
||||
import p004uk.p005co.senab.photoview.PhotoViewAttacher;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.ImageViewActivity */
|
||||
public class ImageViewActivity extends Activity {
|
||||
static final int MAX_DISPLAY_SCALE = 1;
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
requestWindowFeature(1);
|
||||
getWindow().setFlags(1024, 1024);
|
||||
Display display = getWindowManager().getDefaultDisplay();
|
||||
int maxWidth = display.getWidth() * 1;
|
||||
int maxHeight = display.getHeight() * 1;
|
||||
setContentView(C0088R.layout.image_view);
|
||||
ImageView img = (ImageView) findViewById(C0088R.C0090id.view_image);
|
||||
img.setImageBitmap(Util.loadBitmapDownsampled(new File(getIntent().getData().getPath()), maxWidth, maxHeight));
|
||||
PhotoViewAttacher pv = new PhotoViewAttacher(img);
|
||||
pv.setMaximumScale(4.0f);
|
||||
pv.setMediumScale(2.0f);
|
||||
pv.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {
|
||||
public void onPhotoTap(View v, float x, float y) {
|
||||
ImageViewActivity.this.finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
+218
@@ -0,0 +1,218 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
import java.io.IOException;
|
||||
import p003ru.wishlist.server.ResyncTask;
|
||||
import p003ru.wishlist.server.Server;
|
||||
import p003ru.wishlist.util.EditTextValidator;
|
||||
import p003ru.wishlist.util.Validatable;
|
||||
import p003ru.wishlist.util.ValidatorWaiter;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.LoginActivity */
|
||||
public class LoginActivity extends Activity {
|
||||
public static String ACTION_SIGNIN = "ru.wishlist.wishlist.action.SIGNIN_LOGIN";
|
||||
public static String ACTION_SIGNUP = "ru.wishlist.wishlist.action.SIGNUP_LOGIN";
|
||||
private static final String TAG = "LoginActivity";
|
||||
private String action;
|
||||
/* access modifiers changed from: private */
|
||||
public ServerLoginTask mLoginTask;
|
||||
/* access modifiers changed from: private */
|
||||
public ProgressBar mProgress;
|
||||
/* access modifiers changed from: private */
|
||||
public Button mSubmitButton;
|
||||
private EditText mTextLogin;
|
||||
private EditText mTextPassword;
|
||||
private EditText mTextPasswordRepeat;
|
||||
private ValidatorWaiterSubmitButton mValidatorWaiterSubmitButton = new ValidatorWaiterSubmitButton(this, (ValidatorWaiterSubmitButton) null);
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.LoginActivity$ValidatorWaiterSubmitButton */
|
||||
private final class ValidatorWaiterSubmitButton extends ValidatorWaiter {
|
||||
private ValidatorWaiterSubmitButton() {
|
||||
}
|
||||
|
||||
/* synthetic */ ValidatorWaiterSubmitButton(LoginActivity loginActivity, ValidatorWaiterSubmitButton validatorWaiterSubmitButton) {
|
||||
this();
|
||||
}
|
||||
|
||||
public void onChangeValid() {
|
||||
if (!LoginActivity.this.mSubmitButton.isEnabled()) {
|
||||
LoginActivity.this.mSubmitButton.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void onChangeInvalid() {
|
||||
if (LoginActivity.this.mSubmitButton.isEnabled()) {
|
||||
LoginActivity.this.mSubmitButton.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.LoginActivity$EditTextPasswordValidator */
|
||||
private final class EditTextPasswordValidator extends EditTextValidator {
|
||||
public EditTextPasswordValidator(ValidatorWaiter waiter, EditText edittext) {
|
||||
super(waiter, edittext);
|
||||
}
|
||||
|
||||
public boolean validEditable(Editable editable) {
|
||||
return editable.length() >= 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
this.action = getIntent().getAction();
|
||||
setContentView(C0088R.layout.login_form);
|
||||
this.mTextLogin = (EditText) findViewById(C0088R.C0090id.login_form_login);
|
||||
this.mTextPassword = (EditText) findViewById(C0088R.C0090id.login_form_password);
|
||||
this.mSubmitButton = (Button) findViewById(C0088R.C0090id.login_form_submit);
|
||||
this.mTextPasswordRepeat = (EditText) findViewById(C0088R.C0090id.login_form_password_repeat);
|
||||
EditTextValidator validateLogin = new EditTextValidator(this.mValidatorWaiterSubmitButton, this.mTextLogin);
|
||||
EditTextValidator validatePassword = new EditTextPasswordValidator(this.mValidatorWaiterSubmitButton, this.mTextPassword);
|
||||
if (ACTION_SIGNIN.equals(this.action)) {
|
||||
Validatable[] validatableArr = {validatePassword};
|
||||
this.mValidatorWaiterSubmitButton.validators = validatableArr;
|
||||
Validatable[] validatableArr2 = {validateLogin, validatePassword};
|
||||
this.mValidatorWaiterSubmitButton.validators_all_nonempty = validatableArr2;
|
||||
this.mSubmitButton.setText(C0088R.string.signin);
|
||||
this.mTextPasswordRepeat.setVisibility(8);
|
||||
this.mTextLogin.setText(Server.currentLogname(this));
|
||||
} else if (ACTION_SIGNUP.equals(this.action)) {
|
||||
EditTextValidator validatePasswordRepeat = new EditTextPasswordValidator(this.mValidatorWaiterSubmitButton, this.mTextPasswordRepeat);
|
||||
Validatable[] validatableArr3 = {validatePassword, validatePasswordRepeat};
|
||||
this.mValidatorWaiterSubmitButton.validators = validatableArr3;
|
||||
Validatable[] validatableArr4 = {validateLogin, validatePassword, validatePasswordRepeat};
|
||||
this.mValidatorWaiterSubmitButton.validators_all_nonempty = validatableArr4;
|
||||
this.mSubmitButton.setText(C0088R.string.signup);
|
||||
}
|
||||
this.mProgress = (ProgressBar) findViewById(C0088R.C0090id.login_form_progress_bar);
|
||||
}
|
||||
|
||||
public void submit(View view) {
|
||||
String login = this.mTextLogin.getText().toString();
|
||||
String password = this.mTextPassword.getText().toString();
|
||||
if (this.mLoginTask == null) {
|
||||
if (ACTION_SIGNIN.equals(this.action)) {
|
||||
this.mLoginTask = new ServerSigninTask(this, (ServerSigninTask) null);
|
||||
} else if (ACTION_SIGNUP.equals(this.action)) {
|
||||
if (!password.equals(this.mTextPasswordRepeat.getText().toString())) {
|
||||
alertDialog("repeat password mismatch");
|
||||
} else {
|
||||
this.mLoginTask = new ServerSignupTask(this, (ServerSignupTask) null);
|
||||
}
|
||||
}
|
||||
if (this.mLoginTask != null) {
|
||||
this.mLoginTask.execute(new String[]{login, password});
|
||||
this.mProgress.setVisibility(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onDestroy() {
|
||||
if (this.mLoginTask != null) {
|
||||
this.mLoginTask.cancel(true);
|
||||
}
|
||||
this.mProgress.setVisibility(8);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.LoginActivity$ServerLoginTask */
|
||||
private abstract class ServerLoginTask extends AsyncTask<String, Void, String> {
|
||||
Server mServer;
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public abstract String action(String str, String str2) throws IOException;
|
||||
|
||||
private ServerLoginTask() {
|
||||
}
|
||||
|
||||
/* synthetic */ ServerLoginTask(LoginActivity loginActivity, ServerLoginTask serverLoginTask) {
|
||||
this();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public String doInBackground(String... authinfo) {
|
||||
try {
|
||||
this.mServer = new Server(LoginActivity.this, 3);
|
||||
String result = action(authinfo[0], authinfo[1]);
|
||||
if (!isCancelled()) {
|
||||
return result;
|
||||
}
|
||||
this.mServer.reset();
|
||||
return result;
|
||||
} catch (IOException e) {
|
||||
return LoginActivity.this.getString(C0088R.string.error_network);
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onPostExecute(String result) {
|
||||
LoginActivity.this.mProgress.setVisibility(8);
|
||||
if (result != null) {
|
||||
LoginActivity.this.mLoginTask = null;
|
||||
LoginActivity.this.alertDialog(result);
|
||||
return;
|
||||
}
|
||||
new ResyncTask().setContext(LoginActivity.this).execute(new Void[0]);
|
||||
LoginActivity.this.startActivity(new Intent(LoginActivity.this, WishListActivity.class));
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onCancelled() {
|
||||
this.mServer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.LoginActivity$ServerSigninTask */
|
||||
private class ServerSigninTask extends ServerLoginTask {
|
||||
private ServerSigninTask() {
|
||||
super(LoginActivity.this, (ServerLoginTask) null);
|
||||
}
|
||||
|
||||
/* synthetic */ ServerSigninTask(LoginActivity loginActivity, ServerSigninTask serverSigninTask) {
|
||||
this();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public String action(String login, String password) throws IOException {
|
||||
return this.mServer.signin(login, password);
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.LoginActivity$ServerSignupTask */
|
||||
private class ServerSignupTask extends ServerLoginTask {
|
||||
private ServerSignupTask() {
|
||||
super(LoginActivity.this, (ServerLoginTask) null);
|
||||
}
|
||||
|
||||
/* synthetic */ ServerSignupTask(LoginActivity loginActivity, ServerSignupTask serverSignupTask) {
|
||||
this();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public String action(String login, String password) throws IOException {
|
||||
String res = this.mServer.signup(login, password);
|
||||
if (res == null) {
|
||||
new WishListDatabase(LoginActivity.this).desync();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void alertDialog(String message) {
|
||||
AlertDialog.Builder ab = new AlertDialog.Builder(this);
|
||||
ab.setMessage(message);
|
||||
ab.create().show();
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.p000v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.LoginFragment */
|
||||
public class LoginFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(C0088R.layout.login_fragment, container, false);
|
||||
view.findViewById(C0088R.C0090id.button_login_signin).setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
LoginFragment.this.startActivity(new Intent(LoginActivity.ACTION_SIGNIN));
|
||||
}
|
||||
});
|
||||
view.findViewById(C0088R.C0090id.button_login_signup).setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
LoginFragment.this.startActivity(new Intent(LoginActivity.ACTION_SIGNUP));
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.p000v4.app.Fragment;
|
||||
import android.support.p000v4.app.FragmentActivity;
|
||||
import android.support.p000v4.app.FragmentTransaction;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.ShortcutsActivity */
|
||||
public class ShortcutsActivity extends FragmentActivity {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
LinearLayout layout = new LinearLayout(this);
|
||||
layout.setId(C0088R.C0090id.layout1);
|
||||
layout.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
|
||||
layout.setOrientation(1);
|
||||
Fragment frag = new ShortcutsFragment();
|
||||
FragmentTransaction ftrans = getSupportFragmentManager().beginTransaction();
|
||||
ftrans.add(layout.getId(), frag);
|
||||
ftrans.addToBackStack((String) null);
|
||||
ftrans.commit();
|
||||
setContentView(layout);
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.p000v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.ShortcutsFragment */
|
||||
public class ShortcutsFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(C0088R.layout.shortcuts_fragment, container, false);
|
||||
view.findViewById(C0088R.C0090id.button_add_shortcut_photo_wish).setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
ShortcutsFragment.this.addShortcutPhotoWish(v);
|
||||
}
|
||||
});
|
||||
view.findViewById(C0088R.C0090id.button_add_shortcut_add_wish).setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
ShortcutsFragment.this.addShortcutAddWish(v);
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
|
||||
public void addShortcutPhotoWish(View view) {
|
||||
addShortcut(WishEditActivity.ACTION_PHOTO_WISH, C0088R.string.shortcut_photo_wish, C0088R.C0089drawable.ic_launcher);
|
||||
}
|
||||
|
||||
public void addShortcutAddWish(View view) {
|
||||
addShortcut(WishEditActivity.ACTION_ADD_WISH, C0088R.string.shortcut_add_wish, C0088R.C0089drawable.ic_launcher);
|
||||
}
|
||||
|
||||
public void addShortcut(String action, int nameID, int iconID) {
|
||||
Context context = getActivity().getApplicationContext();
|
||||
Intent shortcutIntent = new Intent(context, WishEditActivity.class);
|
||||
shortcutIntent.setAction(action);
|
||||
Intent addIntent = new Intent();
|
||||
addIntent.putExtra("android.intent.extra.shortcut.INTENT", shortcutIntent);
|
||||
addIntent.putExtra("android.intent.extra.shortcut.NAME", getString(nameID));
|
||||
addIntent.putExtra("android.intent.extra.shortcut.ICON_RESOURCE", Intent.ShortcutIconResource.fromContext(context, iconID));
|
||||
addIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
|
||||
context.sendBroadcast(addIntent);
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.p000v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import p003ru.wishlist.wishlist.WishList;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishAddFragment */
|
||||
public class WishAddFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(C0088R.layout.wish_add_fragment, container, false);
|
||||
view.findViewById(C0088R.C0090id.button_wish_add).setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
WishAddFragment.this.startActivity(new Intent("android.intent.action.INSERT", WishList.PlainWishes.CONTENT_URI));
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import p003ru.wishlist.server.Server;
|
||||
import p003ru.wishlist.wishlist.CommonActivity;
|
||||
import p003ru.wishlist.wishlist.model.Wish;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishDeleteActivity */
|
||||
public class WishDeleteActivity extends WishViewActivity {
|
||||
/* access modifiers changed from: protected */
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
AlertDialog dialog = new AlertDialog.Builder(this).create();
|
||||
dialog.setTitle(getString(C0088R.string.confirmation));
|
||||
dialog.setMessage(getString(C0088R.string.are_you_sure_to_delete));
|
||||
dialog.setButton(-1, getString(17039379), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
WishDeleteActivity.this.doDelete();
|
||||
}
|
||||
});
|
||||
dialog.setButton(-2, getString(17039369), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
WishDeleteActivity.this.finish();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void doDelete() {
|
||||
Wish wish = new Wish(this, this.mUri);
|
||||
if (Server.isRegistered(this)) {
|
||||
wish.trash();
|
||||
new CommonActivity.ServerUploadTask().setContext(this).execute(new Void[0]);
|
||||
} else {
|
||||
wish.destroy();
|
||||
}
|
||||
startActivity(new Intent(this, WishListActivity.class));
|
||||
}
|
||||
}
|
||||
+422
@@ -0,0 +1,422 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RatingBar;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.nostra13.universalimageloader.core.assist.DiscCacheUtil;
|
||||
import com.nostra13.universalimageloader.core.assist.MemoryCacheUtil;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import p003ru.wishlist.util.EditTextValidator;
|
||||
import p003ru.wishlist.util.NonNullValidator;
|
||||
import p003ru.wishlist.util.Validatable;
|
||||
import p003ru.wishlist.util.ValidatorWaiter;
|
||||
import p003ru.wishlist.wishlist.CommonActivity;
|
||||
import p003ru.wishlist.wishlist.model.Wish;
|
||||
import p003ru.wishlist.wishlist.model.WishImage;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishEditActivity */
|
||||
public class WishEditActivity extends Activity {
|
||||
public static final String ACTION_ADD_WISH = "ru.wishlist.wishlist.action.ADD_WISH";
|
||||
public static final String ACTION_PHOTO_WISH = "ru.wishlist.wishlist.action.PHOTO_WISH";
|
||||
static final int CHOOSE_PICTURE = 2;
|
||||
static final int PHOTO_PICTURE = 3;
|
||||
public static final String PREFS_EDIT = "edit";
|
||||
public static final String PREF_DETAILS_VISIBLE = "details_visible";
|
||||
public static final String PREF_MEM_EVENT = "mem_event";
|
||||
public static final String PREF_MEM_RATING = "mem_rating";
|
||||
public static final String PREF_MEM_TAGS = "mem_tags";
|
||||
public static final String PREF_MEM_VISIBLE = "mem_visible";
|
||||
private static final String TAG = "WishEditActivity";
|
||||
static final int TAKE_PICTURE = 1;
|
||||
private View mDetailsGroup;
|
||||
private ImageView mDetailsIcon;
|
||||
private ImageView mImage;
|
||||
private ViewGroup mImageAdd;
|
||||
private File mImageFile;
|
||||
private ViewGroup mImageGroup;
|
||||
private File mNewImageFile;
|
||||
private EditText mTextLink;
|
||||
private EditText mTextPost;
|
||||
private EditText mTextWish;
|
||||
private Uri mUri;
|
||||
ValidatorWaiterSaveButton mValidatorWaiterSaveButton = new ValidatorWaiterSaveButton(this, (ValidatorWaiterSaveButton) null);
|
||||
private Wish mWish;
|
||||
NonNullValidator validateImage;
|
||||
EditTextValidator validateLink;
|
||||
EditTextValidator validateWish;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishEditActivity$ValidatorWaiterSaveButton */
|
||||
private final class ValidatorWaiterSaveButton extends ValidatorWaiter {
|
||||
private ValidatorWaiterSaveButton() {
|
||||
}
|
||||
|
||||
/* synthetic */ ValidatorWaiterSaveButton(WishEditActivity wishEditActivity, ValidatorWaiterSaveButton validatorWaiterSaveButton) {
|
||||
this();
|
||||
}
|
||||
|
||||
public void onChangeValid() {
|
||||
((Button) WishEditActivity.this.findViewById(C0088R.C0090id.wish_form_save1)).setEnabled(true);
|
||||
((Button) WishEditActivity.this.findViewById(C0088R.C0090id.wish_form_save2)).setEnabled(true);
|
||||
}
|
||||
|
||||
public void onChangeInvalid() {
|
||||
((Button) WishEditActivity.this.findViewById(C0088R.C0090id.wish_form_save1)).setEnabled(false);
|
||||
((Button) WishEditActivity.this.findViewById(C0088R.C0090id.wish_form_save2)).setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
int titleID;
|
||||
EditText target;
|
||||
super.onCreate(savedInstanceState);
|
||||
Intent intent = getIntent();
|
||||
String action = intent.getAction();
|
||||
requestWindowFeature(1);
|
||||
setContentView(C0088R.layout.wish_form);
|
||||
this.mTextWish = (EditText) findViewById(C0088R.C0090id.wish_form_wish);
|
||||
this.mTextLink = (EditText) findViewById(C0088R.C0090id.wish_form_link);
|
||||
this.mTextPost = (EditText) findViewById(C0088R.C0090id.wish_form_post);
|
||||
this.mImage = (ImageView) findViewById(C0088R.C0090id.wish_form_image);
|
||||
this.mImageGroup = (ViewGroup) findViewById(C0088R.C0090id.wish_form_image_group);
|
||||
this.mImageAdd = (ViewGroup) findViewById(C0088R.C0090id.wish_form_image_add);
|
||||
this.mDetailsGroup = findViewById(C0088R.C0090id.wish_form_details_group);
|
||||
this.mDetailsIcon = (ImageView) findViewById(C0088R.C0090id.wish_form_details).findViewById(C0088R.C0090id.icon1);
|
||||
this.validateWish = new EditTextValidator(this.mValidatorWaiterSaveButton, this.mTextWish);
|
||||
this.validateLink = new EditTextValidator(this.mValidatorWaiterSaveButton, this.mTextLink);
|
||||
this.validateImage = new NonNullValidator(this.mValidatorWaiterSaveButton);
|
||||
ValidatorWaiterSaveButton validatorWaiterSaveButton = this.mValidatorWaiterSaveButton;
|
||||
validatorWaiterSaveButton.validators = new Validatable[]{this.validateWish};
|
||||
ValidatorWaiterSaveButton validatorWaiterSaveButton2 = this.mValidatorWaiterSaveButton;
|
||||
validatorWaiterSaveButton2.validators_any_nonempty = new Validatable[]{this.validateWish, this.validateImage, this.validateLink};
|
||||
if ("android.intent.action.EDIT".equals(action)) {
|
||||
getWindow().setSoftInputMode(2);
|
||||
this.mUri = intent.getData();
|
||||
this.mWish = new Wish(this, this.mUri);
|
||||
this.mWish.load();
|
||||
if (this.mWish.wish != null) {
|
||||
this.mTextWish.setText(this.mWish.wish);
|
||||
}
|
||||
if (this.mWish.tags != null) {
|
||||
((EditText) findViewById(C0088R.C0090id.wish_form_tags)).setText(this.mWish.tags);
|
||||
}
|
||||
if (this.mWish.link != null) {
|
||||
this.mTextLink.setText(this.mWish.link);
|
||||
}
|
||||
if (this.mWish.price != null) {
|
||||
((EditText) findViewById(C0088R.C0090id.wish_form_price)).setText(this.mWish.price);
|
||||
}
|
||||
if (this.mWish.event != null) {
|
||||
((EditText) findViewById(C0088R.C0090id.wish_form_event)).setText(this.mWish.event);
|
||||
}
|
||||
if (this.mWish.post != null) {
|
||||
this.mTextPost.setText(this.mWish.post);
|
||||
}
|
||||
((RatingBar) findViewById(C0088R.C0090id.wish_form_rating)).setRating((float) this.mWish.rating);
|
||||
((Spinner) findViewById(C0088R.C0090id.wish_form_visible)).setSelection(this.mWish.getVisibleID());
|
||||
((CheckBox) findViewById(C0088R.C0090id.wish_form_realized)).setChecked(this.mWish.realized);
|
||||
if (this.mWish.issetImageFile()) {
|
||||
updateImage(new File(this.mWish.getImageFile()));
|
||||
} else {
|
||||
updateImage((File) null);
|
||||
}
|
||||
setTitle(String.format(getString(C0088R.string.title_edit), new Object[]{this.mWish.wish}));
|
||||
this.mNewImageFile = this.mWish.getTempImageFile(WishImage.TEMP_IMAGE_NAME);
|
||||
} else if ("android.intent.action.INSERT".equals(action) || "android.intent.action.SEND".equals(action) || ACTION_PHOTO_WISH.equals(action) || ACTION_ADD_WISH.equals(action)) {
|
||||
this.mUri = null;
|
||||
this.mWish = new Wish(this, (Uri) null);
|
||||
this.mNewImageFile = this.mWish.getTempImageFile(WishImage.TEMP_IMAGE_NAME);
|
||||
SharedPreferences pref = getSharedPreferences(PREFS_EDIT, 0);
|
||||
((EditText) findViewById(C0088R.C0090id.wish_form_tags)).setText(pref.getString(PREF_MEM_TAGS, ""));
|
||||
((RatingBar) findViewById(C0088R.C0090id.wish_form_rating)).setRating((float) pref.getInt(PREF_MEM_RATING, 2));
|
||||
((Spinner) findViewById(C0088R.C0090id.wish_form_visible)).setSelection(pref.getInt(PREF_MEM_VISIBLE, 2));
|
||||
updateImage((File) null);
|
||||
if ("android.intent.action.SEND".equals(action)) {
|
||||
String type = intent.getType();
|
||||
if ("text/plain".equals(type)) {
|
||||
Bundle b = intent.getExtras();
|
||||
String subject = null;
|
||||
if (b.containsKey("android.intent.extra.SUBJECT")) {
|
||||
subject = b.getString("android.intent.extra.SUBJECT");
|
||||
}
|
||||
if (subject == null) {
|
||||
target = this.mTextWish;
|
||||
} else {
|
||||
this.mTextWish.setText(subject);
|
||||
target = this.mTextPost;
|
||||
}
|
||||
if (b.containsKey("share_screenshot")) {
|
||||
try {
|
||||
updateImage(copyBitmapToFile((Bitmap) b.getParcelable("share_screenshot"), this.mNewImageFile));
|
||||
} catch (IOException e) {
|
||||
Log.d(TAG, "can't copy bitmap to file", e);
|
||||
}
|
||||
}
|
||||
String content = intent.getStringExtra("android.intent.extra.TEXT");
|
||||
if (content != null) {
|
||||
if (content.contains("://")) {
|
||||
target = this.mTextLink;
|
||||
}
|
||||
target.setText(content);
|
||||
}
|
||||
} else if (type.startsWith("image/")) {
|
||||
Uri imageUri = (Uri) intent.getParcelableExtra("android.intent.extra.STREAM");
|
||||
try {
|
||||
updateImage(copyUriToFile(imageUri, this.mNewImageFile));
|
||||
} catch (IOException e2) {
|
||||
Log.e(TAG, "can't copy received image to own storage", e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ACTION_PHOTO_WISH.equals(action)) {
|
||||
titleID = C0088R.string.photo_wish;
|
||||
} else if (ACTION_ADD_WISH.equals(action)) {
|
||||
titleID = C0088R.string.add_wish;
|
||||
} else {
|
||||
titleID = C0088R.string.title_create;
|
||||
}
|
||||
setTitle(getText(titleID));
|
||||
} else {
|
||||
Log.e(TAG, "Unknown action, exiting");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
this.mTextWish.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
|
||||
if (actionId != 0 || event.getAction() != 0) {
|
||||
return true;
|
||||
}
|
||||
WishEditActivity.this.saveWishForm((View) null);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
this.validateWish.afterTextChanged(this.mTextWish.getText());
|
||||
this.validateLink.afterTextChanged(this.mTextLink.getText());
|
||||
boolean visible = false;
|
||||
int i = 0;
|
||||
int count = ((ViewGroup) this.mDetailsGroup).getChildCount();
|
||||
while (true) {
|
||||
if (i < count) {
|
||||
View view = ((ViewGroup) this.mDetailsGroup).getChildAt(i);
|
||||
if ((view instanceof EditText) && ((EditText) view).getText().length() > 0) {
|
||||
visible = true;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!visible) {
|
||||
visible = getSharedPreferences(PREFS_EDIT, 0).getBoolean(PREF_DETAILS_VISIBLE, false);
|
||||
}
|
||||
setDetailsVisibility(visible);
|
||||
if (ACTION_PHOTO_WISH.equals(action)) {
|
||||
photoPicture((View) null);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(C0088R.menu.wish_edit_options_menu, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case C0088R.C0090id.menu_save:
|
||||
saveWishForm((View) null);
|
||||
break;
|
||||
case C0088R.C0090id.menu_cancel:
|
||||
break;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
public void detailsOnClick(View v) {
|
||||
setDetailsVisibility(this.mDetailsGroup.getVisibility() != 0);
|
||||
}
|
||||
|
||||
public void saveWishForm(View view) {
|
||||
this.mWish.wish = this.mTextWish.getText().toString();
|
||||
this.mWish.post = this.mTextPost.getText().toString();
|
||||
this.mWish.link = this.mTextLink.getText().toString();
|
||||
this.mWish.tags = ((EditText) findViewById(C0088R.C0090id.wish_form_tags)).getText().toString();
|
||||
this.mWish.price = ((EditText) findViewById(C0088R.C0090id.wish_form_price)).getText().toString();
|
||||
this.mWish.event = ((EditText) findViewById(C0088R.C0090id.wish_form_event)).getText().toString();
|
||||
this.mWish.rating = Math.round(((RatingBar) findViewById(C0088R.C0090id.wish_form_rating)).getRating());
|
||||
this.mWish.setVisibleID(((Spinner) findViewById(C0088R.C0090id.wish_form_visible)).getSelectedItemPosition());
|
||||
this.mWish.realized = ((CheckBox) findViewById(C0088R.C0090id.wish_form_realized)).isChecked();
|
||||
this.mWish.setTempImageFile(this.mImageFile == null ? null : this.mImageFile.toString());
|
||||
this.mWish.setFlagLocalEdit(true);
|
||||
this.mWish.save();
|
||||
SharedPreferences.Editor editor = getSharedPreferences(PREFS_EDIT, 0).edit();
|
||||
editor.putString(PREF_MEM_TAGS, this.mWish.tags);
|
||||
editor.putInt(PREF_MEM_RATING, this.mWish.rating);
|
||||
editor.putInt(PREF_MEM_VISIBLE, this.mWish.getVisibleID());
|
||||
editor.commit();
|
||||
new CommonActivity.ServerUploadTask().setContext(this).execute(new Void[0]);
|
||||
finish();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void updateImage(File imageFile) {
|
||||
if (this.mImageFile != null) {
|
||||
this.mImage.setImageBitmap((Bitmap) null);
|
||||
}
|
||||
if (imageFile == null) {
|
||||
this.mImageGroup.setVisibility(8);
|
||||
this.mImageAdd.setVisibility(0);
|
||||
} else {
|
||||
String path = "file://" + imageFile;
|
||||
ImageLoader imageLoader = ImageLoader.getInstance();
|
||||
MemoryCacheUtil.removeFromCache(path, imageLoader.getMemoryCache());
|
||||
DiscCacheUtil.removeFromCache(path, imageLoader.getDiscCache());
|
||||
imageLoader.displayImage(path, this.mImage);
|
||||
this.mImageGroup.setVisibility(0);
|
||||
this.mImageAdd.setVisibility(8);
|
||||
}
|
||||
this.mImageFile = imageFile;
|
||||
this.validateImage.afterObjectChanged(imageFile);
|
||||
}
|
||||
|
||||
public void takePictureWishForm(View view) {
|
||||
Intent pickIntent = new Intent();
|
||||
pickIntent.setType("image/*");
|
||||
pickIntent.setAction("android.intent.action.GET_CONTENT");
|
||||
Intent chooserIntent = Intent.createChooser(pickIntent, "Select or take a new Picture");
|
||||
Intent takePhotoIntent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
if (!(takePhotoIntent.resolveActivity(getPackageManager()) == null || this.mNewImageFile == null)) {
|
||||
if (this.mNewImageFile.exists()) {
|
||||
this.mNewImageFile.delete();
|
||||
}
|
||||
takePhotoIntent.putExtra("output", Uri.fromFile(this.mNewImageFile));
|
||||
chooserIntent.putExtra("android.intent.extra.INITIAL_INTENTS", new Intent[]{takePhotoIntent});
|
||||
}
|
||||
startActivityForResult(chooserIntent, 1);
|
||||
}
|
||||
|
||||
public void choosePicture(View view) {
|
||||
Intent pickIntent = new Intent();
|
||||
pickIntent.setType("image/*");
|
||||
pickIntent.setAction("android.intent.action.GET_CONTENT");
|
||||
startActivityForResult(Intent.createChooser(pickIntent, getString(C0088R.string.choose_picture)), 2);
|
||||
}
|
||||
|
||||
public void photoPicture(View view) {
|
||||
Intent takePhotoIntent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
if (takePhotoIntent.resolveActivity(getPackageManager()) == null) {
|
||||
Log.d(TAG, "can't resolveActivity for ACTION_IMAGE_CAPTURE");
|
||||
} else if (this.mNewImageFile == null) {
|
||||
Log.d(TAG, "no new image file");
|
||||
} else {
|
||||
if (this.mNewImageFile.exists()) {
|
||||
this.mNewImageFile.delete();
|
||||
}
|
||||
takePhotoIntent.putExtra("output", Uri.fromFile(this.mNewImageFile));
|
||||
startActivityForResult(takePhotoIntent, 3);
|
||||
}
|
||||
}
|
||||
|
||||
public void deletePictureWishForm(View view) {
|
||||
updateImage((File) null);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
||||
if (resultCode != -1) {
|
||||
return;
|
||||
}
|
||||
if (requestCode != 1 && requestCode != 2 && requestCode != 3) {
|
||||
return;
|
||||
}
|
||||
if (intent == null) {
|
||||
Log.d("onActivityResult", "intent null, use file");
|
||||
updateImage(this.mNewImageFile);
|
||||
return;
|
||||
}
|
||||
Uri uri = intent.getData();
|
||||
if (uri != null) {
|
||||
Log.d("onActivityResult", "use data.getData");
|
||||
try {
|
||||
updateImage(copyUriToFile(uri, this.mNewImageFile));
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "can't copy received image to own storage", e);
|
||||
}
|
||||
} else {
|
||||
Log.d("onActivityResult", "git bitmap. try to use file");
|
||||
updateImage(this.mNewImageFile);
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public File copyUriToFile(Uri srcUri, File dstFile) throws IOException {
|
||||
InputStream input = getContentResolver().openInputStream(srcUri);
|
||||
OutputStream output = new FileOutputStream(dstFile);
|
||||
byte[] buf = new byte[131072];
|
||||
while (true) {
|
||||
int len = input.read(buf);
|
||||
if (len <= 0) {
|
||||
input.close();
|
||||
output.close();
|
||||
return dstFile;
|
||||
}
|
||||
output.write(buf, 0, len);
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public File copyBitmapToFile(Bitmap bitmap, File dstFile) throws IOException {
|
||||
OutputStream output = new FileOutputStream(dstFile);
|
||||
bitmap.compress(Bitmap.CompressFormat.PNG, 90, output);
|
||||
output.close();
|
||||
return dstFile;
|
||||
}
|
||||
|
||||
private void setDetailsVisibility(boolean visible) {
|
||||
int group_visibility;
|
||||
int icon_resid;
|
||||
if (visible) {
|
||||
group_visibility = 0;
|
||||
icon_resid = 17301507;
|
||||
} else {
|
||||
group_visibility = 8;
|
||||
icon_resid = 17301506;
|
||||
}
|
||||
SharedPreferences.Editor editor = getSharedPreferences(PREFS_EDIT, 0).edit();
|
||||
editor.putBoolean(PREF_DETAILS_VISIBLE, visible);
|
||||
editor.commit();
|
||||
this.mDetailsIcon.setImageResource(icon_resid);
|
||||
this.mDetailsGroup.setVisibility(group_visibility);
|
||||
}
|
||||
|
||||
public static void reset(Context context) {
|
||||
SharedPreferences.Editor editor = context.getSharedPreferences(PREFS_EDIT, 0).edit();
|
||||
editor.clear();
|
||||
editor.commit();
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.provider.BaseColumns;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishList */
|
||||
public final class WishList {
|
||||
public static final String AUTHORITY = "ru.wishlist.provider.WishList";
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishList$PlainWishes */
|
||||
public static abstract class PlainWishes implements BaseColumns {
|
||||
public static final String CHANGED = "changed";
|
||||
public static Uri CONTENT_ID_URI_BASE = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ID);
|
||||
public static Uri CONTENT_ID_URI_PATTERN = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ID + "#");
|
||||
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ru.wishlist.provider.plain_wish";
|
||||
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ru.wishlist.provider.plain_wish";
|
||||
public static Uri CONTENT_URI = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ALL);
|
||||
public static final String CREATED = "created";
|
||||
public static final String DEFAULT_GROUP_BY = "_id";
|
||||
public static final String DEFAULT_SORT_ORDER = (String.valueOf(Wishes.TABLE_NAME) + "." + "changed" + " DESC");
|
||||
public static final String EVENT = "event";
|
||||
public static int ID_PATH_POSITION = 1;
|
||||
public static final String IMAGE_CHANGED = "image_changed";
|
||||
public static final String IMAGE_FILE = "image_file";
|
||||
public static final String IMAGE_LINK = "image_link";
|
||||
public static final String IMAGE_SERVER_SYNC = "image_server_sync";
|
||||
public static final String LINK = "link";
|
||||
public static final String NAME = "plain_wishes";
|
||||
static String PATH_ALL = NAME;
|
||||
static String PATH_ID = "plain_wishes/";
|
||||
public static final String POST = "post";
|
||||
public static final String PRICE = "price";
|
||||
public static final String[] PROJECTION = {DEFAULT_GROUP_BY, "wish", "post", "link", "tags", "price", "event", "rating", "visible", "realized", "server_id", "server_sync", "created", "changed", IMAGE_FILE, IMAGE_LINK, IMAGE_CHANGED, IMAGE_SERVER_SYNC};
|
||||
public static final String[][] PROJECTION_MAP = {new String[]{DEFAULT_GROUP_BY, String.valueOf(Wishes.TABLE_NAME) + "." + DEFAULT_GROUP_BY}, new String[]{"wish", String.valueOf(Wishes.TABLE_NAME) + "." + "wish"}, new String[]{"tags", String.valueOf(Wishes.TABLE_NAME) + "." + "tags"}, new String[]{"link", String.valueOf(Wishes.TABLE_NAME) + "." + "link"}, new String[]{"price", String.valueOf(Wishes.TABLE_NAME) + "." + "price"}, new String[]{"event", String.valueOf(Wishes.TABLE_NAME) + "." + "event"}, new String[]{"post", String.valueOf(Wishes.TABLE_NAME) + "." + "post"}, new String[]{"rating", String.valueOf(Wishes.TABLE_NAME) + "." + "rating"}, new String[]{"visible", String.valueOf(Wishes.TABLE_NAME) + "." + "visible"}, new String[]{"realized", String.valueOf(Wishes.TABLE_NAME) + "." + "realized"}, new String[]{"server_id", String.valueOf(Wishes.TABLE_NAME) + "." + "server_id"}, new String[]{"server_sync", String.valueOf(Wishes.TABLE_NAME) + "." + "server_sync"}, new String[]{"created", String.valueOf(Wishes.TABLE_NAME) + "." + "created"}, new String[]{"changed", String.valueOf(Wishes.TABLE_NAME) + "." + "changed"}, new String[]{IMAGE_FILE, String.valueOf(WishImages.TABLE_NAME) + "." + WishImages.FILE}, new String[]{IMAGE_LINK, String.valueOf(WishImages.TABLE_NAME) + "." + "link"}, new String[]{IMAGE_CHANGED, String.valueOf(WishImages.TABLE_NAME) + "." + "changed"}, new String[]{IMAGE_SERVER_SYNC, String.valueOf(WishImages.TABLE_NAME) + "." + "server_sync"}};
|
||||
public static final String RATING = "rating";
|
||||
public static final String REALIZED = "realized";
|
||||
static String SCHEME = "content://";
|
||||
public static final String SERVER_ID = "server_id";
|
||||
public static final String SERVER_SYNC = "server_sync";
|
||||
public static final String TABLE_NAME = (String.valueOf(Wishes.TABLE_NAME) + " LEFT JOIN " + WishImages.TABLE_NAME + " ON ( " + Wishes.TABLE_NAME + "." + DEFAULT_GROUP_BY + " = " + WishImages.TABLE_NAME + "." + WishImages.WISH_ID + " )");
|
||||
public static final String TAGS = "tags";
|
||||
public static final String VISIBLE = "visible";
|
||||
public static final String WISH = "wish";
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishList$WishImages */
|
||||
public static abstract class WishImages implements BaseColumns {
|
||||
public static final String CHANGED = "changed";
|
||||
public static Uri CONTENT_ID_URI_BASE = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ID);
|
||||
public static Uri CONTENT_ID_URI_PATTERN = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ID + "#");
|
||||
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ru.wishlist.provider.wish_image";
|
||||
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ru.wishlist.provider.wish_image";
|
||||
public static Uri CONTENT_URI = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ALL);
|
||||
public static final String CREATED = "created";
|
||||
public static final String FILE = "file";
|
||||
public static int ID_PATH_POSITION = 1;
|
||||
public static final String LINK = "link";
|
||||
public static final String NAME = "wish_images";
|
||||
static String PATH_ALL = NAME;
|
||||
static String PATH_ID = "wish_images/";
|
||||
public static final String[] PROJECTION = {PlainWishes.DEFAULT_GROUP_BY, WISH_ID, FILE, "link", "server_sync", "created", "changed"};
|
||||
static String SCHEME = "content://";
|
||||
public static final String SERVER_SYNC = "server_sync";
|
||||
public static String TABLE_NAME = NAME;
|
||||
public static final String WISH_ID = "wish_id";
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishList$Wishes */
|
||||
public static abstract class Wishes implements BaseColumns {
|
||||
public static final String CHANGED = "changed";
|
||||
public static Uri CONTENT_ID_URI_BASE = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ID);
|
||||
public static Uri CONTENT_ID_URI_PATTERN = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ID + "#");
|
||||
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ru.wishlist.provider.wish";
|
||||
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ru.wishlist.provider.wish";
|
||||
public static Uri CONTENT_URI = Uri.parse(String.valueOf(SCHEME) + WishList.AUTHORITY + "/" + PATH_ALL);
|
||||
public static final String CREATED = "created";
|
||||
public static final String DEFAULT_SORT_ORDER = "changed DESC";
|
||||
public static final String EVENT = "event";
|
||||
public static int ID_PATH_POSITION = 1;
|
||||
public static final String LINK = "link";
|
||||
public static final String NAME = "wishes";
|
||||
static String PATH_ALL = NAME;
|
||||
static String PATH_ID = "wishes/";
|
||||
public static final String POST = "post";
|
||||
public static final String PRICE = "price";
|
||||
public static final String[] PROJECTION = {PlainWishes.DEFAULT_GROUP_BY, "wish", "post", "link", "server_id", "server_sync", "created", "changed"};
|
||||
public static final String RATING = "rating";
|
||||
public static final String REALIZED = "realized";
|
||||
static String SCHEME = "content://";
|
||||
public static final String SERVER_ID = "server_id";
|
||||
public static final String SERVER_SYNC = "server_sync";
|
||||
public static String TABLE_NAME = NAME;
|
||||
public static final String TAGS = "tags";
|
||||
public static final String VISIBLE = "visible";
|
||||
public static final String WISH = "wish";
|
||||
}
|
||||
|
||||
private WishList() {
|
||||
}
|
||||
}
|
||||
+379
@@ -0,0 +1,379 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ListActivity;
|
||||
import android.content.ContentUris;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RatingBar;
|
||||
import android.widget.SimpleCursorAdapter;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import p003ru.wishlist.server.ResyncTask;
|
||||
import p003ru.wishlist.server.Server;
|
||||
import p003ru.wishlist.wishlist.WishList;
|
||||
import p003ru.wishlist.wishlist.model.Wish;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListActivity */
|
||||
public class WishListActivity extends ListActivity {
|
||||
static final String[] PROJECTION = {WishList.PlainWishes.DEFAULT_GROUP_BY, WishList.PlainWishes.IMAGE_FILE, "wish", "tags", "link", "price", "event", "post", "rating", "visible"};
|
||||
static final String[] dataColumns = {WishList.PlainWishes.IMAGE_FILE, "wish", "tags", "link", "price", "event", "post", "rating", "visible"};
|
||||
static final int[] viewIDs = {C0088R.C0090id.view_image, C0088R.C0090id.view_wish, C0088R.C0090id.view_tags, C0088R.C0090id.view_link, C0088R.C0090id.view_price, C0088R.C0090id.view_event, C0088R.C0090id.view_post, C0088R.C0090id.view_rating, C0088R.C0090id.view_visible};
|
||||
SimpleCursorAdapter adapter;
|
||||
Cursor cursor;
|
||||
Wish.CursorBuilder cursorBuilder;
|
||||
ImageLoader imageLoader = ImageLoader.getInstance();
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListActivity$LinkClick */
|
||||
static class LinkClick implements View.OnClickListener {
|
||||
String link;
|
||||
|
||||
public LinkClick(String link2) {
|
||||
this.link = link2;
|
||||
}
|
||||
|
||||
public void onClick(View v) {
|
||||
Intent i = new Intent("android.intent.action.VIEW");
|
||||
i.setData(Uri.parse(this.link.contains("://") ? this.link : "http://" + this.link));
|
||||
try {
|
||||
v.getContext().startActivity(i);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListActivity$WishlistCursorAdapter */
|
||||
class WishlistCursorAdapter extends SimpleCursorAdapter {
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListActivity$WishlistCursorAdapter$ViewBinder */
|
||||
private class ViewBinder implements SimpleCursorAdapter.ViewBinder {
|
||||
private ViewBinder() {
|
||||
}
|
||||
|
||||
/* synthetic */ ViewBinder(WishlistCursorAdapter wishlistCursorAdapter, ViewBinder viewBinder) {
|
||||
this();
|
||||
}
|
||||
|
||||
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
ImageView icon = (ImageView) view;
|
||||
String image_file = cursor.getString(columnIndex);
|
||||
icon.setImageBitmap((Bitmap) null);
|
||||
if (image_file == null || image_file.length() <= 0) {
|
||||
icon.setVisibility(4);
|
||||
WishListActivity.this.imageLoader.cancelDisplayTask(icon);
|
||||
return true;
|
||||
}
|
||||
icon.setVisibility(0);
|
||||
WishListActivity.this.imageLoader.displayImage("file://" + image_file, icon);
|
||||
return true;
|
||||
case 4:
|
||||
String link = cursor.getString(columnIndex);
|
||||
WishlistCursorAdapter.this.setText(view, Wish.printLink(WishListActivity.this, link));
|
||||
view.setOnClickListener(new LinkClick(link));
|
||||
return true;
|
||||
case 8:
|
||||
int rating = cursor.getInt(columnIndex);
|
||||
if (rating <= 0) {
|
||||
return true;
|
||||
}
|
||||
((RatingBar) view).setRating((float) rating);
|
||||
return true;
|
||||
case 9:
|
||||
WishlistCursorAdapter.this.setText(view, Wish.printVisible(WishListActivity.this, Wish.getVisibleID(WishListActivity.this, cursor.getInt(columnIndex))));
|
||||
return true;
|
||||
default:
|
||||
WishlistCursorAdapter.this.setText(view, cursor.getString(columnIndex));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public WishlistCursorAdapter(Cursor cursor) {
|
||||
super(WishListActivity.this, C0088R.layout.wishlist_item, cursor, WishListActivity.dataColumns, WishListActivity.viewIDs);
|
||||
setViewBinder(new ViewBinder(this, (ViewBinder) null));
|
||||
}
|
||||
|
||||
/* access modifiers changed from: private */
|
||||
public void setText(View v, CharSequence text) {
|
||||
v.setVisibility(TextUtils.isEmpty(text) ? 8 : 0);
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
((TextView) v).setText(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Intent intent = getIntent();
|
||||
if (intent.getData() == null) {
|
||||
intent.setData(WishList.PlainWishes.CONTENT_URI);
|
||||
}
|
||||
this.cursorBuilder = (Wish.CursorBuilder) new Wish.CursorBuilder().setProjection(PROJECTION).setUri(getIntent().getData());
|
||||
this.cursor = this.cursorBuilder.getCursor(this);
|
||||
this.adapter = new WishlistCursorAdapter(this.cursor);
|
||||
setListAdapter(this.adapter);
|
||||
registerForContextMenu(getListView());
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (this.cursor.getCount() != 0 || Server.isConnected(this)) {
|
||||
new ServerDownloadTask(this, (ServerDownloadTask) null).execute(new Void[0]);
|
||||
fixTitle();
|
||||
return;
|
||||
}
|
||||
goWelcome();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void goWelcome() {
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, WelcomeActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void fixActivity() {
|
||||
if (this.cursor.getCount() == 0 && !Server.isConnected(this)) {
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, WelcomeActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
public void fixTitle() {
|
||||
fixedInvalidateOptionsMenu();
|
||||
int title_resid = (!this.cursorBuilder.issetRealized() || !this.cursorBuilder.checkRealized()) ? C0088R.string.wishlist : C0088R.string.realized;
|
||||
StringBuffer title = new StringBuffer();
|
||||
title.append(getString(C0088R.string.app_name));
|
||||
title.append(" " + getString(title_resid));
|
||||
if (Server.isConnected(this)) {
|
||||
title.append(" " + Server.currentLogname(this));
|
||||
}
|
||||
setTitle(title.toString());
|
||||
}
|
||||
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
boolean z;
|
||||
boolean z2 = false;
|
||||
Menu submenu = menu.findItem(C0088R.C0090id.menu_wishlistru).getSubMenu();
|
||||
if (submenu != null) {
|
||||
boolean connected = Server.isConnected(this);
|
||||
submenu.setGroupVisible(C0088R.C0090id.group_connected, connected);
|
||||
if (connected) {
|
||||
z = false;
|
||||
} else {
|
||||
z = true;
|
||||
}
|
||||
submenu.setGroupVisible(C0088R.C0090id.group_disconnected, z);
|
||||
}
|
||||
if (this.cursorBuilder.issetRealized()) {
|
||||
boolean show_wishlist = this.cursorBuilder.checkRealized();
|
||||
MenuItem wishlist = menu.findItem(C0088R.C0090id.menu_wishlist);
|
||||
MenuItem realized = menu.findItem(C0088R.C0090id.menu_realized);
|
||||
wishlist.setVisible(show_wishlist);
|
||||
if (!show_wishlist) {
|
||||
z2 = true;
|
||||
}
|
||||
realized.setVisible(z2);
|
||||
}
|
||||
return super.onPrepareOptionsMenu(menu);
|
||||
}
|
||||
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(C0088R.menu.wishlist_options_menu, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case C0088R.C0090id.menu_add:
|
||||
startActivity(new Intent("android.intent.action.INSERT", getIntent().getData()));
|
||||
return true;
|
||||
case C0088R.C0090id.menu_realized:
|
||||
filterRealized(true);
|
||||
return true;
|
||||
case C0088R.C0090id.menu_share:
|
||||
if (!Server.isRegistered(this)) {
|
||||
Toast.makeText(this, getText(C0088R.string.share_wishlist_login_required), 1).show();
|
||||
return true;
|
||||
}
|
||||
Intent sendIntent = new Intent();
|
||||
sendIntent.putExtra("android.intent.extra.TEXT", String.valueOf(getString(C0088R.string.my_wishlist)) + "\n" + Server.wishlistURLPublic(this));
|
||||
sendIntent.putExtra("android.intent.extra.SUBJECT", getString(C0088R.string.my_wishlist));
|
||||
sendIntent.setAction("android.intent.action.SEND");
|
||||
sendIntent.setType("text/plain");
|
||||
startActivity(Intent.createChooser(sendIntent, getString(C0088R.string.menu_share)));
|
||||
return true;
|
||||
case C0088R.C0090id.menu_wishlist:
|
||||
filterRealized(false);
|
||||
return true;
|
||||
case C0088R.C0090id.menu_signin:
|
||||
startActivity(new Intent(LoginActivity.ACTION_SIGNIN));
|
||||
return true;
|
||||
case C0088R.C0090id.menu_signup:
|
||||
startActivity(new Intent(LoginActivity.ACTION_SIGNUP));
|
||||
return true;
|
||||
case C0088R.C0090id.menu_my_wishlist:
|
||||
String wishlist_url = Server.wishlistURLPrivate(this);
|
||||
if (wishlist_url == null) {
|
||||
return true;
|
||||
}
|
||||
startActivity(new Intent("android.intent.action.VIEW", Uri.parse(wishlist_url)));
|
||||
return true;
|
||||
case C0088R.C0090id.menu_resync:
|
||||
new ResyncTask().setContext(this).execute(new Void[0]);
|
||||
return true;
|
||||
case C0088R.C0090id.menu_signout:
|
||||
new Server(this).loginSignout();
|
||||
fixTitle();
|
||||
return true;
|
||||
case C0088R.C0090id.menu_website:
|
||||
startActivity(new Intent("android.intent.action.VIEW", Uri.parse(getString(C0088R.string.wishlist_url))));
|
||||
return true;
|
||||
case C0088R.C0090id.menu_reset:
|
||||
doReset();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onListItemClick(ListView l, View v, int position, long id) {
|
||||
String action = getIntent().getAction();
|
||||
if ("android.intent.action.PICK".equals(action) || "android.intent.action.GET_CONTENT".equals(action)) {
|
||||
setResult(-1, new Intent().setData(ContentUris.withAppendedId(getIntent().getData(), id)));
|
||||
return;
|
||||
}
|
||||
Intent intent = new Intent("android.intent.action.VIEW", getIntent().getData());
|
||||
intent.putExtra("position", position);
|
||||
intent.putExtra(Wish.PARCEL_CURSOR_BUILDER, this.cursorBuilder);
|
||||
intent.setClass(this, WishSlidePagerActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) {
|
||||
super.onCreateContextMenu(menu, view, menuInfo);
|
||||
CommonActivity.inflateMenuWish(this, menu, ContentUris.withAppendedId(getIntent().getData(), ((AdapterView.AdapterContextMenuInfo) menuInfo).id));
|
||||
}
|
||||
|
||||
public boolean onContextItemSelected(MenuItem item) {
|
||||
if (CommonActivity.handleMenuWish(this, item, ContentUris.withAppendedId(getIntent().getData(), ((AdapterView.AdapterContextMenuInfo) item.getMenuInfo()).id))) {
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void doReset() {
|
||||
AlertDialog dialog = new AlertDialog.Builder(this).create();
|
||||
dialog.setTitle(getString(C0088R.string.confirmation));
|
||||
dialog.setMessage(getString(C0088R.string.are_you_sure_to_delete));
|
||||
dialog.setButton(-1, getString(17039379), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
new DoResetTask(WishListActivity.this, (DoResetTask) null).execute(new Void[0]);
|
||||
WishListActivity.this.goWelcome();
|
||||
}
|
||||
});
|
||||
dialog.setButton(-2, getString(17039369), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
WishListActivity.this.finish();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListActivity$DoResetTask */
|
||||
private class DoResetTask extends AsyncTask<Void, Void, Void> {
|
||||
private DoResetTask() {
|
||||
}
|
||||
|
||||
/* synthetic */ DoResetTask(WishListActivity wishListActivity, DoResetTask doResetTask) {
|
||||
this();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public Void doInBackground(Void... voids) {
|
||||
new Server(WishListActivity.this).reset();
|
||||
new WishListDatabase(WishListActivity.this).reset();
|
||||
WishEditActivity.reset(WishListActivity.this);
|
||||
Wish.reset(WishListActivity.this);
|
||||
WishListActivity.this.imageLoader.clearDiscCache();
|
||||
WishListActivity.this.imageLoader.clearMemoryCache();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListActivity$ServerDownloadTask */
|
||||
private class ServerDownloadTask extends AsyncTask<Void, Void, Void> {
|
||||
private ServerDownloadTask() {
|
||||
}
|
||||
|
||||
/* synthetic */ ServerDownloadTask(WishListActivity wishListActivity, ServerDownloadTask serverDownloadTask) {
|
||||
this();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public Void doInBackground(Void... voids) {
|
||||
try {
|
||||
new Server(WishListActivity.this, 1).download_refresh();
|
||||
return null;
|
||||
} catch (Server.ServerException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: protected */
|
||||
public void onPostExecute(Void v) {
|
||||
WishListActivity.this.fixTitle();
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void fixedInvalidateOptionsMenu() {
|
||||
if (Build.VERSION.SDK_INT >= 11) {
|
||||
VersionHelper.refreshActionBarMenu(this);
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListActivity$VersionHelper */
|
||||
static class VersionHelper {
|
||||
VersionHelper() {
|
||||
}
|
||||
|
||||
@SuppressLint({"NewApi"})
|
||||
static void refreshActionBarMenu(Activity activity) {
|
||||
activity.invalidateOptionsMenu();
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public void filterRealized(boolean realized) {
|
||||
this.cursorBuilder.filterRealized(Boolean.valueOf(realized));
|
||||
fixedInvalidateOptionsMenu();
|
||||
this.adapter.changeCursor(this.cursorBuilder.getCursor(this));
|
||||
this.adapter.notifyDataSetChanged();
|
||||
fixTitle();
|
||||
}
|
||||
}
|
||||
+351
@@ -0,0 +1,351 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.ContentObserver;
|
||||
import android.database.Cursor;
|
||||
import android.database.SQLException;
|
||||
import android.database.sqlite.SQLiteCursor;
|
||||
import android.database.sqlite.SQLiteCursorDriver;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.database.sqlite.SQLiteQuery;
|
||||
import android.database.sqlite.SQLiteQueryBuilder;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import p003ru.wishlist.wishlist.WishList;
|
||||
import p003ru.wishlist.wishlist.model.Wish;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase */
|
||||
public class WishListDatabase {
|
||||
private static final String DATABASE_NAME = "wishlist.db";
|
||||
private static final int DATABASE_VERSION = 25;
|
||||
private static final String TAG = "WishListDatabase";
|
||||
private static DatabaseHelper mOpenHelper;
|
||||
/* access modifiers changed from: private */
|
||||
public static HashMap<String, String> sPlainWishesProjectionMap = new HashMap<>();
|
||||
Context context;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase$TableView */
|
||||
public interface TableView {
|
||||
int delete(long j);
|
||||
|
||||
Cursor get_by_id(long j, String[] strArr);
|
||||
|
||||
long insert(ContentValues contentValues);
|
||||
|
||||
Cursor query(String[] strArr, String str, String[] strArr2, String str2, String str3);
|
||||
|
||||
Cursor select(String[] strArr, String str, String[] strArr2, String str2);
|
||||
|
||||
int update(long j, ContentValues contentValues);
|
||||
}
|
||||
|
||||
static {
|
||||
for (String[] map : WishList.PlainWishes.PROJECTION_MAP) {
|
||||
sPlainWishesProjectionMap.put(map[0], map[1]);
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase$WishListCursorFactory */
|
||||
class WishListCursorFactory implements SQLiteDatabase.CursorFactory {
|
||||
String[] projection;
|
||||
|
||||
public WishListCursorFactory(String[] projection2) {
|
||||
this.projection = projection2;
|
||||
}
|
||||
|
||||
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver driver, String editTable, SQLiteQuery query) {
|
||||
return new WishListCursor(db, driver, editTable, query);
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase$WishListCursorFactory$WishListCursor */
|
||||
class WishListCursor extends SQLiteCursor {
|
||||
public WishListCursor(SQLiteDatabase db, SQLiteCursorDriver driver, String editTable, SQLiteQuery query) {
|
||||
super(db, driver, editTable, query);
|
||||
}
|
||||
|
||||
public String[] getColumnNames() {
|
||||
if (WishListCursorFactory.this.projection == null) {
|
||||
super.getColumnNames();
|
||||
}
|
||||
return WishListCursorFactory.this.projection;
|
||||
}
|
||||
|
||||
public int getColumnIndex(String columnName) {
|
||||
if (WishListCursorFactory.this.projection == null) {
|
||||
super.getColumnIndex(columnName);
|
||||
}
|
||||
for (int i = 0; i < WishListCursorFactory.this.projection.length; i++) {
|
||||
if (columnName.equals(WishListCursorFactory.this.projection[i])) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase$WishesTable */
|
||||
static final class WishesTable extends WishList.Wishes {
|
||||
public static final String CREATE_TABLE_SQL = "_id INTEGER PRIMARY KEY,wish TEXT,tags TEXT,link TEXT,price TEXT,event TEXT,post TEXT,rating INTEGER,visible INTEGER,realized TINYINT,server_id BIGINT,server_sync TINYINT,created BIGINT,changed BIGINT";
|
||||
|
||||
WishesTable() {
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase$WishImagesTable */
|
||||
static final class WishImagesTable extends WishList.WishImages {
|
||||
public static final String CREATE_TABLE_SQL = "_id INTEGER PRIMARY KEY,wish_id INTEGER,file TEXT,link TEXT,server_sync TINYINT,created BIGINT,changed BIGINT";
|
||||
|
||||
WishImagesTable() {
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase$DatabaseHelper */
|
||||
static class DatabaseHelper extends SQLiteOpenHelper {
|
||||
DatabaseHelper(Context context) {
|
||||
super(context, WishListDatabase.DATABASE_NAME, (SQLiteDatabase.CursorFactory) null, WishListDatabase.DATABASE_VERSION);
|
||||
}
|
||||
|
||||
public void onCreate(SQLiteDatabase db) {
|
||||
db.execSQL("CREATE TABLE " + WishesTable.TABLE_NAME + " (" + WishesTable.CREATE_TABLE_SQL + ");");
|
||||
db.execSQL("CREATE TABLE " + WishImagesTable.TABLE_NAME + " (" + WishImagesTable.CREATE_TABLE_SQL + ");");
|
||||
}
|
||||
|
||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
Log.w(WishListDatabase.TAG, "Upgrading database from version " + oldVersion + " to " + newVersion + ", which will destroy all local data");
|
||||
db.execSQL("DROP TABLE IF EXISTS " + WishesTable.TABLE_NAME);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + WishImagesTable.TABLE_NAME);
|
||||
onCreate(db);
|
||||
}
|
||||
|
||||
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
Log.w(WishListDatabase.TAG, "Downgrading database from version " + oldVersion + " to " + newVersion + ", which will destroy all local data");
|
||||
db.execSQL("DROP TABLE IF EXISTS " + WishesTable.TABLE_NAME);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + WishImagesTable.TABLE_NAME);
|
||||
onCreate(db);
|
||||
}
|
||||
}
|
||||
|
||||
public WishListDatabase(Context context2) {
|
||||
synchronized (this) {
|
||||
if (mOpenHelper == null) {
|
||||
mOpenHelper = new DatabaseHelper(context2);
|
||||
}
|
||||
}
|
||||
this.context = context2;
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
Log.w(TAG, "Reset all");
|
||||
dbWritable().delete(WishesTable.TABLE_NAME, (String) null, (String[]) null);
|
||||
dbWritable().delete(WishImagesTable.TABLE_NAME, (String) null, (String[]) null);
|
||||
this.context.getContentResolver().notifyChange(WishList.Wishes.CONTENT_URI, (ContentObserver) null);
|
||||
this.context.getContentResolver().notifyChange(WishList.WishImages.CONTENT_URI, (ContentObserver) null);
|
||||
this.context.getContentResolver().notifyChange(WishList.PlainWishes.CONTENT_URI, (ContentObserver) null);
|
||||
}
|
||||
|
||||
public void desync() {
|
||||
Log.w(TAG, "Desync all");
|
||||
ContentValues values = new ContentValues();
|
||||
values.put("server_id", 0);
|
||||
values.put("server_sync", 0);
|
||||
dbWritable().update(WishList.Wishes.TABLE_NAME, values, (String) null, (String[]) null);
|
||||
ContentValues values2 = new ContentValues();
|
||||
values2.put("link", "");
|
||||
values2.put("server_sync", 0);
|
||||
dbWritable().update(WishList.WishImages.TABLE_NAME, values2, (String) null, (String[]) null);
|
||||
}
|
||||
|
||||
public PlainWishesView plainWishesView() {
|
||||
return new PlainWishesView();
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase$PlainWishesView */
|
||||
public class PlainWishesView implements TableView {
|
||||
private final String[][] mapToWishImages = {new String[]{WishList.PlainWishes.DEFAULT_GROUP_BY, WishList.WishImages.WISH_ID}, new String[]{WishList.PlainWishes.IMAGE_FILE, WishList.WishImages.FILE}, new String[]{WishList.PlainWishes.IMAGE_LINK, "link"}, new String[]{"created", "created"}, new String[]{WishList.PlainWishes.IMAGE_CHANGED, "changed"}, new String[]{WishList.PlainWishes.IMAGE_SERVER_SYNC, "server_sync"}};
|
||||
private final String[][] mapToWishes = {new String[]{WishList.PlainWishes.DEFAULT_GROUP_BY, WishList.PlainWishes.DEFAULT_GROUP_BY}, new String[]{"wish", "wish"}, new String[]{"tags", "tags"}, new String[]{"link", "link"}, new String[]{"price", "price"}, new String[]{"event", "event"}, new String[]{"post", "post"}, new String[]{"rating", "rating"}, new String[]{"visible", "visible"}, new String[]{"realized", "realized"}, new String[]{"created", "created"}, new String[]{"changed", "changed"}, new String[]{"server_id", "server_id"}, new String[]{"server_sync", "server_sync"}};
|
||||
|
||||
public PlainWishesView() {
|
||||
}
|
||||
|
||||
public Cursor query(String[] projection, String selection, String[] selectionArgs, String sortOrder, String where) {
|
||||
SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
|
||||
qb.setTables(WishList.PlainWishes.TABLE_NAME);
|
||||
qb.setProjectionMap(WishListDatabase.sPlainWishesProjectionMap);
|
||||
qb.setCursorFactory(new WishListCursorFactory(projection));
|
||||
if (where != null) {
|
||||
qb.appendWhere(where);
|
||||
}
|
||||
return qb.query(WishListDatabase.this.dbReadable(), projection, selection, selectionArgs, (String) WishListDatabase.sPlainWishesProjectionMap.get(WishList.PlainWishes.DEFAULT_GROUP_BY), (String) null, sortOrder);
|
||||
}
|
||||
|
||||
public Cursor select(String[] projection, String selection, String[] selectionArgs, String sortOrder) {
|
||||
return query(projection, selection, selectionArgs, sortOrder, (String) null);
|
||||
}
|
||||
|
||||
public Cursor get_by_id(long id, String[] projection) {
|
||||
return query(projection, (String) null, (String[]) null, (String) null, String.valueOf((String) WishListDatabase.sPlainWishesProjectionMap.get(WishList.PlainWishes.DEFAULT_GROUP_BY)) + "=" + String.valueOf(id));
|
||||
}
|
||||
|
||||
public Cursor get_by_server_id(long id, String[] projection) {
|
||||
return query(projection, (String) null, (String[]) null, (String) null, String.valueOf((String) WishListDatabase.sPlainWishesProjectionMap.get("server_id")) + "=" + String.valueOf(id));
|
||||
}
|
||||
|
||||
public long insert(ContentValues values) {
|
||||
if (values == null) {
|
||||
return 0;
|
||||
}
|
||||
Long now = Long.valueOf(System.currentTimeMillis());
|
||||
if (!values.containsKey("created")) {
|
||||
values.put("created", now);
|
||||
}
|
||||
if (!values.containsKey("changed")) {
|
||||
values.put("changed", now);
|
||||
}
|
||||
ContentValues valuesWish = prepare_wish(values);
|
||||
Log.d("insert values wish", valuesWish.toString());
|
||||
long rowId = WishListDatabase.this.dbWritable().insert(WishList.Wishes.TABLE_NAME, (String) null, valuesWish);
|
||||
if (rowId > 0) {
|
||||
ContentValues valuesWishImage = prepare_wish_image(rowId, values);
|
||||
if (valuesWishImage == null) {
|
||||
return rowId;
|
||||
}
|
||||
Log.d("insert values wish image", valuesWishImage.toString());
|
||||
WishListDatabase.this.dbWritable().insert(WishList.WishImages.TABLE_NAME, (String) null, valuesWishImage);
|
||||
return rowId;
|
||||
}
|
||||
throw new SQLException("Failed to insert row");
|
||||
}
|
||||
|
||||
public int delete(long id) {
|
||||
Log.d("delete wish", String.valueOf(id));
|
||||
String[] pointer = {String.valueOf(id)};
|
||||
int count = WishListDatabase.this.dbWritable().delete(WishList.Wishes.TABLE_NAME, "_id = ?", pointer);
|
||||
WishListDatabase.this.dbWritable().delete(WishList.WishImages.TABLE_NAME, "wish_id = ?", pointer);
|
||||
return count;
|
||||
}
|
||||
|
||||
public int update(long id, ContentValues values) {
|
||||
Long now = Long.valueOf(System.currentTimeMillis());
|
||||
if (!values.containsKey("changed")) {
|
||||
values.put("changed", now);
|
||||
}
|
||||
String[] pointer = {String.valueOf(id)};
|
||||
ContentValues valuesWish = prepare_wish(values);
|
||||
Log.d("update values wish", valuesWish.toString());
|
||||
int result = WishListDatabase.this.dbWritable().update(WishList.Wishes.TABLE_NAME, valuesWish, "_id = ?", pointer);
|
||||
WishListDatabase.this.dbWritable().delete(WishList.WishImages.TABLE_NAME, "wish_id = ?", pointer);
|
||||
ContentValues valuesWishImage = prepare_wish_image(id, values);
|
||||
if (valuesWishImage != null) {
|
||||
Log.d("insert values wish image", valuesWishImage.toString());
|
||||
WishListDatabase.this.dbWritable().insert(WishList.WishImages.TABLE_NAME, (String) null, valuesWishImage);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public ContentValues prepare_wish(ContentValues values) {
|
||||
ContentValues res = new ContentValues();
|
||||
for (String[] map : this.mapToWishes) {
|
||||
if (values.containsKey(map[0])) {
|
||||
res.put(map[1], values.getAsString(map[0]));
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public ContentValues prepare_wish_image(long wish_id, ContentValues values) {
|
||||
if (!values.containsKey(WishList.PlainWishes.IMAGE_FILE) && !values.containsKey(WishList.PlainWishes.IMAGE_LINK)) {
|
||||
return null;
|
||||
}
|
||||
ContentValues res = new ContentValues();
|
||||
for (String[] map : this.mapToWishImages) {
|
||||
if (values.containsKey(map[0])) {
|
||||
res.put(map[1], values.getAsString(map[0]));
|
||||
}
|
||||
}
|
||||
if (wish_id == 0) {
|
||||
return res;
|
||||
}
|
||||
res.put(WishList.WishImages.WISH_ID, Long.valueOf(wish_id));
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
/* access modifiers changed from: private */
|
||||
public SQLiteDatabase dbReadable() {
|
||||
return mOpenHelper.getReadableDatabase();
|
||||
}
|
||||
|
||||
/* access modifiers changed from: private */
|
||||
public SQLiteDatabase dbWritable() {
|
||||
return mOpenHelper.getWritableDatabase();
|
||||
}
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListDatabase$WishFinder */
|
||||
public class WishFinder {
|
||||
private PlainWishesView tableview;
|
||||
|
||||
public WishFinder() {
|
||||
this.tableview = new PlainWishesView();
|
||||
}
|
||||
|
||||
/* renamed from: id */
|
||||
public Wish mo2156id(long id) {
|
||||
if (id <= 0) {
|
||||
return null;
|
||||
}
|
||||
return cursorToWish(this.tableview.get_by_id(id, Wish.PROJECTION));
|
||||
}
|
||||
|
||||
public Wish server_id(long server_id) {
|
||||
if (server_id <= 0) {
|
||||
return null;
|
||||
}
|
||||
return cursorToWish(this.tableview.get_by_server_id(server_id, Wish.PROJECTION));
|
||||
}
|
||||
|
||||
public Wish[] all_no_server_sync() {
|
||||
return cursorToWishes(this.tableview.query(Wish.PROJECTION, (String) null, (String[]) null, (String) null, String.valueOf((String) WishListDatabase.sPlainWishesProjectionMap.get("server_sync")) + " = 0"));
|
||||
}
|
||||
|
||||
public Wish[] all_image_no_server_sync_with_link() {
|
||||
return cursorToWishes(this.tableview.query(Wish.PROJECTION, (String) null, (String[]) null, (String) null, String.valueOf((String) WishListDatabase.sPlainWishesProjectionMap.get(WishList.PlainWishes.IMAGE_SERVER_SYNC)) + " != 1" + " AND NOT " + ((String) WishListDatabase.sPlainWishesProjectionMap.get(WishList.PlainWishes.IMAGE_LINK)) + " IS NULL"));
|
||||
}
|
||||
|
||||
public Wish[] all_image_no_server_sync_no_link() {
|
||||
return cursorToWishes(this.tableview.query(Wish.PROJECTION, (String) null, (String[]) null, (String) null, String.valueOf((String) WishListDatabase.sPlainWishesProjectionMap.get(WishList.PlainWishes.IMAGE_SERVER_SYNC)) + " != 1" + " AND " + ((String) WishListDatabase.sPlainWishesProjectionMap.get(WishList.PlainWishes.IMAGE_LINK)) + " IS NULL"));
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public Wish cursorToWish(Cursor cursor) {
|
||||
Wish wish = null;
|
||||
if (cursor.moveToFirst()) {
|
||||
wish = new Wish(WishListDatabase.this.context, (Uri) null);
|
||||
wish.import_cursor(cursor);
|
||||
}
|
||||
cursor.close();
|
||||
return wish;
|
||||
}
|
||||
|
||||
/* access modifiers changed from: package-private */
|
||||
public Wish[] cursorToWishes(Cursor cursor) {
|
||||
if (!cursor.moveToFirst()) {
|
||||
return new Wish[0];
|
||||
}
|
||||
ArrayList<Wish> wishes = new ArrayList<>();
|
||||
do {
|
||||
Wish wish = new Wish(WishListDatabase.this.context, (Uri) null);
|
||||
wish.import_cursor(cursor);
|
||||
wishes.add(wish);
|
||||
} while (cursor.moveToNext());
|
||||
cursor.close();
|
||||
return (Wish[]) wishes.toArray(new Wish[wishes.size()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentUris;
|
||||
import android.content.ContentValues;
|
||||
import android.content.UriMatcher;
|
||||
import android.database.ContentObserver;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import p003ru.wishlist.wishlist.WishList;
|
||||
import p003ru.wishlist.wishlist.WishListDatabase;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishListProvider */
|
||||
public class WishListProvider extends ContentProvider {
|
||||
private static final int PLAIN_WISHES = 1;
|
||||
private static final int PLAIN_WISH_ID = 2;
|
||||
private static final UriMatcher sUriMatcher = new UriMatcher(-1);
|
||||
private WishListDatabase.PlainWishesView mPlainWishesView;
|
||||
|
||||
static {
|
||||
sUriMatcher.addURI(WishList.AUTHORITY, WishList.PlainWishes.PATH_ALL, 1);
|
||||
sUriMatcher.addURI(WishList.AUTHORITY, String.valueOf(WishList.PlainWishes.PATH_ID) + "#", 2);
|
||||
}
|
||||
|
||||
public boolean onCreate() {
|
||||
this.mPlainWishesView = new WishListDatabase(getContext()).plainWishesView();
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getType(Uri uri) {
|
||||
switch (sUriMatcher.match(uri)) {
|
||||
case 1:
|
||||
return WishList.PlainWishes.CONTENT_TYPE;
|
||||
case 2:
|
||||
return WishList.PlainWishes.CONTENT_ITEM_TYPE;
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown URI " + uri);
|
||||
}
|
||||
}
|
||||
|
||||
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
|
||||
Cursor c;
|
||||
String orderBy;
|
||||
switch (sUriMatcher.match(uri)) {
|
||||
case 1:
|
||||
if (TextUtils.isEmpty(sortOrder)) {
|
||||
orderBy = WishList.PlainWishes.DEFAULT_SORT_ORDER;
|
||||
} else {
|
||||
orderBy = sortOrder;
|
||||
}
|
||||
c = this.mPlainWishesView.select(projection, selection, selectionArgs, orderBy);
|
||||
break;
|
||||
case 2:
|
||||
c = this.mPlainWishesView.get_by_id((long) Integer.valueOf(uri.getPathSegments().get(WishList.PlainWishes.ID_PATH_POSITION)).intValue(), projection);
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown URI " + uri);
|
||||
}
|
||||
c.setNotificationUri(getContext().getContentResolver(), uri);
|
||||
return c;
|
||||
}
|
||||
|
||||
public Uri insert(Uri uri, ContentValues initialValues) {
|
||||
if (sUriMatcher.match(uri) != 1) {
|
||||
throw new IllegalArgumentException("Unknown URI " + uri);
|
||||
}
|
||||
Uri noteUri = ContentUris.withAppendedId(WishList.PlainWishes.CONTENT_ID_URI_BASE, this.mPlainWishesView.insert(initialValues));
|
||||
getContext().getContentResolver().notifyChange(noteUri, (ContentObserver) null);
|
||||
return noteUri;
|
||||
}
|
||||
|
||||
public int delete(Uri uri, String where, String[] whereArgs) {
|
||||
switch (sUriMatcher.match(uri)) {
|
||||
case 2:
|
||||
int count = this.mPlainWishesView.delete((long) Integer.valueOf(uri.getPathSegments().get(WishList.PlainWishes.ID_PATH_POSITION)).intValue());
|
||||
getContext().getContentResolver().notifyChange(uri, (ContentObserver) null);
|
||||
return count;
|
||||
default:
|
||||
throw new IllegalArgumentException("Invalid URI " + uri);
|
||||
}
|
||||
}
|
||||
|
||||
public int update(Uri uri, ContentValues values, String where, String[] whereArgs) {
|
||||
if (sUriMatcher.match(uri) != 2) {
|
||||
throw new IllegalArgumentException("Invalid URI " + uri);
|
||||
}
|
||||
int count = this.mPlainWishesView.update((long) Integer.valueOf(uri.getPathSegments().get(WishList.PlainWishes.ID_PATH_POSITION)).intValue(), values);
|
||||
getContext().getContentResolver().notifyChange(uri, (ContentObserver) null);
|
||||
return count;
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package p003ru.wishlist.wishlist;
|
||||
|
||||
import android.content.ContentUris;
|
||||
import android.os.Bundle;
|
||||
import android.support.p000v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import p003ru.wishlist.wishlist.WishList;
|
||||
import p003ru.wishlist.wishlist.WishListDatabase;
|
||||
import p003ru.wishlist.wishlist.model.AbstractModel;
|
||||
|
||||
/* renamed from: ru.wishlist.wishlist.WishSlidePageFrament */
|
||||
public class WishSlidePageFrament extends Fragment {
|
||||
|
||||
/* renamed from: id */
|
||||
private long f8id;
|
||||
AbstractModel.ViewModel modelview;
|
||||
ViewGroup view;
|
||||
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
this.f8id = getArguments() != null ? getArguments().getLong("id") : 1;
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
WishListDatabase wishListDatabase = new WishListDatabase(getActivity());
|
||||
wishListDatabase.getClass();
|
||||
this.modelview = new WishListDatabase.WishFinder().mo2156id(this.f8id).viewFull();
|
||||
this.view = (ViewGroup) inflater.inflate(this.modelview.getLayoutID(), container, false);
|
||||
return this.view;
|
||||
}
|
||||
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (this.modelview.reload()) {
|
||||
this.modelview.setupView(this.view);
|
||||
} else {
|
||||
getActivity().finish();
|
||||
}
|
||||
}
|
||||
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
CommonActivity.inflateMenuWish(getActivity(), menu, ContentUris.withAppendedId(WishList.PlainWishes.CONTENT_ID_URI_BASE, this.f8id), inflater);
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
}
|
||||
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (CommonActivity.handleMenuWish(getActivity(), item, ContentUris.withAppendedId(WishList.PlainWishes.CONTENT_ID_URI_BASE, this.f8id))) {
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user