rhodes 2.4.1 → 3.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/Rakefile +7 -36
- data/doc/build.txt +48 -22
- data/doc/device-caps.txt +130 -1
- data/doc/rhom.txt +9 -3
- data/doc/test-log-debug.txt +5 -2
- data/lib/extensions/barcode/ext/barcode/platform/android/Rakefile +40 -20
- data/lib/extensions/barcode/ext/barcode/platform/android/ZXing_Info/AUTHORS +58 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/ZXing_Info/CHANGES +266 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/ZXing_Info/COPYING +201 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/ZXing_Info/README +11 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/ext_build.files +173 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/jni/src/barcode.cpp +34 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/BarcodeFormat.java +103 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/Binarizer.java +80 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/BinaryBitmap.java +128 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ChecksumException.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/DecodeHintType.java +79 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/EncodeHintType.java +39 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/FormatException.java +38 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/LuminanceSource.java +113 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/MultiFormatReader.java +166 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/MultiFormatWriter.java +65 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/NotFoundException.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/Reader.java +64 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ReaderException.java +98 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/Result.java +143 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ResultMetadataType.java +109 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ResultPoint.java +127 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/ResultPointCallback.java +29 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/Writer.java +54 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/WriterException.java +35 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/AbstractDoCoMoResultParser.java +39 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/AddressBookAUResultParser.java +73 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/AddressBookDoCoMoResultParser.java +85 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/AddressBookParsedResult.java +122 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/BizcardResultParser.java +94 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/BookmarkDoCoMoResultParser.java +46 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/CalendarParsedResult.java +134 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/EmailAddressParsedResult.java +61 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/EmailAddressResultParser.java +64 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/EmailDoCoMoResultParser.java +87 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ExpandedProductParsedResult.java +195 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ExpandedProductResultParser.java +199 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/GeoParsedResult.java +132 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/GeoResultParser.java +77 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ISBNParsedResult.java +39 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ISBNResultParser.java +54 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ParsedResult.java +73 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ParsedResultType.java +53 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ProductParsedResult.java +49 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ProductResultParser.java +66 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/ResultParser.java +319 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/SMSMMSResultParser.java +107 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/SMSParsedResult.java +104 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/SMSTOMMSTOResultParser.java +57 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/TelParsedResult.java +54 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/TelResultParser.java +44 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/TextParsedResult.java +48 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/URIParsedResult.java +113 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/URIResultParser.java +87 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/URLTOResultParser.java +47 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/VCardResultParser.java +346 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/VEventResultParser.java +54 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/WifiParsedResult.java +53 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/WifiResultParser.java +50 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/AbstractNDEFResultParser.java +45 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFRecord.java +87 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFSmartPosterParsedResult.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFSmartPosterResultParser.java +81 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFTextResultParser.java +57 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/client/result/optional/NDEFURIResultParser.java +95 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/BitArray.java +247 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/BitMatrix.java +226 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/BitSource.java +97 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/CharacterSetECI.java +110 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/Collections.java +53 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/Comparator.java +27 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/DecoderResult.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/DefaultGridSampler.java +81 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/DetectorResult.java +46 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/ECI.java +52 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/GlobalHistogramBinarizer.java +196 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/GridSampler.java +171 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/HybridBinarizer.java +185 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/PerspectiveTransform.java +148 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/StringUtils.java +191 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/detector/MonochromeRectangleDetector.java +209 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/detector/WhiteRectangleDetector.java +316 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/GF256.java +139 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/GF256Poly.java +263 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/ReedSolomonDecoder.java +194 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/ReedSolomonEncoder.java +75 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/common/reedsolomon/ReedSolomonException.java +31 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/DataMatrixReader.java +161 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/BitMatrixParser.java +446 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/DataBlock.java +118 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java +462 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/Decoder.java +134 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/decoder/Version.java +242 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/datamatrix/detector/Detector.java +348 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/ByQuadrantReader.java +96 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/GenericMultipleBarcodeReader.java +156 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/MultipleBarcodeReader.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/qrcode/QRCodeMultiReader.java +80 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/qrcode/detector/MultiDetector.java +72 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/multi/qrcode/detector/MultiFinderPatternFinder.java +324 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/CodaBarReader.java +263 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code128Reader.java +473 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code128Writer.java +73 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code39Reader.java +333 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code39Writer.java +82 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/Code93Reader.java +273 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EAN13Reader.java +135 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EAN13Writer.java +81 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EAN8Reader.java +72 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EAN8Writer.java +76 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/EANManufacturerOrgSupport.java +170 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/ITFReader.java +348 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/ITFWriter.java +68 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/MultiFormatOneDReader.java +109 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/MultiFormatUPCEANReader.java +113 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/OneDReader.java +297 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCAReader.java +75 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCEANExtensionSupport.java +186 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCEANReader.java +355 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCEANWriter.java +104 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/UPCEReader.java +153 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/AbstractRSSReader.java +110 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/DataCharacter.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/FinderPattern.java +48 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/Pair.java +41 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/RSS14Reader.java +494 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/RSSUtils.java +155 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/BitArrayBuilder.java +85 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/ExpandedPair.java +68 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/RSSExpandedReader.java +578 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI013103decoder.java +47 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01320xDecoder.java +55 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01392xDecoder.java +66 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01393xDecoder.java +76 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI013x0x1xDecoder.java +106 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI013x0xDecoder.java +56 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01AndOtherAIs.java +56 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01decoder.java +81 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AI01weightDecoder.java +58 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AbstractExpandedDecoder.java +85 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/AnyAIDecoder.java +48 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/BlockParsedResult.java +60 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/CurrentParsingState.java +69 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/DecodedChar.java +52 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/DecodedInformation.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/DecodedNumeric.java +79 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/DecodedObject.java +44 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/FieldParser.java +285 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/oned/rss/expanded/decoders/GeneralAppIdDecoder.java +414 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/PDF417Reader.java +79 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java +1163 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/decoder/DecodedBitStreamParser.java +629 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/decoder/Decoder.java +150 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/pdf417/detector/Detector.java +498 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/QRCodeReader.java +166 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/QRCodeWriter.java +108 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/BitMatrixParser.java +203 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/DataBlock.java +123 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/DataMask.java +155 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java +261 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/Decoder.java +148 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/ErrorCorrectionLevel.java +86 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/FormatInformation.java +171 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/Mode.java +112 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/decoder/Version.java +586 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/AlignmentPattern.java +48 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java +279 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/Detector.java +400 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/FinderPattern.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java +585 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/detector/FinderPatternInfo.java +49 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/BlockPair.java +37 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/ByteMatrix.java +97 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/Encoder.java +557 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/MaskUtil.java +217 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/MatrixUtil.java +524 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/google/zxing/qrcode/encoder/QRCode.java +239 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/Barcode.java +63 -0
- data/lib/extensions/barcode/ext/barcode/platform/android/src/com/rhomobile/barcode/RhoLuminanceSource.java +75 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Barcode.xcodeproj/project.pbxproj +74 -318
- data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +70 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/COPYING +27 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h +105 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h +60 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarImage.h +69 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h +51 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h +142 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h +118 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h +100 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h +33 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h +71 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar.h +1476 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h +201 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Exception.h +187 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Image.h +321 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h +130 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Processor.h +223 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h +162 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h +529 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Video.h +170 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Window.h +136 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/LICENSE +504 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/README +59 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-back.png +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-help.html +88 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-helpicons.png +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-samples.png +0 -0
- data/lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/libzbar.a +0 -0
- data/lib/extensions/debugger/debugger.rb +215 -67
- data/lib/extensions/nfc/ext/nfc/platform/android/AndroidManifest.xml +1 -1
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/nfc/Nfc.java +14 -2
- data/lib/extensions/timeout/timeout.rb +114 -0
- data/lib/framework/rho/render.rb +14 -16
- data/lib/framework/rho/rho.rb +38 -14
- data/lib/framework/rho/rhoapplication.rb +1 -1
- data/lib/framework/rho/rhocontroller.rb +3 -3
- data/lib/framework/rho/rhofsconnector.rb +18 -6
- data/lib/framework/rho/rhoviewhelpers.rb +1 -1
- data/lib/framework/rhoappmanifest.rb +44 -0
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rhoframework.rb +31 -11
- data/lib/framework/rholang/localization_simplified.rb +10 -6
- data/lib/framework/rhom/rhom_object_factory.rb +3 -3
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml +2 -2
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesApplication.h +32 -8
- data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +21 -21
- data/platform/android/Rhodes/jni/src/rhocryptimpl.cpp +1 -0
- data/platform/android/Rhodes/jni/src/rhodes.cpp +21 -9
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +7 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/PushReceiver.java +19 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +2 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +24 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +39 -47
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +113 -106
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/StatusNotification.java +49 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +5 -1
- data/platform/android/build/RhodesSRC_build.files +1 -0
- data/platform/android/build/android.rake +93 -6
- data/platform/bb/RubyVM/src/com/rho/RhodesApp.java +5 -4
- data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +10 -0
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +16 -15
- data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +2 -2
- data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +21 -19
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +2 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +6 -1
- data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +10 -3
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +21 -1
- data/platform/iphone/Classes/SimpleMainView.m +5 -5
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/rbuild/iphone.rake +30 -1
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +12 -0
- data/platform/shared/SyncClient/SyncClient.cpp +136 -20
- data/platform/shared/SyncClient/SyncClient.h +17 -0
- data/platform/shared/common/AppMenu.cpp +6 -1
- data/platform/shared/common/RhoConf.cpp +13 -1
- data/platform/shared/common/RhoConf.h +3 -1
- data/platform/shared/common/RhoDefs.h +10 -0
- data/platform/shared/common/RhoFile.cpp +15 -0
- data/platform/shared/common/RhoFile.h +1 -0
- data/platform/shared/common/RhodesApp.cpp +16 -3
- data/platform/shared/common/RhodesApp.h +1 -0
- data/platform/shared/common/RhodesAppBase.cpp +102 -62
- data/platform/shared/common/RhodesAppBase.h +7 -1
- data/platform/shared/curl/lib/rhossl.c +1 -0
- data/platform/shared/db/DBAdapter.cpp +14 -2
- data/platform/shared/logging/RhoLogConf.cpp +21 -0
- data/platform/shared/logging/RhoLogConf.h +11 -0
- data/platform/shared/logging/RhoLogSink.cpp +24 -0
- data/platform/shared/logging/RhoLogSink.h +20 -1
- data/platform/shared/net/HttpServer.cpp +8 -6
- data/platform/shared/net/RawSocket.cpp +130 -0
- data/platform/shared/net/RawSocket.h +74 -0
- data/platform/shared/ruby/ext/rho/rhoruby.c +37 -1
- data/platform/shared/ruby/ext/rho/rhosupport.c +74 -21
- data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +9 -1
- data/platform/shared/ruby/vm_eval.c +4 -3
- data/platform/shared/sync/SyncEngine.cpp +11 -12
- data/platform/shared/sync/SyncEngine.h +2 -2
- data/platform/shared/sync/SyncNotify.cpp +41 -13
- data/platform/shared/sync/SyncNotify.h +20 -3
- data/platform/shared/sync/SyncSource.cpp +21 -19
- data/platform/shared/sync/SyncThread.cpp +11 -1
- data/platform/shared/sync/SyncThread.h +3 -0
- data/platform/shared/test/test_helper.cpp +7 -0
- data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
- data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
- data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
- data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
- data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
- data/platform/win32/RhoSimulator/rhosimulator.exe +0 -0
- data/platform/wm/RhoLib/RhoLib.vcproj +762 -14
- data/platform/wm/build/wm.rake +87 -10
- data/platform/wm/rhodes.sln +155 -72
- data/platform/wm/rhodes/MainWindow.cpp +5 -2
- data/platform/wm/rhodes/MainWindow.h +9 -1
- data/platform/wm/rhodes/RhoNativeViewManager.cpp +4 -0
- data/platform/wm/rhodes/Rhodes.cpp +60 -6
- data/platform/wm/rhodes/emulator/ExternalWebView.cpp +20 -0
- data/platform/wm/rhodes/emulator/ExternalWebView.h +23 -0
- data/platform/wm/rhodes/emulator/ExternalWebView.ui +46 -0
- data/platform/wm/rhodes/emulator/MainWindowCallback.h +18 -0
- data/platform/wm/rhodes/emulator/MainWindowProxy.cpp +268 -0
- data/platform/wm/rhodes/emulator/MainWindowProxy.h +34 -0
- data/platform/wm/rhodes/emulator/MainWindowQt.cpp +345 -0
- data/platform/wm/rhodes/emulator/MainWindowQt.h +118 -0
- data/platform/wm/rhodes/emulator/NativeToolbarQt.cpp +57 -0
- data/platform/wm/rhodes/emulator/NativeToolbarQt.h +52 -0
- data/platform/wm/rhodes/emulator/QtMainWindow.cpp +219 -0
- data/platform/wm/rhodes/emulator/QtMainWindow.h +62 -0
- data/platform/wm/rhodes/emulator/QtMainWindow.ui +122 -0
- data/platform/wm/rhodes/{RhoCryptImpl.cpp → rho/common/RhoCryptImpl.cpp} +0 -0
- data/platform/wm/rhodes/{RhoCryptImpl.h → rho/common/RhoCryptImpl.h} +0 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +2 -86
- data/platform/wm/rhodes/rho/rubyext/NativeToolbarExt.cpp +87 -0
- data/platform/wm/rhodes/rho/rubyext/NativeToolbarExt.h +6 -0
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +60 -0
- data/platform/wm/rhodes/rhodes.vcproj +4025 -365
- data/platform/wm/rhodes/signature/Signature.cpp +29 -13
- data/platform/wm/rubylib/rubylib.vcproj +1167 -195
- data/platform/wm/shttpd/shttpd.vcproj +4 -4
- data/platform/wm/sqlite3/sqlite3.vcproj +441 -13
- data/platform/wm/syncengine/syncengine.vcproj +443 -15
- data/platform/wm/tcmalloc/tcmalloc.vcproj +0 -154
- data/platform/wm/tools/detool/LogServer.cpp +150 -0
- data/platform/wm/tools/detool/LogServer.h +23 -0
- data/platform/wm/tools/detool/detool.cpp +42 -4
- data/platform/wm/tools/detool/detool.vcproj +10 -1
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/IronRuby.Libraries.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/IronRuby.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/Microsoft.Dynamic.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/Microsoft.Scripting.Core.dll +0 -0
- data/platform/wp7/IronRuby/Bin/Silverlight3Release/Microsoft.Scripting.dll +0 -0
- data/platform/wp7/RhoAppRunner/Program.cs +20 -3
- data/platform/wp7/RhoLogServer/Program.cs +22 -0
- data/platform/wp7/RhoLogServer/Properties/AssemblyInfo.cs +36 -0
- data/platform/wp7/RhoLogServer/RhoLogServer.csproj +65 -0
- data/platform/wp7/RhoLogServer/SocketServer.cs +210 -0
- data/platform/wp7/RhoRubyExtGen/RhoAsyncHttp.cs +6 -0
- data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +3 -2
- data/platform/wp7/RhoRubyLib/RhoRuby.cs +82 -0
- data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +7 -5
- data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +1 -1
- data/platform/wp7/RhoRubyLib/common/RhoParams.cs +1 -1
- data/platform/wp7/RhoRubyLib/common/ThreadQueue.cs +4 -1
- data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +2 -2
- data/platform/wp7/RhoRubyLib/logging/IRhoLogSink.cs +1 -1
- data/platform/wp7/RhoRubyLib/logging/RhoEmptyLogger.cs +30 -0
- data/platform/wp7/RhoRubyLib/logging/RhoLogConf.cs +10 -0
- data/platform/wp7/RhoRubyLib/logging/RhoLogFileSink.cs +6 -1
- data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +56 -0
- data/platform/wp7/RhoRubyLib/logging/RhoLogger.cs +24 -11
- data/platform/wp7/RhoRubyLib/net/AsyncHttp.cs +57 -14
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +32 -9
- data/platform/wp7/RhoRubyLib/rubyext/RhoAsyncHttp.cs +7 -0
- data/platform/wp7/RhoRubyLib/rubyext/RhoKernelOps.cs +6 -0
- data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +20 -16
- data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +2 -2
- data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +138 -40
- data/platform/wp7/WPApplication/rho/apps/app/layout.erb +3 -1
- data/platform/wp7/build/wp.rake +151 -12
- data/platform/wp7/rhodes.sln +10 -0
- data/platform/wp7/rhodes/App.xaml.cs +6 -0
- data/platform/wp7/rhodes/MainPage.xaml +3 -0
- data/platform/wp7/rhodes/MainPage.xaml.cs +19 -0
- data/platform/wp7/rhodes/Rhodes.csproj +4 -2
- data/rakefile.rb +7 -36
- data/res/build-tools/RhoAppRunner.exe +0 -0
- data/res/build-tools/RhoLogServer.exe +0 -0
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/wp7explorer.exe +0 -0
- data/res/generators/templates/application/app/layout.erb +3 -1
- data/res/generators/templates/application/public/jqtouch/jqtouch.js +1 -1
- data/rhodes.gemspec +1 -1
- data/spec/framework_spec/app/layout.erb +1 -1
- data/spec/framework_spec/build.yml +1 -0
- data/spec/perfomance_spec/app/layout.erb +3 -0
- data/spec/phone_spec/app/Account_s/account_s.rb +4 -1
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +30 -1
- data/spec/phone_spec/app/spec_runner.rb +1 -1
- data/spec/phone_spec/build.yml +4 -1
- metadata +262 -10
- data/platform/wp7/IronRuby/Languages/Ruby/Ruby/Builtins/ConsoleStream.cs +0 -107
@@ -93,7 +93,7 @@ public class RhoCryptImpl
|
|
93
93
|
|
94
94
|
private static void reportFail(String name, Exception e)
|
95
95
|
{
|
96
|
-
Logger.E(TAG, "Call of \"" + name + "\" failed: " + e.getMessage());
|
96
|
+
Logger.E(TAG, "Call of \"" + name + "\" failed: " + e.getClass().getSimpleName() + ": " + e.getMessage());
|
97
97
|
}
|
98
98
|
|
99
99
|
public boolean db_encrypt( String szPartition, ByteBuffer dataIn, ByteBuffer dataOut )
|
@@ -120,7 +120,7 @@ public class RhoCryptImpl
|
|
120
120
|
initContext(szPartition);
|
121
121
|
|
122
122
|
dataOut.rewind();
|
123
|
-
m_decryptCipher.doFinal(dataIn, dataOut);
|
123
|
+
m_decryptCipher.doFinal(dataIn, dataOut);
|
124
124
|
|
125
125
|
return true;
|
126
126
|
}catch(Exception exc)
|
@@ -77,7 +77,7 @@ public class RhodesActivity extends BaseActivity {
|
|
77
77
|
//ct.setPriority(Thread.MAX_PRIORITY);
|
78
78
|
uiThreadId = ct.getId();
|
79
79
|
|
80
|
-
if (!RhodesService.
|
80
|
+
if (!RhodesService.isTitleEnabled()) {
|
81
81
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
82
82
|
}
|
83
83
|
else {
|
@@ -139,26 +139,35 @@ public class RhodesActivity extends BaseActivity {
|
|
139
139
|
@Override
|
140
140
|
public void onStart() {
|
141
141
|
super.onStart();
|
142
|
-
|
142
|
+
RhodesService.rhodesActivityStarted(true);
|
143
143
|
}
|
144
|
-
|
145
|
-
|
144
|
+
|
145
|
+
@Override
|
146
|
+
public void onPause()
|
147
|
+
{
|
148
|
+
RhodesService.rhodesActivityStarted(false);
|
149
|
+
|
150
|
+
super.onPause();
|
151
|
+
Log.i(TAG, ">>>>>>>>>>>>>>> onPause()");
|
152
|
+
|
153
|
+
RhodesService r = RhodesService.getInstance();
|
154
|
+
if (r != null)
|
155
|
+
r.callUiDestroyedCallback();
|
156
|
+
}
|
157
|
+
|
158
|
+
@Override
|
146
159
|
public void onStop()
|
147
160
|
{
|
148
161
|
super.onStop();
|
149
|
-
|
150
|
-
RhodesService r = RhodesService.getInstance();
|
151
|
-
if (r != null)
|
152
|
-
r.callUiDestroyedCallback();
|
162
|
+
Log.i(TAG, ">>>>>>>>>>>>>>> onStop()");
|
153
163
|
}
|
154
164
|
|
155
165
|
@Override
|
156
166
|
public void onDestroy() {
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
sInstance = null;
|
167
|
+
Log.i(TAG, ">>>>>>>>>>>>>>> onDestroy()");
|
168
|
+
|
169
|
+
//TODO: Check is it really correct in case activity killed immediately after onPause()
|
170
|
+
sInstance = null;
|
162
171
|
super.onDestroy();
|
163
172
|
}
|
164
173
|
|
@@ -357,10 +366,10 @@ public class RhodesActivity extends BaseActivity {
|
|
357
366
|
startParams = startParams.substring(2);
|
358
367
|
}
|
359
368
|
|
360
|
-
if(!
|
369
|
+
if(!RhodesApplication.canStart(startParams))
|
361
370
|
{
|
362
371
|
Logger.E(TAG, "This is hidden app and can be started only with security key.");
|
363
|
-
|
372
|
+
RhodesService.exit();
|
364
373
|
return;
|
365
374
|
}
|
366
375
|
|
@@ -1,60 +1,52 @@
|
|
1
1
|
package com.rhomobile.rhodes;
|
2
2
|
|
3
|
-
import java.util.ArrayList;
|
4
|
-
import java.util.List;
|
5
|
-
|
6
3
|
import android.app.Application;
|
4
|
+
import android.os.Handler;
|
7
5
|
import android.os.Process;
|
8
6
|
|
9
|
-
public class RhodesApplication extends Application
|
10
|
-
|
11
|
-
private List<Runnable> mOnExit = new ArrayList<Runnable>();
|
7
|
+
public class RhodesApplication extends Application{
|
12
8
|
|
9
|
+
// private static final String TAG = NativeApplication.class.getSimpleName();
|
10
|
+
private static Handler mHandler;
|
13
11
|
static {
|
14
12
|
NativeLibraries.load();
|
15
13
|
}
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
public boolean removeOnExitHandler(Runnable action) {
|
31
|
-
synchronized (this) {
|
32
|
-
return mOnExit.remove(action);
|
33
|
-
}
|
14
|
+
|
15
|
+
private native static void createRhodesApp();
|
16
|
+
private native static void startRhodesApp();
|
17
|
+
private native static void stopRhodesApp();
|
18
|
+
private native static boolean canStartApp(String strCmdLine, String strSeparators);
|
19
|
+
|
20
|
+
public static void create()
|
21
|
+
{
|
22
|
+
createRhodesApp();
|
23
|
+
}
|
24
|
+
|
25
|
+
public static void start()
|
26
|
+
{
|
27
|
+
startRhodesApp();
|
34
28
|
}
|
35
|
-
|
36
|
-
public
|
37
|
-
|
38
|
-
|
39
|
-
onExit.addAll(mOnExit);
|
40
|
-
}
|
41
|
-
|
42
|
-
for (Runnable action : onExit) {
|
43
|
-
action.run();
|
44
|
-
}
|
45
|
-
|
46
|
-
try {
|
47
|
-
RhodesService r = RhodesService.getInstance();
|
48
|
-
if (r != null)
|
49
|
-
r.stopSelf();
|
50
|
-
}
|
51
|
-
catch (Exception e) {}
|
52
|
-
|
53
|
-
RhodesActivity ra = RhodesActivity.getInstance();
|
54
|
-
if (ra != null)
|
55
|
-
ra.finish();
|
56
|
-
|
57
|
-
Process.killProcess(Process.myPid());
|
29
|
+
|
30
|
+
public static boolean canStart(String strCmdLine)
|
31
|
+
{
|
32
|
+
return canStartApp(strCmdLine, "&#");
|
58
33
|
}
|
59
34
|
|
35
|
+
public static void stop() {
|
36
|
+
|
37
|
+
mHandler = new Handler();
|
38
|
+
mHandler.postDelayed(new Runnable() {
|
39
|
+
public void run() {
|
40
|
+
stopRhodesApp();
|
41
|
+
Process.sendSignal(Process.myPid(), Process.SIGNAL_QUIT);
|
42
|
+
mHandler.postDelayed(new Runnable() {
|
43
|
+
public void run() {
|
44
|
+
Process.killProcess(Process.myPid());
|
45
|
+
}
|
46
|
+
}, 500);
|
47
|
+
}
|
48
|
+
}, 500);
|
49
|
+
}
|
50
|
+
|
51
|
+
|
60
52
|
}
|
@@ -70,7 +70,7 @@ public class RhodesService extends Service {
|
|
70
70
|
|
71
71
|
private static final String TAG = RhodesService.class.getSimpleName();
|
72
72
|
|
73
|
-
private static final boolean DEBUG =
|
73
|
+
private static final boolean DEBUG = true;
|
74
74
|
|
75
75
|
public static final String INTENT_EXTRA_PREFIX = "com.rhomobile.rhodes.";
|
76
76
|
|
@@ -114,6 +114,13 @@ public class RhodesService extends Service {
|
|
114
114
|
private static boolean mCameraAvailable;
|
115
115
|
|
116
116
|
private static int sActivitiesActive;
|
117
|
+
private static boolean sRhodesActivityStarted = false;
|
118
|
+
|
119
|
+
synchronized
|
120
|
+
static void rhodesActivityStarted(boolean started) { sRhodesActivityStarted = started; }
|
121
|
+
|
122
|
+
synchronized
|
123
|
+
public static boolean isRhodesActivityStarted() { return sRhodesActivityStarted; }
|
117
124
|
|
118
125
|
private static int mGeoLocationInactivityTimeout;
|
119
126
|
|
@@ -128,8 +135,61 @@ public class RhodesService extends Service {
|
|
128
135
|
|
129
136
|
private boolean mNeedGeoLocationRestart = false;
|
130
137
|
|
131
|
-
|
132
|
-
|
138
|
+
class PowerWakeLock {
|
139
|
+
private PowerManager.WakeLock wakeLockObject = null;
|
140
|
+
private boolean wakeLockEnabled = false;
|
141
|
+
|
142
|
+
synchronized boolean isHeld() {
|
143
|
+
return (wakeLockObject != null) && wakeLockObject.isHeld();
|
144
|
+
}
|
145
|
+
synchronized boolean acquire(boolean enable) {
|
146
|
+
if (enable) {
|
147
|
+
Logger.I(TAG, "Enable WakeLock");
|
148
|
+
wakeLockEnabled = true;
|
149
|
+
}
|
150
|
+
if (wakeLockEnabled) {
|
151
|
+
if (wakeLockObject == null) {
|
152
|
+
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
|
153
|
+
if (pm != null) {
|
154
|
+
Logger.I(TAG, "Acquire WakeLock");
|
155
|
+
wakeLockObject = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, TAG);
|
156
|
+
wakeLockObject.setReferenceCounted(false);
|
157
|
+
wakeLockObject.acquire();
|
158
|
+
}
|
159
|
+
else {
|
160
|
+
Logger.E(TAG, "Can not get PowerManager to acquire WakeLock!!!");
|
161
|
+
}
|
162
|
+
return false;
|
163
|
+
}
|
164
|
+
//return wakeLockObject.isHeld();
|
165
|
+
return true;
|
166
|
+
}
|
167
|
+
return false;
|
168
|
+
}
|
169
|
+
synchronized boolean release()
|
170
|
+
{
|
171
|
+
if (wakeLockObject != null) {
|
172
|
+
Logger.I(TAG, "Release WakeLock");
|
173
|
+
wakeLockObject.release();
|
174
|
+
wakeLockObject = null;
|
175
|
+
return true;
|
176
|
+
}
|
177
|
+
return false;
|
178
|
+
}
|
179
|
+
|
180
|
+
synchronized boolean reset() {
|
181
|
+
if (wakeLockObject != null) {
|
182
|
+
Logger.I(TAG, "Reset WakeLock");
|
183
|
+
wakeLockObject.release();
|
184
|
+
wakeLockObject = null;
|
185
|
+
wakeLockEnabled = false;
|
186
|
+
return true;
|
187
|
+
}
|
188
|
+
return false;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
private PowerWakeLock wakeLock = new PowerWakeLock();
|
133
193
|
|
134
194
|
private Vector<UriHandler> mUriHandlers = new Vector<UriHandler>();
|
135
195
|
|
@@ -152,9 +212,6 @@ public class RhodesService extends Service {
|
|
152
212
|
|
153
213
|
private native void initClassLoader(ClassLoader c);
|
154
214
|
|
155
|
-
private native void createRhodesApp();
|
156
|
-
private native void startRhodesApp();
|
157
|
-
|
158
215
|
public native void doSyncAllSources(boolean v);
|
159
216
|
public native void doSyncSource(String source);
|
160
217
|
|
@@ -179,15 +236,14 @@ public class RhodesService extends Service {
|
|
179
236
|
|
180
237
|
public static native boolean isOnStartPage();
|
181
238
|
|
182
|
-
public static native boolean canStartApp(String strCmdLine, String strSeparators);
|
183
|
-
|
184
239
|
public static RhodesService getInstance() {
|
185
240
|
return sInstance;
|
186
241
|
}
|
187
242
|
|
188
|
-
public static native boolean
|
243
|
+
public static native boolean isTitleEnabled();
|
189
244
|
|
190
245
|
|
246
|
+
// TODO: Move these methods to RhodesApplication class
|
191
247
|
private void initRootPath() {
|
192
248
|
ApplicationInfo appInfo = getAppInfo();
|
193
249
|
String dataDir = appInfo.dataDir;
|
@@ -216,6 +272,7 @@ public class RhodesService extends Service {
|
|
216
272
|
return mRootPath;
|
217
273
|
}
|
218
274
|
|
275
|
+
// TODO: Move these methods to RhodesApplication class
|
219
276
|
private ApplicationInfo getAppInfo() {
|
220
277
|
Context context = this;
|
221
278
|
String pkgName = context.getPackageName();
|
@@ -288,7 +345,7 @@ public class RhodesService extends Service {
|
|
288
345
|
}
|
289
346
|
}
|
290
347
|
|
291
|
-
|
348
|
+
RhodesApplication.create();
|
292
349
|
|
293
350
|
RhodesActivity ra = RhodesActivity.getInstance();
|
294
351
|
if (ra != null) {
|
@@ -335,33 +392,10 @@ public class RhodesService extends Service {
|
|
335
392
|
mUriHandlers.addElement(new SmsUriHandler(context));
|
336
393
|
mUriHandlers.addElement(new VideoUriHandler(context));
|
337
394
|
|
338
|
-
getRhodesApplication().addOnExitHandler(new Runnable() {
|
339
|
-
public void run() {
|
340
|
-
PerformOnUiThread.exec( new Runnable() {
|
341
|
-
public void run() {
|
342
|
-
if (wakeLockObject != null) {
|
343
|
-
wakeLockObject.release();
|
344
|
-
wakeLockObject = null;
|
345
|
-
wakeLockEnabled = false;
|
346
|
-
}
|
347
|
-
}
|
348
|
-
}, false);
|
349
|
-
}
|
350
|
-
});
|
351
|
-
|
352
395
|
try {
|
353
396
|
if (Capabilities.PUSH_ENABLED) {
|
354
|
-
|
355
|
-
|
356
|
-
getRhodesApplication().addOnExitHandler(new Runnable() {
|
357
|
-
public void run() {
|
358
|
-
try {
|
359
|
-
PushService.unregister();
|
360
|
-
} catch (IllegalAccessException e) {
|
361
|
-
Log.e(TAG, e.getMessage());
|
362
|
-
}
|
363
|
-
}
|
364
|
-
});
|
397
|
+
if (getPushRegistrationId().length() == 0)
|
398
|
+
PushService.register();
|
365
399
|
}
|
366
400
|
} catch (IllegalAccessException e) {
|
367
401
|
Log.e(TAG, e.getMessage());
|
@@ -369,7 +403,7 @@ public class RhodesService extends Service {
|
|
369
403
|
return;
|
370
404
|
}
|
371
405
|
|
372
|
-
|
406
|
+
RhodesApplication.start();
|
373
407
|
|
374
408
|
if (sActivitiesActive > 0)
|
375
409
|
handleAppActivation();
|
@@ -407,10 +441,11 @@ public class RhodesService extends Service {
|
|
407
441
|
|
408
442
|
@Override
|
409
443
|
public void onDestroy() {
|
410
|
-
|
444
|
+
|
445
|
+
if(DEBUG)
|
411
446
|
Log.d(TAG, "+++ onDestroy");
|
412
447
|
sInstance = null;
|
413
|
-
|
448
|
+
RhodesApplication.stop();
|
414
449
|
}
|
415
450
|
|
416
451
|
@Override
|
@@ -454,7 +489,7 @@ public class RhodesService extends Service {
|
|
454
489
|
String id = intent.getStringExtra(PushReceiver.INTENT_REGISTRATION_ID);
|
455
490
|
if (id == null)
|
456
491
|
throw new IllegalArgumentException("Empty registration id received in service command");
|
457
|
-
Logger.
|
492
|
+
Logger.I(TAG, "Received PUSH registration id: " + id);
|
458
493
|
setPushRegistrationId(id);
|
459
494
|
break;
|
460
495
|
case PushReceiver.INTENT_TYPE_MESSAGE:
|
@@ -536,12 +571,24 @@ public class RhodesService extends Service {
|
|
536
571
|
return ra.getMainView();
|
537
572
|
}
|
538
573
|
|
539
|
-
public RhodesApplication getRhodesApplication() {
|
540
|
-
return (RhodesApplication)getApplication();
|
541
|
-
}
|
542
|
-
|
543
574
|
public static void exit() {
|
544
|
-
|
575
|
+
try {
|
576
|
+
RhodesActivity activity = RhodesActivity.getInstance();
|
577
|
+
if (activity != null)
|
578
|
+
activity.finish();
|
579
|
+
|
580
|
+
RhodesService service = RhodesService.getInstance();
|
581
|
+
if (service != null)
|
582
|
+
{
|
583
|
+
service.wakeLock.reset();
|
584
|
+
service.stopSelf();
|
585
|
+
}
|
586
|
+
|
587
|
+
RhodesApplication.stop();
|
588
|
+
}
|
589
|
+
catch (Exception e) {
|
590
|
+
Logger.E(TAG, e.getMessage());
|
591
|
+
}
|
545
592
|
}
|
546
593
|
|
547
594
|
public void rereadScreenProperties() {
|
@@ -1087,6 +1134,7 @@ public class RhodesService extends Service {
|
|
1087
1134
|
}
|
1088
1135
|
|
1089
1136
|
private native void setPushRegistrationId(String id);
|
1137
|
+
private native String getPushRegistrationId();
|
1090
1138
|
|
1091
1139
|
private native boolean callPushCallback(String data);
|
1092
1140
|
|
@@ -1176,79 +1224,38 @@ public class RhodesService extends Service {
|
|
1176
1224
|
}
|
1177
1225
|
|
1178
1226
|
private void restoreWakeLockIfNeeded() {
|
1179
|
-
|
1180
|
-
public void run() {
|
1181
|
-
if (wakeLockEnabled) {
|
1182
|
-
if (wakeLockObject == null) {
|
1183
|
-
PowerManager pm = (PowerManager)getSystemService(Context.POWER_SERVICE);
|
1184
|
-
if (pm != null) {
|
1185
|
-
Logger.I(TAG, "activityStarted() restore wakeLock object");
|
1186
|
-
wakeLockObject = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, TAG);
|
1187
|
-
wakeLockObject.acquire();
|
1188
|
-
}
|
1189
|
-
else {
|
1190
|
-
Logger.E(TAG, "activityStarted() - Can not get PowerManager !!!");
|
1191
|
-
}
|
1192
|
-
}
|
1193
|
-
}
|
1194
|
-
}
|
1195
|
-
}, false);
|
1227
|
+
wakeLock.acquire(false);
|
1196
1228
|
}
|
1197
1229
|
|
1198
1230
|
private void stopWakeLock() {
|
1199
|
-
|
1200
|
-
|
1201
|
-
if (wakeLockObject != null) {
|
1202
|
-
Logger.I(TAG, "activityStopped() temporary destroy wakeLock object");
|
1203
|
-
wakeLockObject.release();
|
1204
|
-
wakeLockObject = null;
|
1205
|
-
}
|
1206
|
-
}
|
1207
|
-
}, false);
|
1231
|
+
Logger.I(TAG, "activityStopped() temporary release wakeLock object");
|
1232
|
+
wakeLock.release();
|
1208
1233
|
}
|
1209
1234
|
|
1210
1235
|
public static int rho_sys_set_sleeping(int enable) {
|
1211
1236
|
Logger.I(TAG, "rho_sys_set_sleeping("+enable+")");
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
PerformOnUiThread.exec( new Runnable() {
|
1231
|
-
public void run() {
|
1232
|
-
if (wakeLockObject == null) {
|
1233
|
-
getInstance();
|
1234
|
-
PowerManager pm = (PowerManager)RhodesService.getContext().getSystemService(Context.POWER_SERVICE);
|
1235
|
-
if (pm != null) {
|
1236
|
-
wakeLockObject = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, TAG);
|
1237
|
-
wakeLockObject.acquire();
|
1238
|
-
wakeLockEnabled = true;
|
1239
|
-
}
|
1240
|
-
else {
|
1241
|
-
Logger.E(TAG, "rho_sys_set_sleeping() - Can not get PowerManager !!!");
|
1242
|
-
}
|
1243
|
-
}
|
1244
|
-
}
|
1245
|
-
}, false);
|
1237
|
+
RhodesService rs = RhodesService.getInstance();
|
1238
|
+
int wasEnabled = rs.wakeLock.isHeld() ? 1 : 0;
|
1239
|
+
if(rs != null)
|
1240
|
+
{
|
1241
|
+
|
1242
|
+
if (enable != 0) {
|
1243
|
+
// disable lock device
|
1244
|
+
wasEnabled = rs.wakeLock.reset() ? 1 : 0;
|
1245
|
+
}
|
1246
|
+
else {
|
1247
|
+
// lock device from sleep
|
1248
|
+
PerformOnUiThread.exec(new Runnable() {
|
1249
|
+
public void run() {
|
1250
|
+
RhodesService rs = RhodesService.getInstance();
|
1251
|
+
if(rs != null) rs.wakeLock.acquire(true);
|
1252
|
+
else Logger.E(TAG, "rho_sys_set_sleeping() - No RhodesService has initialized !!!"); }
|
1253
|
+
}, false);
|
1254
|
+
}
|
1246
1255
|
}
|
1247
1256
|
return wasEnabled;
|
1248
1257
|
}
|
1249
1258
|
|
1250
|
-
|
1251
|
-
|
1252
1259
|
private void handleAppActivation() {
|
1253
1260
|
if (DEBUG)
|
1254
1261
|
Log.d(TAG, "handle app activation");
|