conflict_resolution
stringlengths
27
16k
<<<<<<< import io.datakernel.bytebuf.ByteBufStrings; import io.datakernel.csp.ChannelConsumer; import io.datakernel.csp.ChannelOutput; import io.datakernel.csp.ChannelSupplier; import io.datakernel.csp.ChannelSuppliers; import io.datakernel.csp.binary.BinaryChannelSupplier; ======= >>>>>>> import io.datakernel.csp.ChannelConsumer; import io.datakernel.csp.ChannelOutput; import io.datakernel.csp.ChannelSupplier; import io.datakernel.csp.ChannelSuppliers; import io.datakernel.csp.binary.BinaryChannelSupplier; <<<<<<< import static java.lang.Math.max; public abstract class AbstractHttpConnection { public static final AsyncTimeoutException READ_TIMEOUT_ERROR = new AsyncTimeoutException(AbstractHttpConnection.class, "Read timeout"); public static final AsyncTimeoutException WRITE_TIMEOUT_ERROR = new AsyncTimeoutException(AbstractHttpConnection.class, "Write timeout"); public static final ParseException HEADER_NAME_ABSENT = new ParseException(AbstractHttpConnection.class, "Header name is absent"); public static final ParseException TOO_LONG_HEADER = new ParseException(AbstractHttpConnection.class, "Header line exceeds max header size"); public static final ParseException TOO_MANY_HEADERS = new ParseException(AbstractHttpConnection.class, "Too many headers"); public static final ParseException INCOMPLETE_MESSAGE = new ParseException(AbstractHttpConnection.class, "Incomplete HTTP message"); public static final ParseException UNEXPECTED_READ = new ParseException(AbstractHttpConnection.class, "Unexpected read data"); ======= import static io.datakernel.http.HttpUtils.decodeUnsignedInt; >>>>>>> import static io.datakernel.http.HttpUtils.decodeUnsignedInt; import static java.lang.Math.max; public abstract class AbstractHttpConnection { public static final AsyncTimeoutException READ_TIMEOUT_ERROR = new AsyncTimeoutException(AbstractHttpConnection.class, "Read timeout"); public static final AsyncTimeoutException WRITE_TIMEOUT_ERROR = new AsyncTimeoutException(AbstractHttpConnection.class, "Write timeout"); public static final ParseException HEADER_NAME_ABSENT = new ParseException(AbstractHttpConnection.class, "Header name is absent"); public static final ParseException TOO_LONG_HEADER = new ParseException(AbstractHttpConnection.class, "Header line exceeds max header size"); public static final ParseException TOO_MANY_HEADERS = new ParseException(AbstractHttpConnection.class, "Too many headers"); public static final ParseException INCOMPLETE_MESSAGE = new ParseException(AbstractHttpConnection.class, "Incomplete HTTP message"); public static final ParseException UNEXPECTED_READ = new ParseException(AbstractHttpConnection.class, "Unexpected read data"); <<<<<<< contentLength = ByteBufStrings.decodeDecimal(value.array(), value.readPosition(), value.readRemaining()); ======= contentLength = decodeUnsignedInt(value.array(), value.readPosition(), value.readRemaining()); if (contentLength > maxHttpMessageSize) { value.recycle(); throw TOO_BIG_HTTP_MESSAGE; } >>>>>>> contentLength = decodeUnsignedInt(value.array(), value.readPosition(), value.readRemaining());
<<<<<<< client.downloadSerial(FILE) .streamTo(SerialFileWriter.create(executor, clientStorage.resolve(FILE))) .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(CONTENT, Files.readAllBytes(clientStorage.resolve(FILE))))); ======= client.downloadSerial(FILE).streamTo(SerialFileWriter.create(executor, clientStorage.resolve(FILE))) .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals(CONTENT, Files.readAllBytes(clientStorage.resolve(FILE))); >>>>>>> client.downloadSerial(FILE) .streamTo(SerialFileWriter.create(executor, clientStorage.resolve(FILE))) .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(CONTENT, Files.readAllBytes(clientStorage.resolve(FILE))))); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(data, Files.readAllBytes(serverStorage.resolve("test_big_file.bin"))))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals(data, Files.readAllBytes(serverStorage.resolve("test_big_file.bin"))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(data, Files.readAllBytes(serverStorage.resolve("test_big_file.bin"))))); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals("test content".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals("test content".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals("test content".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))))); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals("of the file".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals("of the file".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals("of the file".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))))); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals("content of".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals("content of".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals("content of".getBytes(UTF_8), Files.readAllBytes(clientStorage.resolve(FILE))))); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(updated.getBytes(UTF_8), Files.readAllBytes(path)))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals(updated.getBytes(UTF_8), Files.readAllBytes(path)); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(updated.getBytes(UTF_8), Files.readAllBytes(path))));
<<<<<<< import org.jetbrains.annotations.Async; ======= import io.global.ot.server.ValidatingGlobalOTNode; >>>>>>> import org.jetbrains.annotations.Async; import io.global.ot.server.ValidatingGlobalOTNode; <<<<<<< @Named("fs") AsyncServlet provideGlobalFsServlet(GlobalFsNodeImpl node) { ======= GlobalFsNodeServlet provideGlobalFsServlet(GlobalFsNode node) { >>>>>>> @Named("fs") AsyncServlet provideGlobalFsServlet(GlobalFsNode node) { <<<<<<< @Named("kv") AsyncServlet provideGlobalDbServlet(LocalGlobalKvNode node) { ======= GlobalKvNodeServlet provideGlobalDbServlet(GlobalKvNode node) { >>>>>>> @Named("kv") AsyncServlet provideGlobalDbServlet(GlobalKvNode node) {
<<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))))); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> { for (int i = 0; i < files; i++) { assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve("file" + i))); } })); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); for (int i = 0; i < files; i++) { assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve("file" + i))); } >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> { for (int i = 0; i < files; i++) { assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve("file" + i))); } })); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(BIG_FILE, Files.readAllBytes(storage.resolve(resultFile))))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals(BIG_FILE, Files.readAllBytes(storage.resolve(resultFile))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(BIG_FILE, Files.readAllBytes(storage.resolve(resultFile))))); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))))); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertFailure(RemoteFsException.class, "FileAlreadyExistsException")) .whenComplete(asserting(($, e) -> { assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))); })); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertFailure(RemoteFsException.class, "FileAlreadyExistsException")); eventloop.run(); assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertFailure(RemoteFsException.class, "FileAlreadyExistsException")) .whenComplete(asserting(($, e) -> { assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve(resultFile))); })); <<<<<<< private Promise<ByteBuf> download(String file) { return client.download(file) .thenCompose(supplier -> supplier.toCollector(ByteBufQueue.collector())) .whenComplete(($, err) -> server.close()); ======= private ByteBuf download(String file) { ByteBufQueue queue = new ByteBufQueue(); client.downloadSerial(file) .streamTo(SerialConsumer.of(AsyncConsumer.of(queue::add))) .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); return queue.takeRemaining(); >>>>>>> private Promise<ByteBuf> download(String file) { return client.download(file) .thenCompose(supplier -> supplier.toCollector(ByteBufQueue.collector())) .whenComplete(($, e) -> server.close()); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> { for (int i = 0; i < tasks.size(); i++) { assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve("file" + i))); } })); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); for (int i = 0; i < tasks.size(); i++) { assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve("file" + i))); } >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> { for (int i = 0; i < tasks.size(); i++) { assertArrayEquals(CONTENT, Files.readAllBytes(storage.resolve("file" + i))); } })); <<<<<<< .whenComplete(($, err) -> server.close()) .whenComplete(assertComplete($ -> assertFalse(Files.exists(storage.resolve(file))))); ======= .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete()); eventloop.run(); assertFalse(Files.exists(storage.resolve(file))); >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete($ -> assertFalse(Files.exists(storage.resolve(file))))); <<<<<<< .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete(list -> assertEquals(expected, list.stream() .map(FileMetadata::getFilename) .collect(toSet())))); ======= .whenComplete((list, e) -> { if (e == null) { assert list != null; actual.addAll(list); } server.close(); }); eventloop.run(); Comparator<FileMetadata> comparator = Comparator.comparing(FileMetadata::getFilename); actual.sort(comparator); expected.sort(comparator); assertEquals(expected.size(), actual.size()); for (int i = 0; i < expected.size(); i++) { assertTrue(expected.get(i).equalsIgnoringTimestamp(actual.get(i))); } >>>>>>> .whenComplete(($, e) -> server.close()) .whenComplete(assertComplete(list -> assertEquals(expected, list.stream() .map(FileMetadata::getFilename) .collect(toSet())))); <<<<<<< Set<String> expected1 = new HashSet<>(); expected1.add("file1.txt"); expected1.add("first file.txt"); ======= List<FileMetadata> expected = new ArrayList<>(); expected.add(new FileMetadata("file1.txt", 7, 0)); expected.add(new FileMetadata("first file.txt", 7, 0)); List<FileMetadata> expected2 = new ArrayList<>(expected); expected2.add(new FileMetadata("subsubfolder/file1.txt", 7, 0)); expected2.add(new FileMetadata("subsubfolder/first file.txt", 7, 0)); List<FileMetadata> actual = new ArrayList<>(); List<FileMetadata> actual2 = new ArrayList<>(); Promises.all(client.subfolder("subfolder1").list().whenResult(actual::addAll), client.subfolder("subfolder2").list().whenResult(actual2::addAll)).whenComplete(($, e) -> server.close()); >>>>>>> Set<String> expected1 = new HashSet<>(); expected1.add("file1.txt"); expected1.add("first file.txt");
<<<<<<< import java.time.LocalDateTime; ======= import java.util.ArrayList; import java.util.Date; >>>>>>> import java.time.LocalDateTime; <<<<<<< private final LocalDateTime _created; private LocalDateTime _modified; private LocalDateTime written = null; private String _name = ""; private String _password = ""; ======= private final Date _created; private Date _modified; private Date written = null; private String _name = ""; private String _password = ""; private String _encoding = ""; private int _encodingConfidence; private String[] _tags = new String[0]; >>>>>>> private final LocalDateTime _created; private LocalDateTime _modified; private LocalDateTime written = null; private String _name = ""; private String _password = ""; private String _encoding = ""; private int _encodingConfidence; private String[] _tags = new String[0]; <<<<<<< private JSONArray _userMetadata = new JSONArray(); private Map<String, Serializable> _customMetadata = new HashMap<String, Serializable>(); private PreferenceStore _preferenceStore = new PreferenceStore(); ======= private JSONArray _userMetadata = new JSONArray();; private Map<String, Serializable> _customMetadata = new HashMap<String, Serializable>(); private PreferenceStore _preferenceStore = new PreferenceStore(); >>>>>>> private JSONArray _userMetadata = new JSONArray(); private Map<String, Serializable> _customMetadata = new HashMap<String, Serializable>(); private PreferenceStore _preferenceStore = new PreferenceStore(); private Map<String, Serializable> _customMetadata = new HashMap<String, Serializable>(); private PreferenceStore _preferenceStore = new PreferenceStore(); <<<<<<< writer.key("name"); writer.value(_name); writer.key("created"); writer.value(ParsingUtilities.localDateToString(_created)); writer.key("modified"); writer.value(ParsingUtilities.localDateToString(_modified)); writer.key("creator"); writer.value(_creator); writer.key("contributors"); writer.value(_contributors); writer.key("subject"); writer.value(_subject); writer.key("description"); writer.value(_description); writer.key("rowCount"); writer.value(_rowCount); writer.key("customMetadata"); writer.object(); ======= writer.key("name"); writer.value(_name); writer.key("tags"); writer.array(); for (String tag : _tags) { writer.value(tag); } writer.endArray(); writer.key("created"); writer.value(ParsingUtilities.dateToString(_created)); writer.key("modified"); writer.value(ParsingUtilities.dateToString(_modified)); writer.key("creator"); writer.value(_creator); writer.key("contributors"); writer.value(_contributors); writer.key("subject"); writer.value(_subject); writer.key("description"); writer.value(_description); writer.key("rowCount"); writer.value(_rowCount); writer.key("customMetadata"); writer.object(); >>>>>>> writer.key("name"); writer.value(_name); writer.key("tags"); writer.array(); for (String tag : _tags) { writer.value(tag); } writer.endArray(); writer.key("creator"); writer.value(_creator); writer.key("contributors"); writer.value(_contributors); writer.key("subject"); writer.value(_subject); writer.key("description"); writer.value(_description); writer.key("rowCount"); writer.value(_rowCount); writer.key("customMetadata"); writer.object(); writer.key("created"); writer.value(ParsingUtilities.localDateToString(_created)); writer.key("modified"); writer.value(ParsingUtilities.localDateToString(_modified)); <<<<<<< // TODO: Is this correct? It's using modified date for creation date ProjectMetadata pm = new ProjectMetadata(JSONUtilities.getLocalDate(obj, "modified", LocalDateTime.now())); ======= // TODO: Is this correct? It's using modified date for creation date ProjectMetadata pm = new ProjectMetadata(JSONUtilities.getDate(obj, "modified", new Date())); >>>>>>> // TODO: Is this correct? It's using modified date for creation date ProjectMetadata pm = new ProjectMetadata(JSONUtilities.getLocalDate(obj, "modified", LocalDateTime.now())); <<<<<<< } pm.written = LocalDateTime.now(); // Mark it as not needing writing until modified ======= } pm.written = new Date(); // Mark it as not needing writing until modified >>>>>>> } pm.written = LocalDateTime.now(); // Mark it as not needing writing until modified
<<<<<<< setState(State.CLOSED); xaConnection.close(); ======= setState(STATE_CLOSED); try { xaConnection.close(); } finally { xaConnection = null; } >>>>>>> setState(State.CLOSED); try { xaConnection.close(); } finally { xaConnection = null; }
<<<<<<< long before = MonotonicClock.currentTimeMillis(); long remainingTimeMs = bean.getAcquisitionTimeout() * 1000L; ======= long remainingTime = bean.getAcquisitionTimeout() * 1000L; >>>>>>> long remainingTimeMs = bean.getAcquisitionTimeout() * 1000L;
<<<<<<< import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.SQLWarning; import java.sql.Savepoint; import java.sql.Statement; import java.util.Map; ======= import bitronix.tm.resource.jdbc.BaseProxyHandlerClass; >>>>>>> import java.sql.CallableStatement;
<<<<<<< import java.util.Date; import java.util.HashMap; ======= >>>>>>> import java.util.Date; import java.util.HashMap; <<<<<<< // private static final String TAG = "MyFirebaseMessagingServ"; private static final Map<String, Integer> msgIdMap = new HashMap<>(); public static int isQqOnline = 1; public static int isWxOnline = 1; ======= private SharedPreferences mySettings; >>>>>>> private SharedPreferences mySettings; <<<<<<< ======= >>>>>>> <<<<<<< // Looper.prepare(); // Toast.makeText(getApplicationContext(), remoteMessage.getData().get("title"), Toast.LENGTH_LONG).show(); // Looper.loop(); ======= >>>>>>> <<<<<<< ======= int isQqOnline = MyApplication.getInstance().getIsQqOnline(); int isWxOnline = MyApplication.getInstance().getIsWxOnline(); >>>>>>> int isQqOnline = MyApplication.getInstance().getIsQqOnline(); int isWxOnline = MyApplication.getInstance().getIsWxOnline(); <<<<<<< long time = new Date().getTime(); long paused_time = getSharedPreferences("paused_time", MODE_PRIVATE).getLong("paused_time", 0); if (!Settings.getBoolean("check_box_preference_qq", false)) ======= if (!mySettings.getBoolean("check_box_preference_qq", false)) >>>>>>> if (!mySettings.getBoolean("check_box_preference_qq", false)) <<<<<<< //通知按钮 // if (qqIsReply) // { Intent intentReply = new Intent(this, DialogActivity.class); intentReply.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Bundle msgDialogBundle = new Bundle(); msgDialogBundle.putString("msgId", msgId); // msgDialogBundle.putString("qqReplyUrl",qqReplyUrl); msgDialogBundle.putString("senderType", senderType); msgDialogBundle.putString("msgType", QQ); msgDialogBundle.putString("msgTitle", msgTitle); msgDialogBundle.putString("msgBody", msgBody); msgDialogBundle.putInt("notifyId", notifyId); msgDialogBundle.putString("msgTime", getCurTime()); msgDialogBundle.putString("qqPackgeName", qqPackgeName); intentReply.putExtras(msgDialogBundle); PendingIntent pendingIntentReply = PendingIntent.getActivity(this, notifyId, intentReply, PendingIntent.FLAG_UPDATE_CURRENT); notificationBuilder.addAction(0, "列表", pendingIntent); notificationBuilder.addAction(0, "清除", pendingIntentCancel); notificationBuilder.addAction(0, "暂停", pendingIntentPause); // } ======= Intent intentDialog = new Intent(this, DialogActivity.class); intentDialog.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Bundle msgDialogBundle = new Bundle(); msgDialogBundle.putString("msgId", msgId); msgDialogBundle.putString("senderType", senderType); msgDialogBundle.putString("msgType", QQ); msgDialogBundle.putString("msgTitle", msgTitle); msgDialogBundle.putString("msgBody", msgBody); msgDialogBundle.putInt("notifyId", notifyId); msgDialogBundle.putString("msgTime", getCurTime()); msgDialogBundle.putString("qqPackgeName", qqPackgeName); intentDialog.putExtras(msgDialogBundle); PendingIntent pendingIntentDialog = PendingIntent.getActivity(this, notifyId, intentDialog, PendingIntent.FLAG_UPDATE_CURRENT); notificationBuilder.addAction(0, "列表", pendingIntentList); notificationBuilder.addAction(0, "清除", pendingIntentCancel); >>>>>>> Intent intentDialog = new Intent(this, DialogActivity.class); intentDialog.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Bundle msgDialogBundle = new Bundle(); msgDialogBundle.putString("msgId", msgId); msgDialogBundle.putString("senderType", senderType); msgDialogBundle.putString("msgType", QQ); msgDialogBundle.putString("msgTitle", msgTitle); msgDialogBundle.putString("msgBody", msgBody); msgDialogBundle.putInt("notifyId", notifyId); msgDialogBundle.putString("msgTime", getCurTime()); msgDialogBundle.putString("qqPackgeName", qqPackgeName); intentDialog.putExtras(msgDialogBundle); PendingIntent pendingIntentDialog = PendingIntent.getActivity(this, notifyId, intentDialog, PendingIntent.FLAG_UPDATE_CURRENT); notificationBuilder.addAction(0, "列表", pendingIntent); notificationBuilder.addAction(0, "清除", pendingIntentCancel); notificationBuilder.addAction(0, "暂停", pendingIntentPause); // } <<<<<<< // if (wxIsReply) // { Intent intentReply = new Intent(this, DialogActivity.class); intentReply.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Bundle msgDialogBundle = new Bundle(); msgDialogBundle.putString("msgId", msgId); // msgDialogBundle.putString("wxReplyUrl",wxReplyUrl); msgDialogBundle.putString("senderType", senderType); msgDialogBundle.putString("msgType", WEIXIN); msgDialogBundle.putString("msgTitle", msgTitle); msgDialogBundle.putString("msgBody", msgBody); msgDialogBundle.putInt("notifyId", notifyId); msgDialogBundle.putString("msgTime", getCurTime()); msgDialogBundle.putString("wxPackgeName", wxPackgeName); intentReply.putExtras(msgDialogBundle); PendingIntent pendingIntentReply = PendingIntent.getActivity(this, notifyId, intentReply, PendingIntent.FLAG_UPDATE_CURRENT); notificationBuilder.addAction(0, "列表", pendingIntent); notificationBuilder.addAction(0, "清除", pendingIntentCancel); // } ======= Intent intentDialog = new Intent(this, DialogActivity.class); intentDialog.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Bundle msgDialogBundle = new Bundle(); msgDialogBundle.putString("msgId", msgId); // msgDialogBundle.putString("wxReplyUrl",wxReplyUrl); msgDialogBundle.putString("senderType", senderType); msgDialogBundle.putString("msgType", WEIXIN); msgDialogBundle.putString("msgTitle", msgTitle); msgDialogBundle.putString("msgBody", msgBody); msgDialogBundle.putInt("notifyId", notifyId); msgDialogBundle.putString("msgTime", getCurTime()); msgDialogBundle.putString("wxPackgeName", wxPackgeName); intentDialog.putExtras(msgDialogBundle); PendingIntent pendingIntentDialog = PendingIntent.getActivity(this, notifyId, intentDialog, PendingIntent.FLAG_UPDATE_CURRENT); notificationBuilder.addAction(0, "列表", pendingIntentList); notificationBuilder.addAction(0, "清除", pendingIntentCancel); >>>>>>> Intent intentDialog = new Intent(this, DialogActivity.class); intentDialog.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Bundle msgDialogBundle = new Bundle(); msgDialogBundle.putString("msgId", msgId); // msgDialogBundle.putString("wxReplyUrl",wxReplyUrl); msgDialogBundle.putString("senderType", senderType); msgDialogBundle.putString("msgType", WEIXIN); msgDialogBundle.putString("msgTitle", msgTitle); msgDialogBundle.putString("msgBody", msgBody); msgDialogBundle.putInt("notifyId", notifyId); msgDialogBundle.putString("msgTime", getCurTime()); msgDialogBundle.putString("wxPackgeName", wxPackgeName); intentDialog.putExtras(msgDialogBundle); PendingIntent pendingIntentDialog = PendingIntent.getActivity(this, notifyId, intentDialog, PendingIntent.FLAG_UPDATE_CURRENT); notificationBuilder.addAction(0, "列表", pendingIntentList); notificationBuilder.addAction(0, "清除", pendingIntentCancel); <<<<<<< */ // return fileName; ======= // return fileName; >>>>>>> // return fileName;
<<<<<<< private static final Logger LOGGER = Loggers.get(CoverageSensor.class); @Override public void describe(SensorDescriptor descriptor) { descriptor.name("Go Coverage").onlyOnFileType(InputFile.Type.MAIN).onlyOnLanguage(GoLanguage.KEY); } public Stream<Path> createStream(SensorContext context) throws IOException { return Files.walk(Paths.get(context.fileSystem().baseDir().getPath())) .filter(p -> !p.getFileName().toString().startsWith(".")); } @Override public void execute(SensorContext context) { try (Stream<Path> paths = createStream(context)) { paths.forEach(filePath -> { if (Files.isDirectory(filePath)) { final String reportPath = context.settings().getString(GoProperties.COVERAGE_REPORT_PATH_KEY); final File f = new File(filePath + File.separator + reportPath); if (f.exists()) { LOGGER.info("Analyse for " + f.getPath()); final CoverageParser coverParser = new CoverageParser(context); try { coverParser.parse(f.getPath()); save(context, coverParser.getCoveragePerFile()); } catch (ParserConfigurationException | SAXException | IOException e) { LOGGER.error("Exception: ", e); } } else { LOGGER.info("no coverage file in package " + f.getPath()); } } }); } catch (final IOException e) { LOGGER.error("IO Exception " + context.fileSystem().baseDir().getPath()); } } public static void save(SensorContext context, Map<String, List<LineCoverage>> coveragePerFile) { for (Map.Entry<String, List<LineCoverage>> entry : coveragePerFile.entrySet()) { final String filePath = entry.getKey(); final List<LineCoverage> lines = entry.getValue(); final FileSystem fileSystem = context.fileSystem(); final FilePredicates predicates = fileSystem.predicates(); final String key = filePath.startsWith(File.separator) ? filePath : File.separator + filePath; final InputFile inputFile = fileSystem.inputFile( predicates.and(predicates.matchesPathPattern("file:**" + key.replace(File.separator, "/")), predicates.hasType(InputFile.Type.MAIN), predicates.hasLanguage(GoLanguage.KEY))); if (inputFile == null) { LOGGER.warn("unable to create InputFile object: " + filePath); return; ======= private static final Logger LOGGER = Loggers.get(CoverageSensor.class); @Override public void describe(SensorDescriptor descriptor) { descriptor.name("Go Coverage").onlyOnFileType(InputFile.Type.MAIN).onlyOnLanguage(GoLanguage.KEY); } public Stream<Path> createStream(SensorContext context) throws IOException { final String fullPath = context.fileSystem().baseDir().getPath(); return Files.walk(Paths.get(fullPath)) .filter(p -> !p.getParent().toString().contains(".git") && !p.getParent().toString().contains(".sonar") && !p.getParent().toString().contains(".scannerwork") && !p.getFileName().toString().startsWith(".")); } @Override public void execute(SensorContext context) { try (Stream<Path> paths = createStream(context)) { paths.forEach(filePath -> { if (Files.isDirectory(filePath)) { final String reportPath = context.settings().getString(GoProperties.COVERAGE_REPORT_PATH_KEY); final File f = new File(filePath + File.separator + reportPath); if (f.exists()) { LOGGER.info("Analyse for " + f.getPath()); final CoverageParser coverParser = new CoverageParser(context); try { coverParser.parse(f.getPath()); save(context, coverParser.getCoveragePerFile()); } catch (ParserConfigurationException | SAXException | IOException e) { LOGGER.error("Exception: ", e); >>>>>>> private static final Logger LOGGER = Loggers.get(CoverageSensor.class); @Override public void describe(SensorDescriptor descriptor) { descriptor.name("Go Coverage").onlyOnFileType(InputFile.Type.MAIN).onlyOnLanguage(GoLanguage.KEY); } public Stream<Path> createStream(SensorContext context) throws IOException { final String fullPath = context.fileSystem().baseDir().getPath(); return Files.walk(Paths.get(fullPath)) .filter(p -> !p.getParent().toString().contains(".git") && !p.getParent().toString().contains(".sonar") && !p.getParent().toString().contains(".scannerwork") && !p.getFileName().toString().startsWith(".")); } @Override public void execute(SensorContext context) { try (Stream<Path> paths = createStream(context)) { paths.forEach(filePath -> { if (Files.isDirectory(filePath)) { final String reportPath = context.settings().getString(GoProperties.COVERAGE_REPORT_PATH_KEY); final File f = new File(filePath + File.separator + reportPath); if (f.exists()) { LOGGER.info("Analyse for " + f.getPath()); final CoverageParser coverParser = new CoverageParser(context); try { coverParser.parse(f.getPath()); save(context, coverParser.getCoveragePerFile()); } catch (ParserConfigurationException | SAXException | IOException e) { LOGGER.error("Exception: ", e); } } else { LOGGER.info("no coverage file in package " + f.getPath()); } } }); } catch (final IOException e) { LOGGER.error("IO Exception " + context.fileSystem().baseDir().getPath()); } } public static void save(SensorContext context, Map<String, List<LineCoverage>> coveragePerFile) { for (Map.Entry<String, List<LineCoverage>> entry : coveragePerFile.entrySet()) { final String filePath = entry.getKey(); final List<LineCoverage> lines = entry.getValue(); final FileSystem fileSystem = context.fileSystem(); final FilePredicates predicates = fileSystem.predicates(); final String key = filePath.startsWith(File.separator) ? filePath : File.separator + filePath; final InputFile inputFile = fileSystem.inputFile( predicates.and(predicates.matchesPathPattern("file:**" + key.replace(File.separator, "/")), predicates.hasType(InputFile.Type.MAIN), predicates.hasLanguage(GoLanguage.KEY))); if (inputFile == null) { LOGGER.warn("unable to create InputFile object: " + filePath); return; <<<<<<< ======= } public static void save(SensorContext context, Map<String, List<LineCoverage>> coveragePerFile) { for (final Map.Entry<String, List<LineCoverage>> entry : coveragePerFile.entrySet()) { final String filePath = entry.getKey(); final List<LineCoverage> lines = entry.getValue(); final FileSystem fileSystem = context.fileSystem(); final FilePredicates predicates = fileSystem.predicates(); final String key = filePath.startsWith(File.separator) ? filePath : File.separator + filePath; final InputFile inputFile = fileSystem.inputFile( predicates.and(predicates.matchesPathPattern("file:**" + key.replace(File.separator, "/")), predicates.hasType(InputFile.Type.MAIN), predicates.hasLanguage(GoLanguage.KEY))); if (inputFile == null) { LOGGER.warn("unable to create InputFile object: " + filePath); return; } final NewCoverage coverage = context.newCoverage().onFile(inputFile); for (final LineCoverage line : lines) { try { coverage.lineHits(line.getLineNumber(), line.getHits()); } catch (final Exception ex) { LOGGER.error(ex.getMessage() + line); } } coverage.ofType(CoverageType.UNIT); coverage.save(); } } >>>>>>>
<<<<<<< import org.n52.iceland.lifecycle.Constructable; import org.n52.iceland.ogc.swe.simpleType.SweBoolean; import org.n52.iceland.ogc.swes.SwesExtension; import org.n52.iceland.ogc.swes.SwesExtensions; ======= import org.n52.iceland.ogc.ows.Extension; import org.n52.iceland.ogc.ows.Extensions; >>>>>>> import org.n52.iceland.lifecycle.Constructable; import org.n52.iceland.ogc.ows.Extension; import org.n52.iceland.ogc.ows.Extensions; <<<<<<< ======= import org.n52.sos.ogc.swe.simpleType.SweBoolean; import org.slf4j.Logger; import org.slf4j.LoggerFactory; >>>>>>> import org.n52.sos.ogc.swe.simpleType.SweBoolean;
<<<<<<< import com.fasterxml.jackson.datatype.jsr310.ser.key.ZonedDateTimeKeySerializer; ======= >>>>>>> import com.fasterxml.jackson.datatype.jsr310.ser.key.ZonedDateTimeKeySerializer; <<<<<<< addSerializer(ZoneId.class, ToStringSerializer.instance); addSerializer(ZoneOffset.class, ToStringSerializer.instance); // key serializers addKeySerializer(ZonedDateTime.class, ZonedDateTimeKeySerializer.INSTANCE); // key deserializers addKeyDeserializer(Duration.class, DurationKeyDeserializer.INSTANCE); addKeyDeserializer(Instant.class, InstantKeyDeserializer.INSTANCE); addKeyDeserializer(LocalDateTime.class, LocalDateTimeKeyDeserializer.INSTANCE); addKeyDeserializer(LocalDate.class, LocalDateKeyDeserializer.INSTANCE); addKeyDeserializer(LocalTime.class, LocalTimeKeyDeserializer.INSTANCE); addKeyDeserializer(MonthDay.class, MonthDayKeyDeserializer.INSTANCE); addKeyDeserializer(OffsetDateTime.class, OffsetDateTimeKeyDeserializer.INSTANCE); addKeyDeserializer(OffsetTime.class, OffsetTimeKeyDeserializer.INSTANCE); addKeyDeserializer(Period.class, PeriodKeyDeserializer.INSTANCE); addKeyDeserializer(Year.class, YearKeyDeserializer.INSTANCE); addKeyDeserializer(YearMonth.class, YearMothKeyDeserializer.INSTANCE); addKeyDeserializer(ZonedDateTime.class, ZonedDateTimeKeyDeserializer.INSTANCE); addKeyDeserializer(ZoneId.class, ZoneIdKeyDeserializer.INSTANCE); addKeyDeserializer(ZoneOffset.class, ZoneOffsetKeyDeserializer.INSTANCE); ======= // note: actual concrete type is `ZoneRegion`, but that's not visible: addSerializer(ZoneId.class, new ToStringSerializer(ZoneId.class)); addSerializer(ZoneOffset.class, new ToStringSerializer(ZoneOffset.class)); } @Override public void setupModule(SetupContext context) { super.setupModule(context); context.addValueInstantiators(new ValueInstantiators.Base() { @Override public ValueInstantiator findValueInstantiator(DeserializationConfig config, BeanDescription beanDesc, ValueInstantiator defaultInstantiator) { Class<?> raw = beanDesc.getBeanClass(); // 15-May-2015, tatu: In theory not safe, but in practice we do need to do "fuzzy" matching // because we will (for now) be getting a subtype, but in future may want to downgrade // to the common base type. Even more, serializer may purposefully force use of base type. // So... in practice it really should always work, in the end. :) if (ZoneId.class.isAssignableFrom(raw)) { // let's assume we should be getting "empty" StdValueInstantiator here: if (defaultInstantiator instanceof StdValueInstantiator) { StdValueInstantiator inst = (StdValueInstantiator) defaultInstantiator; // one further complication: we need ZoneId info, not sub-class AnnotatedClass ac; if (raw == ZoneId.class) { ac = beanDesc.getClassInfo(); } else { // we don't need Annotations, so constructing directly is fine here // even if it's not generally recommended ac = AnnotatedClass.construct(ZoneId.class, null, null); } if (!inst.canCreateFromString()) { AnnotatedMethod factory = _findFactory(ac, "of", String.class); if (factory != null) { inst.configureFromStringCreator(factory); } // otherwise... should we indicate an error? } //return ZoneIdInstantiator.construct(config, beanDesc, defaultInstantiator); } } return defaultInstantiator; } }); } // For protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getStaticMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null; >>>>>>> // note: actual concrete type is `ZoneRegion`, but that's not visible: addSerializer(ZoneId.class, new ToStringSerializer(ZoneId.class)); addSerializer(ZoneOffset.class, new ToStringSerializer(ZoneOffset.class)); // key serializers addKeySerializer(ZonedDateTime.class, ZonedDateTimeKeySerializer.INSTANCE); // key deserializers addKeyDeserializer(Duration.class, DurationKeyDeserializer.INSTANCE); addKeyDeserializer(Instant.class, InstantKeyDeserializer.INSTANCE); addKeyDeserializer(LocalDateTime.class, LocalDateTimeKeyDeserializer.INSTANCE); addKeyDeserializer(LocalDate.class, LocalDateKeyDeserializer.INSTANCE); addKeyDeserializer(LocalTime.class, LocalTimeKeyDeserializer.INSTANCE); addKeyDeserializer(MonthDay.class, MonthDayKeyDeserializer.INSTANCE); addKeyDeserializer(OffsetDateTime.class, OffsetDateTimeKeyDeserializer.INSTANCE); addKeyDeserializer(OffsetTime.class, OffsetTimeKeyDeserializer.INSTANCE); addKeyDeserializer(Period.class, PeriodKeyDeserializer.INSTANCE); addKeyDeserializer(Year.class, YearKeyDeserializer.INSTANCE); addKeyDeserializer(YearMonth.class, YearMothKeyDeserializer.INSTANCE); addKeyDeserializer(ZonedDateTime.class, ZonedDateTimeKeyDeserializer.INSTANCE); addKeyDeserializer(ZoneId.class, ZoneIdKeyDeserializer.INSTANCE); addKeyDeserializer(ZoneOffset.class, ZoneOffsetKeyDeserializer.INSTANCE); } @Override public void setupModule(SetupContext context) { super.setupModule(context); context.addValueInstantiators(new ValueInstantiators.Base() { @Override public ValueInstantiator findValueInstantiator(DeserializationConfig config, BeanDescription beanDesc, ValueInstantiator defaultInstantiator) { Class<?> raw = beanDesc.getBeanClass(); // 15-May-2015, tatu: In theory not safe, but in practice we do need to do "fuzzy" matching // because we will (for now) be getting a subtype, but in future may want to downgrade // to the common base type. Even more, serializer may purposefully force use of base type. // So... in practice it really should always work, in the end. :) if (ZoneId.class.isAssignableFrom(raw)) { // let's assume we should be getting "empty" StdValueInstantiator here: if (defaultInstantiator instanceof StdValueInstantiator) { StdValueInstantiator inst = (StdValueInstantiator) defaultInstantiator; // one further complication: we need ZoneId info, not sub-class AnnotatedClass ac; if (raw == ZoneId.class) { ac = beanDesc.getClassInfo(); } else { // we don't need Annotations, so constructing directly is fine here // even if it's not generally recommended ac = AnnotatedClass.construct(ZoneId.class, null, null); } if (!inst.canCreateFromString()) { AnnotatedMethod factory = _findFactory(ac, "of", String.class); if (factory != null) { inst.configureFromStringCreator(factory); } // otherwise... should we indicate an error? } //return ZoneIdInstantiator.construct(config, beanDesc, defaultInstantiator); } } return defaultInstantiator; } }); } // For protected AnnotatedMethod _findFactory(AnnotatedClass cls, String name, Class<?>... argTypes) { final int argCount = argTypes.length; for (AnnotatedMethod method : cls.getStaticMethods()) { if (!name.equals(method.getName()) || (method.getParameterCount() != argCount)) { continue; } for (int i = 0; i < argCount; ++i) { Class<?> argType = method.getParameter(i).getRawType(); if (!argType.isAssignableFrom(argTypes[i])) { continue; } } return method; } return null;
<<<<<<< public Complex pow(double x) { final int nx = (int) FastMath.rint(x); if (x == nx) { // integer power return pow(nx); } else if (this.imaginary == 0.0) { // check real implementation that handles a bunch of special cases final double realPow = FastMath.pow(this.real, x); if (Double.isFinite(realPow)) { return createComplex(realPow, 0); } } // generic implementation return this.log().multiply(x).exp(); } /** {@inheritDoc} * @since 1.7 */ @Override public Complex pow(int n) { Complex result = ONE; final boolean invert; if (n < 0) { invert = true; n = -n; } else { invert = false; } // Exponentiate by successive squaring Complex square = this; while (n > 0) { if ((n & 0x1) > 0) { result = result.multiply(square); } square = square.multiply(square); n = n >> 1; } return invert ? result.reciprocal() : result; } ======= public Complex pow(double x) { final int nx = (int) FastMath.rint(x); if (x == nx) { // integer power return pow(nx); } else if (this.imaginary == 0.0) { // check real implementation that handles a bunch of special cases final double realPow = FastMath.pow(this.real, x); if (Double.isFinite(realPow)) { return createComplex(realPow, 0); } } // generic implementation return this.log().multiply(x).exp(); } /** Integer power operation. * @param n power to apply * @return this<sup>n</sup> * @since 1.7 */ public Complex pow(final int n) { Complex result = ONE; final boolean invert; int p = n; if (p < 0) { invert = true; p = -p; } else { invert = false; } // Exponentiate by successive squaring Complex square = this; while (p > 0) { if ((p & 0x1) > 0) { result = result.multiply(square); } square = square.multiply(square); p = p >> 1; } return invert ? result.reciprocal() : result; } >>>>>>> public Complex pow(double x) { final int nx = (int) FastMath.rint(x); if (x == nx) { // integer power return pow(nx); } else if (this.imaginary == 0.0) { // check real implementation that handles a bunch of special cases final double realPow = FastMath.pow(this.real, x); if (Double.isFinite(realPow)) { return createComplex(realPow, 0); } } // generic implementation return this.log().multiply(x).exp(); } /** {@inheritDoc} * @since 1.7 */ public Complex pow(final int n) { Complex result = ONE; final boolean invert; int p = n; if (p < 0) { invert = true; p = -p; } else { invert = false; } // Exponentiate by successive squaring Complex square = this; while (p > 0) { if ((p & 0x1) > 0) { result = result.multiply(square); } square = square.multiply(square); p = p >> 1; } return invert ? result.reciprocal() : result; }
<<<<<<< import org.hipparchus.exception.MathIllegalStateException; ======= import org.hipparchus.exception.MathInternalError; import org.hipparchus.exception.util.LocalizedFormats; >>>>>>> import org.hipparchus.exception.MathInternalError;
<<<<<<< public static class Marshaler { @MarshalsPointer public static ABRecord toObject(Class<? extends ABRecord> cls, long handle, long flags) { return toObject(cls, handle, flags, true); } static ABRecord toObject(Class<? extends ABRecord> cls, long handle, long flags, boolean retain) { if (handle == 0) { return null; } int recordType = getRecordType(handle); Class<? extends ABRecord> subcls = null; switch (recordType) { case 0: // kABPersonType subcls = ABPerson.class; break; case 1: // kABGroupType subcls = ABGroup.class; break; case 2: // kABSourceType subcls = ABSource.class; break; default: throw new Error("Unrecognized record type " + recordType); } ABRecord o = (ABRecord) NativeObject.Marshaler.toObject(subcls, handle, flags); if (retain) { retain(handle); } return o; } } public static class NoRetainMarshaler { @MarshalsPointer public static ABRecord toObject(Class<? extends ABRecord> cls, long handle, long flags) { return Marshaler.toObject(cls, handle, flags, false); } } /*<constants>*//*</constants>*/ ======= /*<constants>*/ public static final int InvalidID = -1; /*</constants>*/ >>>>>>> public static class Marshaler { @MarshalsPointer public static ABRecord toObject(Class<? extends ABRecord> cls, long handle, long flags) { return toObject(cls, handle, flags, true); } static ABRecord toObject(Class<? extends ABRecord> cls, long handle, long flags, boolean retain) { if (handle == 0) { return null; } int recordType = getRecordType(handle); Class<? extends ABRecord> subcls = null; switch (recordType) { case 0: // kABPersonType subcls = ABPerson.class; break; case 1: // kABGroupType subcls = ABGroup.class; break; case 2: // kABSourceType subcls = ABSource.class; break; default: throw new Error("Unrecognized record type " + recordType); } ABRecord o = (ABRecord) NativeObject.Marshaler.toObject(subcls, handle, flags); if (retain) { retain(handle); } return o; } } public static class NoRetainMarshaler { @MarshalsPointer public static ABRecord toObject(Class<? extends ABRecord> cls, long handle, long flags) { return Marshaler.toObject(cls, handle, flags, false); } } /*<constants>*/ public static final int InvalidID = -1; /*</constants>*/
<<<<<<< import org.floens.chan.core.http.ReplyManager; import org.floens.chan.core.net.ProxiedHurlStack; ======= >>>>>>> import org.floens.chan.core.net.ProxiedHurlStack; <<<<<<< String userAgent = getUserAgent(); volleyRequestQueue = Volley.newRequestQueue(this, userAgent, new ProxiedHurlStack(userAgent), new File(cacheDir, Volley.DEFAULT_CACHE_DIR), VOLLEY_CACHE_SIZE); imageLoader = new ImageLoader(volleyRequestQueue, new BitmapLruImageCache(VOLLEY_LRU_CACHE_SIZE)); ======= volleyRequestQueue = Volley.newRequestQueue(this, getUserAgent(), null, new File(cacheDir, Volley.DEFAULT_CACHE_DIR), VOLLEY_CACHE_SIZE); final int runtimeMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); final int lruImageCacheSize = runtimeMemory / 8; imageLoader = new ImageLoader(volleyRequestQueue, new BitmapLruImageCache(lruImageCacheSize)); >>>>>>> String userAgent = getUserAgent(); volleyRequestQueue = Volley.newRequestQueue(this, userAgent, new ProxiedHurlStack(userAgent), new File(cacheDir, Volley.DEFAULT_CACHE_DIR), VOLLEY_CACHE_SIZE); final int runtimeMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); final int lruImageCacheSize = runtimeMemory / 8; imageLoader = new ImageLoader(volleyRequestQueue, new BitmapLruImageCache(lruImageCacheSize));
<<<<<<< import org.floens.chan.chan.ChanUrls; import org.floens.chan.core.settings.ChanSettings; ======= import org.floens.chan.core.ChanPreferences; >>>>>>> <<<<<<< if (ChanSettings.getPassEnabled()) { ((TextView) container.findViewById(R.id.reply_captcha_text)).setText(R.string.pass_using); container.findViewById(R.id.reply_captcha_container).setVisibility(View.GONE); container.findViewById(R.id.reply_captcha).setVisibility(View.GONE); } ======= >>>>>>>
<<<<<<< // import com.jogamp.graph.math.Quaternion; ======= import com.jogamp.opengl.math.Quaternion; >>>>>>> // import com.jogamp.opengl.math.Quaternion; <<<<<<< // private Quaternion quat= null; private Glyph glyph; private OutlineShape shape; ======= private Quaternion quat= null; private OutlineShape shape = null; >>>>>>> // private Quaternion quat= null; private Glyph glyph; private OutlineShape shape; <<<<<<< public final Glyph getGlyph() { return glyph; } public final OutlineShape getShape() { ======= public OutlineShape getShape() { >>>>>>> public final Glyph getGlyph() { return glyph; } public final OutlineShape getShape() { <<<<<<< public final int getNumVertices() { ======= public int getNumVertices() { >>>>>>> public final int getNumVertices() { <<<<<<< * Set the Quaternion that shall defien the rotation ======= /** Set the Quaternion that shall defien the rotation >>>>>>> /** * Set the Quaternion that shall define the rotation <<<<<<< */ ======= >>>>>>> */
<<<<<<< boolean updateFont = true; ======= >>>>>>> boolean updateFont = true; <<<<<<< boolean updateMatrix = true; boolean debug; boolean trace; ======= boolean doMatrix = true; >>>>>>> boolean updateMatrix = true; <<<<<<< if(updateFont) { font = textRenderer.createFont(vfactory, "Lucida Sans Regular", fontSize); updateFont = false; } textRenderer.renderString3D(gl, font, text2, position, texSize); ======= textRenderer.renderString3D(gl, font, text2, position, fontSize, texSize); >>>>>>> textRenderer.renderString3D(gl, font, text2, position, fontSize, texSize); <<<<<<< updateFont = true; dumpMatrix(); ======= dumpMatrix(true); >>>>>>> updateFont = true; dumpMatrix(true); <<<<<<< updateMatrix = true; dumpMatrix(); ======= doMatrix = true; dumpMatrix(false); >>>>>>> updateMatrix = true; dumpMatrix(false); <<<<<<< updateMatrix = true; dumpMatrix(); ======= doMatrix = true; dumpMatrix(false); >>>>>>> updateMatrix = true; dumpMatrix(false); <<<<<<< updateMatrix = true; dumpMatrix(); ======= doMatrix = true; dumpMatrix(false); >>>>>>> updateMatrix = true; dumpMatrix(false);
<<<<<<< ======= verticeAttr.putf(v.getX()); >>>>>>>
<<<<<<< return new com.jogamp.newt.event.KeyEvent( type, src, unixTime, newtMods, newtKeyCode, newtKeyCode, event.getDisplayLabel()); ======= final com.jogamp.newt.event.KeyEvent ke1 = new com.jogamp.newt.event.KeyEvent( type, src, unixTime, newtMods, newtKeyCode, (char) event.getUnicodeChar()); if( com.jogamp.newt.event.KeyEvent.EVENT_KEY_RELEASED == type ) { return new com.jogamp.newt.event.KeyEvent[] { ke1, new com.jogamp.newt.event.KeyEvent( com.jogamp.newt.event.KeyEvent.EVENT_KEY_TYPED, src, unixTime, newtMods, newtKeyCode, (char) event.getUnicodeChar()) }; } else { return new com.jogamp.newt.event.KeyEvent[] { ke1 }; } >>>>>>> return new com.jogamp.newt.event.KeyEvent( type, src, unixTime, newtMods, newtKeyCode, newtKeyCode, (char) event.getUnicodeChar());
<<<<<<< public static List<JDAPlugin> plugins = new ArrayList<>(); ======= public static List<Plugin> plugins = new ArrayList<>(); private static AtomicInteger jobCount = new AtomicInteger(0); >>>>>>> public static List<JDAPlugin> plugins = new ArrayList<>(); private static AtomicInteger jobCount = new AtomicInteger(0);
<<<<<<< String key = keyBuilder.join("default", "default", topic); if (!handlerMap.containsKey(key)) { ======= String key = keyBuilder.join(kafkaUrl.orElse("default"), schemaUrl.orElse("default"), topic); if (!consumerMap.containsKey(key)) { >>>>>>> String key = keyBuilder.join("default", "default", topic); if (!consumerMap.containsKey(key)) { <<<<<<< handlerMap.put(key, TimedWrapper.of(queue)); kps.consumerService(queue, topic, null, null).start(); ======= KadminConsumerGroup<String, Object> consumer = consumerProvider.get(KadminConsumerConfig.builder() .topic(topic) .kafkaHost(kafkaUrl.orElse(null)) .schemaRegistryUrl(schemaUrl.orElse(null)) .build(), true); consumer.register(queue); consumerMap.put(key, TimedWrapper.of(ConsumerContainer.builder() .consumer(consumer) .handler(queue) .build())); >>>>>>> KadminConsumerGroup<String, Object> consumer = consumerProvider.get(KadminConsumerConfig.builder() .topic(topic) .build(), true); consumer.register(queue); consumerMap.put(key, TimedWrapper.of(ConsumerContainer.builder() .consumer(consumer) .handler(queue) .build()));
<<<<<<< LOGGER.log(LogModel.trace("/publish Avrified: {}") .addArg(message) .build()); ProducerService<String, Object> ps = providerService.producerService(null, null); LOGGER.log(LogModel.trace("/publish Producer not null {}") .addArg(ps != null) .build()); boolean sendMessage = message != null && ps != null; LOGGER.log(LogModel.trace("/publish Send message {}") .addArg(sendMessage) ======= KadminProducer<String, Object> producer = producerProvider.get(KadminProducerConfig.builder() .kafkaHost(meta.getKafkaUrl()) .schemaRegistryUrl(meta.getSchemaRegistryUrl()) .topic(meta.getTopic()) >>>>>>> KadminProducer<String, Object> producer = producerProvider.get(KadminProducerConfig.builder() .topic(meta.getTopic())
<<<<<<< if (currentWorker != null) currentWorker.dispose(); forbidDownwardFocusScroll(); ======= if (currentWorker != null) { currentWorker.dispose(); } >>>>>>> if (currentWorker != null) { currentWorker.dispose(); } forbidDownwardFocusScroll(); <<<<<<< .doFinally(this::allowDownwardFocusScroll) .subscribe((@io.reactivex.annotations.NonNull ListExtractor.InfoItemsPage InfoItemsPage) -> { ======= .subscribe((@io.reactivex.annotations.NonNull ListExtractor.InfoItemsPage InfoItemsPage) -> { >>>>>>> .doFinally(this::allowDownwardFocusScroll) .subscribe((@io.reactivex.annotations.NonNull ListExtractor.InfoItemsPage InfoItemsPage) -> {
<<<<<<< private final ArrayList<PlayQueueItem> history; @NonNull private final AtomicInteger queueIndex; ======= @NonNull private final AtomicInteger queueIndex; >>>>>>> @NonNull private final AtomicInteger queueIndex; private final ArrayList<PlayQueueItem> history; <<<<<<< * Returns the item at the given index. * May throw {@link IndexOutOfBoundsException}. * */ public PlayQueueItem getItem(final int index) { if (index < 0 || index >= streams.size() || streams.get(index) == null) return null; ======= * @param index the index of the item to return * @return the item at the given index * @throws IndexOutOfBoundsException */ public PlayQueueItem getItem(final int index) { if (index < 0 || index >= streams.size() || streams.get(index) == null) { return null; } >>>>>>> * @param index the index of the item to return * @return the item at the given index * @throws IndexOutOfBoundsException */ public PlayQueueItem getItem(final int index) { if (index < 0 || index >= streams.size() || streams.get(index) == null) { return null; } <<<<<<< * Will emit a {@link SelectEvent} if the index is not the current playing index. * */ public synchronized void setIndex(final int index) { final int oldIndex = getIndex(); int newIndex = index; if (index < 0) newIndex = 0; if (index >= streams.size()) newIndex = isComplete() ? index % streams.size() : streams.size() - 1; if (oldIndex != newIndex) history.add(streams.get(newIndex)); queueIndex.set(newIndex); broadcast(new SelectEvent(oldIndex, newIndex)); ======= * @return the play queue's update broadcast */ @Nullable public Flowable<PlayQueueEvent> getBroadcastReceiver() { return broadcastReceiver; >>>>>>> * @return the play queue's update broadcast */ @Nullable public Flowable<PlayQueueEvent> getBroadcastReceiver() { return broadcastReceiver; <<<<<<< * */ public synchronized void error(final boolean skippable) { final int index = getIndex(); if (skippable) { queueIndex.incrementAndGet(); if (streams.size() > queueIndex.get()) { history.add(streams.get(queueIndex.get())); } } else { removeInternal(index); } broadcast(new ErrorEvent(index, getIndex(), skippable)); ======= * </p> */ public synchronized void error() { final int oldIndex = getIndex(); queueIndex.incrementAndGet(); broadcast(new ErrorEvent(oldIndex, getIndex())); >>>>>>> * </p> */ public synchronized void error() { final int oldIndex = getIndex(); queueIndex.incrementAndGet(); if (streams.size() > queueIndex.get()) { history.add(streams.get(queueIndex.get())); } broadcast(new ErrorEvent(oldIndex, getIndex())); <<<<<<< backup.remove(getItem(removeIndex)); } history.remove(streams.remove(removeIndex)); if (streams.size() > queueIndex.get()) { history.add(streams.get(queueIndex.get())); ======= backup.remove(getItem(removeIndex)); >>>>>>> backup.remove(getItem(removeIndex)); } history.remove(streams.remove(removeIndex)); if (streams.size() > queueIndex.get()) { history.add(streams.get(queueIndex.get()));
<<<<<<< public void initViews(View rootView) { this.rootView = rootView; this.surfaceView = rootView.findViewById(R.id.surfaceView); this.surfaceForeground = rootView.findViewById(R.id.surfaceForeground); this.loadingPanel = rootView.findViewById(R.id.loading_panel); this.endScreen = rootView.findViewById(R.id.endScreen); this.controlAnimationView = rootView.findViewById(R.id.controlAnimationView); this.controlsRoot = rootView.findViewById(R.id.playbackControlRoot); this.currentDisplaySeek = rootView.findViewById(R.id.currentDisplaySeek); this.playbackSeekBar = rootView.findViewById(R.id.playbackSeekBar); this.playbackCurrentTime = rootView.findViewById(R.id.playbackCurrentTime); this.playbackEndTime = rootView.findViewById(R.id.playbackEndTime); this.playbackLiveSync = rootView.findViewById(R.id.playbackLiveSync); this.playbackSpeedTextView = rootView.findViewById(R.id.playbackSpeed); this.bottomControlsRoot = rootView.findViewById(R.id.bottomControls); this.topControlsRoot = rootView.findViewById(R.id.topControls); this.qualityTextView = rootView.findViewById(R.id.qualityTextView); this.subtitleView = rootView.findViewById(R.id.subtitleView); ======= public void initViews(final View view) { this.rootView = view; this.aspectRatioFrameLayout = view.findViewById(R.id.aspectRatioLayout); this.surfaceView = view.findViewById(R.id.surfaceView); this.surfaceForeground = view.findViewById(R.id.surfaceForeground); this.loadingPanel = view.findViewById(R.id.loading_panel); this.endScreen = view.findViewById(R.id.endScreen); this.controlAnimationView = view.findViewById(R.id.controlAnimationView); this.controlsRoot = view.findViewById(R.id.playbackControlRoot); this.currentDisplaySeek = view.findViewById(R.id.currentDisplaySeek); this.playbackSeekBar = view.findViewById(R.id.playbackSeekBar); this.playbackCurrentTime = view.findViewById(R.id.playbackCurrentTime); this.playbackEndTime = view.findViewById(R.id.playbackEndTime); this.playbackLiveSync = view.findViewById(R.id.playbackLiveSync); this.playbackSpeedTextView = view.findViewById(R.id.playbackSpeed); this.bottomControlsRoot = view.findViewById(R.id.bottomControls); this.topControlsRoot = view.findViewById(R.id.topControls); this.qualityTextView = view.findViewById(R.id.qualityTextView); this.subtitleView = view.findViewById(R.id.subtitleView); >>>>>>> public void initViews(final View view) { this.rootView = view; this.surfaceView = view.findViewById(R.id.surfaceView); this.surfaceForeground = view.findViewById(R.id.surfaceForeground); this.loadingPanel = view.findViewById(R.id.loading_panel); this.endScreen = view.findViewById(R.id.endScreen); this.controlAnimationView = view.findViewById(R.id.controlAnimationView); this.controlsRoot = view.findViewById(R.id.playbackControlRoot); this.currentDisplaySeek = view.findViewById(R.id.currentDisplaySeek); this.playbackSeekBar = view.findViewById(R.id.playbackSeekBar); this.playbackCurrentTime = view.findViewById(R.id.playbackCurrentTime); this.playbackEndTime = view.findViewById(R.id.playbackEndTime); this.playbackLiveSync = view.findViewById(R.id.playbackLiveSync); this.playbackSpeedTextView = view.findViewById(R.id.playbackSpeed); this.bottomControlsRoot = view.findViewById(R.id.bottomControls); this.topControlsRoot = view.findViewById(R.id.topControls); this.qualityTextView = view.findViewById(R.id.qualityTextView); this.subtitleView = view.findViewById(R.id.subtitleView); <<<<<<< this.resizeView = rootView.findViewById(R.id.resizeTextView); resizeView.setText(PlayerHelper.resizeTypeOf(context, getSurfaceView().getResizeMode())); ======= this.resizeView = view.findViewById(R.id.resizeTextView); resizeView.setText(PlayerHelper .resizeTypeOf(context, aspectRatioFrameLayout.getResizeMode())); >>>>>>> this.resizeView = view.findViewById(R.id.resizeTextView); resizeView.setText(PlayerHelper .resizeTypeOf(context, getSurfaceView().getResizeMode())); <<<<<<< if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) ======= //this.aspectRatioFrameLayout.setAspectRatio(16.0f / 9.0f); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { >>>>>>> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { <<<<<<< ======= if (simpleExoPlayer.getCurrentPosition() != 0 && !isControlsVisible()) { controlsVisibilityHandler.removeCallbacksAndMessages(null); controlsVisibilityHandler .postDelayed(this::showControlsThenHide, DEFAULT_CONTROLS_DURATION); } >>>>>>> <<<<<<< float scaleFrom = goneOnEnd ? 1.0f : 1.0f, scaleTo = goneOnEnd ? 1.8f : 1.4f; float alphaFrom = goneOnEnd ? 1.0f : 0.0f, alphaTo = goneOnEnd ? 0.0f : 1.0f; ======= float scaleFrom = goneOnEnd ? 1f : 1f; float scaleTo = goneOnEnd ? 1.8f : 1.4f; float alphaFrom = goneOnEnd ? 1f : 0f; float alphaTo = goneOnEnd ? 0f : 1f; >>>>>>> float scaleFrom = goneOnEnd ? 1f : 1f; float scaleTo = goneOnEnd ? 1.8f : 1.4f; float alphaFrom = goneOnEnd ? 1f : 0f; float alphaTo = goneOnEnd ? 0f : 1f; <<<<<<< public ExpandableSurfaceView getSurfaceView() { ======= public void setPlaybackQuality(final String quality) { this.resolver.setPlaybackQuality(quality); } public AspectRatioFrameLayout getAspectRatioFrameLayout() { return aspectRatioFrameLayout; } public SurfaceView getSurfaceView() { >>>>>>> public void setPlaybackQuality(final String quality) { this.resolver.setPlaybackQuality(quality); } public ExpandableSurfaceView getSurfaceView() {
<<<<<<< import com.quickblox.module.chat.QBChatService; import com.quickblox.module.users.model.QBUser; import com.quickblox.module.videochat_webrtc.SignalingChannel; ======= import com.nostra13.universalimageloader.core.ImageLoader; import com.quickblox.module.content.model.QBFile; >>>>>>> import com.quickblox.module.chat.QBChatService; import com.quickblox.module.users.model.QBUser; import com.quickblox.module.videochat_webrtc.SignalingChannel; import com.nostra13.universalimageloader.core.ImageLoader; import com.quickblox.module.content.model.QBFile; <<<<<<< import com.quickblox.qmunicate.core.gcm.NotificationHelper; ======= import com.quickblox.qmunicate.core.command.Command; >>>>>>> import com.quickblox.qmunicate.core.gcm.NotificationHelper; import com.quickblox.qmunicate.core.command.Command; <<<<<<< import com.quickblox.qmunicate.qb.QBLoadImageTask; import com.quickblox.qmunicate.qb.QBRemoveFriendTask; import com.quickblox.qmunicate.qb.QBSendMessageTask; ======= import com.quickblox.qmunicate.qb.QBGetFileCommand; import com.quickblox.qmunicate.qb.QBRemoveFriendCommand; import com.quickblox.qmunicate.service.QBServiceConsts; >>>>>>> import com.quickblox.qmunicate.qb.QBLoadImageTask; import com.quickblox.qmunicate.qb.QBRemoveFriendTask; import com.quickblox.qmunicate.qb.QBSendMessageTask; import com.quickblox.qmunicate.qb.QBGetFileCommand; import com.quickblox.qmunicate.qb.QBRemoveFriendCommand; import com.quickblox.qmunicate.service.QBServiceConsts;
<<<<<<< * Get a resource id from a resource styled according to the context's theme. ======= * Get a resource id from a resource styled according to the the context's theme. * * @param context Android app context * @param attr attribute reference of the resource * @return resource ID >>>>>>> * Get a resource id from a resource styled according to the context's theme. * * @param context Android app context * @param attr attribute reference of the resource * @return resource ID <<<<<<< * Get a color from an attr styled according to the context's theme. ======= * Get a color from an attr styled according to the the context's theme. * * @param context Android app context * @param attrColor attribute reference of the resource * @return the color >>>>>>> * Get a color from an attr styled according to the context's theme. * * @param context Android app context * @param attrColor attribute reference of the resource * @return the color
<<<<<<< headerPlayAllButton.setOnClickListener( view -> NavigationHelper.playOnMainPlayer(activity, getPlayQueue(), true)); headerPopupButton.setOnClickListener( view -> NavigationHelper.playOnPopupPlayer(activity, getPlayQueue(), false)); headerBackgroundButton.setOnClickListener( view -> NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue(), false)); ======= headerPlayAllButton.setOnClickListener(view -> NavigationHelper .playOnMainPlayer(activity, getPlayQueue(), false)); headerPopupButton.setOnClickListener(view -> NavigationHelper .playOnPopupPlayer(activity, getPlayQueue(), false)); headerBackgroundButton.setOnClickListener(view -> NavigationHelper .playOnBackgroundPlayer(activity, getPlayQueue(), false)); headerPopupButton.setOnLongClickListener(view -> { NavigationHelper.enqueueOnPopupPlayer(activity, getPlayQueue(), true); return true; }); headerBackgroundButton.setOnLongClickListener(view -> { NavigationHelper.enqueueOnBackgroundPlayer(activity, getPlayQueue(), true); return true; }); } private void showContentNotSupported() { contentNotSupportedTextView.setVisibility(View.VISIBLE); kaomojiTextView.setText("(︶︹︺)"); kaomojiTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 45f); noVideosTextView.setVisibility(View.GONE); >>>>>>> headerPlayAllButton.setOnClickListener(view -> NavigationHelper .playOnMainPlayer(activity, getPlayQueue(), true)); headerPopupButton.setOnClickListener(view -> NavigationHelper .playOnPopupPlayer(activity, getPlayQueue(), false)); headerBackgroundButton.setOnClickListener(view -> NavigationHelper .playOnBackgroundPlayer(activity, getPlayQueue(), false)); headerPopupButton.setOnLongClickListener(view -> { NavigationHelper.enqueueOnPopupPlayer(activity, getPlayQueue(), true); return true; }); headerBackgroundButton.setOnLongClickListener(view -> { NavigationHelper.enqueueOnBackgroundPlayer(activity, getPlayQueue(), true); return true; }); } private void showContentNotSupported() { contentNotSupportedTextView.setVisibility(View.VISIBLE); kaomojiTextView.setText("(︶︹︺)"); kaomojiTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 45f); noVideosTextView.setVisibility(View.GONE);
<<<<<<< boolean hasEllipsis = false; if (itemContentView.getLineCount() > commentDefaultLines){ int endOfLastLine = itemContentView.getLayout().getLineEnd(commentDefaultLines - 1); int end = itemContentView.getText().toString().lastIndexOf(' ', endOfLastLine -2); if(end == -1) end = Math.max(endOfLastLine -2, 0); ======= if (itemContentView.getLineCount() > COMMENT_DEFAULT_LINES) { int endOfLastLine = itemContentView.getLayout().getLineEnd(COMMENT_DEFAULT_LINES - 1); int end = itemContentView.getText().toString().lastIndexOf(' ', endOfLastLine - 2); if (end == -1) { end = Math.max(endOfLastLine - 2, 0); } >>>>>>> boolean hasEllipsis = false; if (itemContentView.getLineCount() > COMMENT_DEFAULT_LINES) { int endOfLastLine = itemContentView.getLayout().getLineEnd(COMMENT_DEFAULT_LINES - 1); int end = itemContentView.getText().toString().lastIndexOf(' ', endOfLastLine - 2); if (end == -1) { end = Math.max(endOfLastLine - 2, 0); } <<<<<<< Linkify.addLinks(itemContentView, pattern, null, null, timestampLink); ======= Linkify.addLinks(itemContentView, PATTERN, null, null, timestampLink); itemContentView.setMovementMethod(null); >>>>>>> Linkify.addLinks(itemContentView, PATTERN, null, null, timestampLink);
<<<<<<< import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.ParsingException; import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.extractor.StreamExtractor; import org.schabi.newpipe.extractor.VideoPreviewInfo; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.VideoInfo; import org.schabi.newpipe.extractor.services.youtube.YoutubeStreamExtractor; ======= import org.schabi.newpipe.crawler.MediaFormat; import org.schabi.newpipe.crawler.ParsingException; import org.schabi.newpipe.crawler.ServiceList; import org.schabi.newpipe.crawler.StreamExtractor; import org.schabi.newpipe.crawler.VideoPreviewInfo; import org.schabi.newpipe.crawler.StreamingService; import org.schabi.newpipe.crawler.VideoInfo; import org.schabi.newpipe.crawler.services.youtube.YoutubeStreamExtractor; import org.schabi.newpipe.exoplayer.ExoPlayerActivity; >>>>>>> import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.ParsingException; import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.extractor.StreamExtractor; import org.schabi.newpipe.extractor.VideoPreviewInfo; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.VideoInfo; import org.schabi.newpipe.extractor.services.youtube.YoutubeStreamExtractor; import org.schabi.newpipe.exoplayer.ExoPlayerActivity; <<<<<<< // Sometimes it may be that some information is not available due to changes fo the // website which was crawled. Then the ui has to understand this and act right. if (info.audio_streams != null) { VideoInfo.AudioStream audioStream = info.audio_streams.get(getPreferredAudioStreamId(info)); String audioSuffix = "." + MediaFormat.getSuffixById(audioStream.format); args.putString(DownloadDialog.AUDIO_URL, audioStream.url); args.putString(DownloadDialog.FILE_SUFFIX_AUDIO, audioSuffix); ======= actionBarHandler.setOnPlayAudioListener(new ActionBarHandler.OnActionListener() { @Override public void onActionSelected(int selectedStreamId) { boolean useExternalAudioPlayer = PreferenceManager.getDefaultSharedPreferences(activity) .getBoolean(activity.getString(R.string.use_external_audio_player_key), false); Intent intent; VideoInfo.AudioStream audioStream = info.audio_streams.get(getPreferredAudioStreamId(info)); if (!useExternalAudioPlayer && android.os.Build.VERSION.SDK_INT >= 18) { //internal music player: explicit intent if (!BackgroundPlayer.isRunning && videoThumbnail != null) { ActivityCommunicator.getCommunicator() .backgroundPlayerThumbnail = videoThumbnail; intent = new Intent(activity, BackgroundPlayer.class); intent.setAction(Intent.ACTION_VIEW); Log.i(TAG, "audioStream is null:" + (audioStream == null)); Log.i(TAG, "audioStream.url is null:" + (audioStream.url == null)); intent.setDataAndType(Uri.parse(audioStream.url), MediaFormat.getMimeById(audioStream.format)); intent.putExtra(BackgroundPlayer.TITLE, info.title); intent.putExtra(BackgroundPlayer.WEB_URL, info.webpage_url); intent.putExtra(BackgroundPlayer.SERVICE_ID, streamingServiceId); intent.putExtra(BackgroundPlayer.CHANNEL_NAME, info.uploader); activity.startService(intent); >>>>>>> // Sometimes it may be that some information is not available due to changes fo the // website which was crawled. Then the ui has to understand this and act right. if (info.audio_streams != null) { VideoInfo.AudioStream audioStream = info.audio_streams.get(getPreferredAudioStreamId(info)); String audioSuffix = "." + MediaFormat.getSuffixById(audioStream.format); args.putString(DownloadDialog.AUDIO_URL, audioStream.url); args.putString(DownloadDialog.FILE_SUFFIX_AUDIO, audioSuffix);
<<<<<<< ======= import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.report.UserAction; >>>>>>> import org.schabi.newpipe.report.UserAction;
<<<<<<< import org.schabi.newpipe.extractor.AudioStream; ======= >>>>>>> import org.schabi.newpipe.extractor.AudioStream;
<<<<<<< public static final int DPAD_CONTROLS_HIDE_TIME = 7000; // 7 Seconds ======= protected static final int RENDERER_UNAVAILABLE = -1; @NonNull private final VideoPlaybackResolver resolver; >>>>>>> public static final int DPAD_CONTROLS_HIDE_TIME = 7000; // 7 Seconds protected static final int RENDERER_UNAVAILABLE = -1; @NonNull private final VideoPlaybackResolver resolver; <<<<<<< if (DEBUG) Log.d(TAG, "showControlsThenHide() called"); final int hideTime = controlsRoot.isInTouchMode() ? DEFAULT_CONTROLS_HIDE_TIME : DPAD_CONTROLS_HIDE_TIME; animateView(controlsRoot, true, DEFAULT_CONTROLS_DURATION, 0, () -> hideControls(DEFAULT_CONTROLS_DURATION, hideTime)); ======= if (DEBUG) { Log.d(TAG, "showControlsThenHide() called"); } animateView(controlsRoot, true, DEFAULT_CONTROLS_DURATION, 0, () -> hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME)); >>>>>>> if (DEBUG) { Log.d(TAG, "showControlsThenHide() called"); } final int hideTime = controlsRoot.isInTouchMode() ? DEFAULT_CONTROLS_HIDE_TIME : DPAD_CONTROLS_HIDE_TIME; animateView(controlsRoot, true, DEFAULT_CONTROLS_DURATION, 0, () -> hideControls(DEFAULT_CONTROLS_DURATION, hideTime)); <<<<<<< public void safeHideControls(final long duration, long delay) { if (DEBUG) Log.d(TAG, "safeHideControls() called with: delay = [" + delay + "]"); if (rootView.isInTouchMode()) { controlsVisibilityHandler.removeCallbacksAndMessages(null); controlsVisibilityHandler.postDelayed( () -> animateView(controlsRoot, false, duration), delay); } } public void hideControls(final long duration, long delay) { if (DEBUG) Log.d(TAG, "hideControls() called with: delay = [" + delay + "]"); ======= public void hideControls(final long duration, final long delay) { if (DEBUG) { Log.d(TAG, "hideControls() called with: delay = [" + delay + "]"); } >>>>>>> public void safeHideControls(final long duration, final long delay) { if (DEBUG) { Log.d(TAG, "safeHideControls() called with: delay = [" + delay + "]"); } if (rootView.isInTouchMode()) { controlsVisibilityHandler.removeCallbacksAndMessages(null); controlsVisibilityHandler.postDelayed( () -> animateView(controlsRoot, false, duration), delay); } } public void hideControls(final long duration, final long delay) { if (DEBUG) { Log.d(TAG, "hideControls() called with: delay = [" + delay + "]"); }
<<<<<<< final boolean lastOrientationWasLandscape = defaultPreferences.getBoolean( getString(R.string.last_orientation_landscape_key), AndroidTvUtils.isTv()); ======= final boolean lastOrientationWasLandscape = defaultPreferences .getBoolean(getString(R.string.last_orientation_landscape_key), false); >>>>>>> final boolean lastOrientationWasLandscape = defaultPreferences .getBoolean(getString(R.string.last_orientation_landscape_key), AndroidTvUtils.isTv()); <<<<<<< boolean lastOrientationWasLandscape = defaultPreferences.getBoolean( getString(R.string.last_orientation_landscape_key), AndroidTvUtils.isTv()); ======= boolean lastOrientationWasLandscape = defaultPreferences .getBoolean(getString(R.string.last_orientation_landscape_key), false); >>>>>>> boolean lastOrientationWasLandscape = defaultPreferences .getBoolean(getString(R.string.last_orientation_landscape_key), AndroidTvUtils.isTv()); <<<<<<< public void safeHideControls(long duration, long delay) { if (DEBUG) Log.d(TAG, "safeHideControls() called with: delay = [" + delay + "]"); View controlsRoot = getControlsRoot(); if (controlsRoot.isInTouchMode()) { getControlsVisibilityHandler().removeCallbacksAndMessages(null); getControlsVisibilityHandler().postDelayed( () -> animateView(controlsRoot, false, duration, 0, MainVideoPlayer.this::hideSystemUi), delay); } } @Override public void hideControls(final long duration, long delay) { if (DEBUG) Log.d(TAG, "hideControls() called with: delay = [" + delay + "]"); ======= public void hideControls(final long duration, final long delay) { if (DEBUG) { Log.d(TAG, "hideControls() called with: delay = [" + delay + "]"); } >>>>>>> public void safeHideControls(long duration, final long delay) { if (DEBUG) { Log.d(TAG, "safeHideControls() called with: delay = [" + delay + "]"); } View controlsRoot = getControlsRoot(); if (controlsRoot.isInTouchMode()) { getControlsVisibilityHandler().removeCallbacksAndMessages(null); getControlsVisibilityHandler().postDelayed( () -> animateView(controlsRoot, false, duration, 0, MainVideoPlayer.this::hideSystemUi), delay); } } @Override public void hideControls(final long duration, final long delay) { if (DEBUG) { Log.d(TAG, "hideControls() called with: delay = [" + delay + "]"); }
<<<<<<< import org.schabi.newpipe.info_list.holder.CommentsInfoItemHolder; import org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder; ======= import org.schabi.newpipe.info_list.holder.ChannelGridInfoItemHolder; >>>>>>> import org.schabi.newpipe.info_list.holder.CommentsInfoItemHolder; import org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder; import org.schabi.newpipe.info_list.holder.ChannelGridInfoItemHolder; <<<<<<< private static final int MINI_COMMENT_HOLDER_TYPE = 0x400; private static final int COMMENT_HOLDER_TYPE = 0x401; ======= private static final int GRID_PLAYLIST_HOLDER_TYPE = 0x302; >>>>>>> private static final int GRID_PLAYLIST_HOLDER_TYPE = 0x302; private static final int MINI_COMMENT_HOLDER_TYPE = 0x400; private static final int COMMENT_HOLDER_TYPE = 0x401; <<<<<<< return useMiniVariant ? MINI_PLAYLIST_HOLDER_TYPE : PLAYLIST_HOLDER_TYPE; case COMMENT: return useMiniVariant ? MINI_COMMENT_HOLDER_TYPE : COMMENT_HOLDER_TYPE; ======= return useGridVariant ? GRID_PLAYLIST_HOLDER_TYPE : useMiniVariant ? MINI_PLAYLIST_HOLDER_TYPE : PLAYLIST_HOLDER_TYPE; >>>>>>> return useGridVariant ? GRID_PLAYLIST_HOLDER_TYPE : useMiniVariant ? MINI_PLAYLIST_HOLDER_TYPE : PLAYLIST_HOLDER_TYPE; case COMMENT: return useMiniVariant ? MINI_COMMENT_HOLDER_TYPE : COMMENT_HOLDER_TYPE; <<<<<<< case MINI_COMMENT_HOLDER_TYPE: return new CommentsMiniInfoItemHolder(infoItemBuilder, parent); case COMMENT_HOLDER_TYPE: return new CommentsInfoItemHolder(infoItemBuilder, parent); ======= case GRID_PLAYLIST_HOLDER_TYPE: return new PlaylistGridInfoItemHolder(infoItemBuilder, parent); >>>>>>> case GRID_PLAYLIST_HOLDER_TYPE: return new PlaylistGridInfoItemHolder(infoItemBuilder, parent); case MINI_COMMENT_HOLDER_TYPE: return new CommentsMiniInfoItemHolder(infoItemBuilder, parent); case COMMENT_HOLDER_TYPE: return new CommentsInfoItemHolder(infoItemBuilder, parent);
<<<<<<< import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.extractor.utils.Localization; ======= import org.schabi.newpipe.extractor.localization.ContentCountry; import org.schabi.newpipe.extractor.localization.Localization; >>>>>>> import org.schabi.newpipe.extractor.ServiceList; import org.schabi.newpipe.extractor.localization.ContentCountry; import org.schabi.newpipe.extractor.localization.Localization; <<<<<<< private CompositeDisposable disposables = new CompositeDisposable(); ======= private Localization initialSelectedLocalization; private ContentCountry initialSelectedContentCountry; >>>>>>> private Localization initialSelectedLocalization; private ContentCountry initialSelectedContentCountry; private CompositeDisposable disposables = new CompositeDisposable(); <<<<<<< Preference setPreferredCountry = findPreference(getString(R.string.content_country_key)); setPreferredCountry.setOnPreferenceChangeListener((Preference p, Object newCountry) -> { Localization oldLocal = org.schabi.newpipe.util.Localization.getPreferredExtractorLocal(getActivity()); NewPipe.setLocalization(new Localization((String) newCountry, oldLocal.getLanguage())); return true; }); Preference peerTubeInstance = findPreference(getString(R.string.peertube_instance_url_key)); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getContext()); peerTubeInstance.setDefaultValue(sharedPreferences.getString(getString(R.string.peertube_instance_url_key), ServiceList.PeerTube.getBaseUrl())); peerTubeInstance.setSummary(sharedPreferences.getString(getString(R.string.peertube_instance_url_key), ServiceList.PeerTube.getBaseUrl())); peerTubeInstance.setOnPreferenceChangeListener((Preference p, Object newInstance) -> { EditTextPreference pEt = (EditTextPreference) p; String url = (String) newInstance; if (!url.startsWith("https://")) { Toast.makeText(getActivity(), "instance url should start with https://", Toast.LENGTH_SHORT).show(); } else { pEt.setSummary("fetching instance details.."); Disposable disposable = Single.fromCallable(() -> { ServiceList.PeerTube.setInstance(url); return true; }).subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(result -> { if (result) { pEt.setSummary(url); pEt.setText(url); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putString(App.getApp().getString(R.string.peertube_instance_name_key), ServiceList.PeerTube.getServiceInfo().getName()).apply(); editor.putString(App.getApp().getString(R.string.current_service_key), ServiceList.PeerTube.getServiceInfo().getName()).apply(); NavigationHelper.openMainActivity(App.getApp()); } else { pEt.setSummary(ServiceList.PeerTube.getBaseUrl()); Toast.makeText(getActivity(), "unable to update instance", Toast.LENGTH_SHORT).show(); } }, error -> { pEt.setSummary(ServiceList.PeerTube.getBaseUrl()); Toast.makeText(getActivity(), "unable to update instance", Toast.LENGTH_SHORT).show(); }); disposables.add(disposable); } return false; }); ======= final Localization selectedLocalization = org.schabi.newpipe.util.Localization .getPreferredLocalization(requireContext()); final ContentCountry selectedContentCountry = org.schabi.newpipe.util.Localization .getPreferredContentCountry(requireContext()); if (!selectedLocalization.equals(initialSelectedLocalization) || !selectedContentCountry.equals(initialSelectedContentCountry)) { Toast.makeText(requireContext(), R.string.localization_changes_requires_app_restart, Toast.LENGTH_LONG).show(); } >>>>>>> final Localization selectedLocalization = org.schabi.newpipe.util.Localization .getPreferredLocalization(requireContext()); final ContentCountry selectedContentCountry = org.schabi.newpipe.util.Localization .getPreferredContentCountry(requireContext()); if (!selectedLocalization.equals(initialSelectedLocalization) || !selectedContentCountry.equals(initialSelectedContentCountry)) { Toast.makeText(requireContext(), R.string.localization_changes_requires_app_restart, Toast.LENGTH_LONG).show(); }
<<<<<<< ======= import android.support.design.widget.CollapsingToolbarLayout; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.AppCompatActivity; >>>>>>> import android.support.v7.app.AppCompatActivity; <<<<<<< import org.schabi.newpipe.settings.SettingsActivity; import org.schabi.newpipe.util.NavStack; ======= import org.schabi.newpipe.util.ThemeHelper; >>>>>>> import org.schabi.newpipe.settings.SettingsActivity; import org.schabi.newpipe.util.NavStack; <<<<<<< import static android.os.Build.VERSION.SDK_INT; ======= >>>>>>> import static android.os.Build.VERSION.SDK_INT; import org.schabi.newpipe.util.ThemeHelper; <<<<<<< public class ChannelActivity extends ThemableActivity { private static final String TAG = ChannelActivity.class.toString(); private View rootView = null; ======= public class ChannelActivity extends AppCompatActivity { // intent const public static final String CHANNEL_URL = "channel_url"; public static final String SERVICE_ID = "service_id"; private static final String TAG = ChannelActivity.class.toString(); private View rootView = null; >>>>>>> public class ChannelActivity extends AppCompatActivity { private static final String TAG = ChannelActivity.class.toString(); private View rootView = null; <<<<<<< ======= ThemeHelper.setTheme(this, false); >>>>>>> ThemeHelper.setTheme(this, true);
<<<<<<< import static org.schabi.newpipe.player.helper.PlayerHelper.getTimeString; import static org.schabi.newpipe.player.helper.PlayerHelper.globalScreenOrientationLocked; ======= >>>>>>> import static org.schabi.newpipe.player.helper.PlayerHelper.globalScreenOrientationLocked; <<<<<<< service.resetNotification(); service.updateNotification(R.drawable.ic_replay_white_24dp); if (isFullscreen) { toggleFullscreen(); } ======= NotificationUtil.getInstance().createNotificationIfNeededAndUpdate(this, false); >>>>>>> NotificationUtil.getInstance().createNotificationIfNeededAndUpdate(this, false); if (isFullscreen) { toggleFullscreen(); }
<<<<<<< } else if (ChatNotificationUtils.isUpdateDialogNotificationMessage(messagesNotificationType.getCode())) { dialog.setLastMessage(resources.getString(R.string.cht_notification_message)); ======= } else if (ChatNotificationUtils.isUpdateChatNotificationMessage(messagesNotificationType.getCode())) { dialog.setLastMessage(messageCache.getMessage()); >>>>>>> } else if (ChatNotificationUtils.isUpdateChatNotificationMessage(messagesNotificationType.getCode())) { dialog.setLastMessage(resources.getString(R.string.cht_notification_message));
<<<<<<< ======= public static boolean isInstalled(@SharePlatform.Platform int platform, Context context) { switch (platform) { case SharePlatform.QQ: case SharePlatform.QZONE: return isQQInstalled(context); case SharePlatform.WEIBO: return isWeiBoInstalled(context); case SharePlatform.WX: case SharePlatform.WX_TIMELINE: return isWeiXinInstalled(context); case SharePlatform.DEFAULT: return true; default: return false; } } @Deprecated >>>>>>> public static boolean isInstalled(@SharePlatform.Platform int platform, Context context) { switch (platform) { case SharePlatform.QQ: case SharePlatform.QZONE: return isQQInstalled(context); case SharePlatform.WEIBO: return isWeiBoInstalled(context); case SharePlatform.WX: case SharePlatform.WX_TIMELINE: return isWeiXinInstalled(context); case SharePlatform.DEFAULT: return true; default: return false; } } @Deprecated
<<<<<<< dcUpdate.setName("CHANGED_DC_NAME-" + uuid); deviceClassService.createOrUpdateDeviceClass(Optional.of(dcUpdate), Collections.singleton(DeviceFixture.createEquipmentVO())); ======= dcUpdate.setOfflineTimeout(Optional.of(100)); dcUpdate.setName(Optional.of("CHANGED_DC_NAME-" + uuid)); deviceClassService.createOrUpdateDeviceClass(Optional.of(dcUpdate)); >>>>>>> dcUpdate.setName("CHANGED_DC_NAME-" + uuid); deviceClassService.createOrUpdateDeviceClass(Optional.of(dcUpdate)); <<<<<<< public void should_replace_equipment() { DeviceClassEquipmentVO initialEquipment = DeviceFixture.createEquipmentVO(); final DeviceClassWithEquipmentVO deviceClass = DeviceFixture.createDCVO(); deviceClass.setEquipment(Collections.singleton(initialEquipment)); final DeviceClassWithEquipmentVO createdDC = deviceClassService.addDeviceClass(deviceClass); for (DeviceClassEquipmentVO deviceClassEquipmentVO : createdDC.getEquipment()) { if (deviceClassEquipmentVO.getCode().equals(initialEquipment.getCode())) { initialEquipment = deviceClassEquipmentVO; } } DeviceClassWithEquipmentVO existingDC = deviceClassService.getWithEquipment(createdDC.getId()); Set<DeviceClassEquipmentVO> existingEquipmentSet = existingDC.getEquipment(); assertNotNull(existingEquipmentSet); assertEquals(1, existingEquipmentSet.size()); DeviceClassEquipmentVO existingEquipment = existingEquipmentSet.stream().findFirst().get(); assertEquals(initialEquipment.getName(), existingEquipment.getName()); assertEquals(initialEquipment.getId(), existingEquipment.getId()); assertEquals(initialEquipment.getCode(), existingEquipment.getCode()); DeviceClassEquipmentVO anotherEquipment = DeviceFixture.createEquipmentVO(); DeviceClassUpdate dcu = new DeviceClassUpdate(); HashSet<DeviceClassEquipmentVO> equipments = new HashSet<>(); equipments.add(anotherEquipment); dcu.setEquipment(equipments); DeviceClassWithEquipmentVO update = deviceClassService.update(createdDC.getId(), dcu); existingDC = deviceClassService.getWithEquipment(createdDC.getId()); existingEquipmentSet = existingDC.getEquipment(); assertNotNull(existingEquipmentSet); assertEquals(1, existingEquipmentSet.size()); for (DeviceClassEquipmentVO deviceClassEquipmentVO : update.getEquipment()) { if (deviceClassEquipmentVO.getCode().equals(anotherEquipment.getCode())) { anotherEquipment = deviceClassEquipmentVO; break; } } existingEquipment = existingEquipmentSet.stream().findFirst().get(); assertEquals(anotherEquipment.getName(), existingEquipment.getName()); assertEquals(anotherEquipment.getId(), existingEquipment.getId()); assertEquals(anotherEquipment.getCode(), existingEquipment.getCode()); } @Test public void should_create_equipment() { final DeviceClassWithEquipmentVO deviceClass = DeviceFixture.createDCVO(); deviceClass.setEquipment(Collections.emptySet()); final DeviceClassWithEquipmentVO createdDC = deviceClassService.addDeviceClass(deviceClass); DeviceClassWithEquipmentVO existingDC = deviceClassService.getWithEquipment(createdDC.getId()); assertNotNull(existingDC); assertNotNull(existingDC.getEquipment()); assertEquals(0, existingDC.getEquipment().size()); final DeviceClassEquipmentVO initialEquipment = DeviceFixture.createEquipmentVO(); deviceClassService.createEquipment(deviceClass.getId(), Collections.singleton(initialEquipment)); existingDC = deviceClassService.getWithEquipment(createdDC.getId()); assertNotNull(existingDC); assertNotNull(existingDC.getEquipment()); assertEquals(1, existingDC.getEquipment().size()); final DeviceClassEquipmentVO existingEquipment = existingDC.getEquipment().stream().findFirst().get(); assertEquals(initialEquipment.getName(), existingEquipment.getName()); assertEquals(initialEquipment.getId(), existingEquipment.getId()); assertEquals(initialEquipment.getCode(), existingEquipment.getCode()); } @Test ======= >>>>>>>
<<<<<<< import com.devicehive.application.RiakQuorum; ======= import com.devicehive.configuration.Constants; >>>>>>> import com.devicehive.application.RiakQuorum; import com.devicehive.configuration.Constants; <<<<<<< import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; ======= >>>>>>>
<<<<<<< public Response insert(Network nr) { ======= @JsonPolicyApply(JsonPolicyDef.Policy.NETWORKS_LISTED) public Network insert(NetworkRequest nr) { >>>>>>> public Response insert(Network nr) { <<<<<<< n.setKey(nr.getKey()); n.setDescription(nr.getDescription()); n.setName(nr.getName()); Network result = networkService.insert(n); Annotation[] annotations = {new JsonPolicyApply.JsonPolicyApplyLiteral(JsonPolicyDef.Policy.NETWORK_SUBMITTED)}; return Response.status(Response.Status.CREATED).entity(result,annotations).build(); ======= //TODO: if request if malformed this code will fall with NullPointerException n.setKey(nr.getKey().getValue()); n.setDescription(nr.getDescription().getValue()); n.setName(nr.getName().getValue()); return networkService.insert(n); >>>>>>> //TODO: if request if malformed this code will fall with NullPointerException n.setKey(nr.getKey().getValue()); n.setDescription(nr.getDescription().getValue()); n.setName(nr.getName().getValue()); Network result = networkService.insert(n); Annotation[] annotations = {new JsonPolicyApply.JsonPolicyApplyLiteral(JsonPolicyDef.Policy.NETWORK_SUBMITTED)}; return Response.status(Response.Status.CREATED).entity(result,annotations).build(); <<<<<<< public Response update(Network nr, @PathParam("id") long id) { ======= @JsonPolicyApply(JsonPolicyDef.Policy.NETWORKS_LISTED) public Response update(NetworkRequest nr, @PathParam("id") long id) { >>>>>>> public Response update(Network nr, @PathParam("id") long id) { <<<<<<< networkService.update(nr); return Response.status(Response.Status.CREATED).build(); ======= Network n = networkService.getById(id); if (nr.getKey() != null) { n.setKey(nr.getKey().getValue()); } if (nr.getName() != null) { n.setName(nr.getName().getValue()); } if (nr.getDescription() != null) { n.setDescription(nr.getDescription().getValue()); } Network result = networkService.update(n); return Response.status(Response.Status.CREATED).entity(result).build(); >>>>>>> Network n = networkService.getById(id); if (nr.getKey() != null) { n.setKey(nr.getKey().getValue()); } if (nr.getName() != null) { n.setName(nr.getName().getValue()); } if (nr.getDescription() != null) { n.setDescription(nr.getDescription().getValue()); } networkService.update(nr); return Response.status(Response.Status.CREATED).build();
<<<<<<< import com.quickblox.qmunicate.utils.ChatUtils; ======= import com.quickblox.qmunicate.utils.Consts; import com.quickblox.qmunicate.utils.PrefsHelper; >>>>>>> import com.quickblox.qmunicate.utils.ChatUtils; import com.quickblox.qmunicate.utils.Consts; <<<<<<< import java.util.List; ======= import java.util.Date; >>>>>>> import java.util.Date; import java.util.List; <<<<<<< if (shouldStartMultiChat) { execJoin(extras); } ======= if(!chatHelper.isLoggedIn()){ sendResult(extras, failAction); } >>>>>>> if (!chatHelper.isLoggedIn()) { throw new Exception(); } if (shouldStartMultiChat) { execJoin(extras); }
<<<<<<< public DeviceClassWithEquipmentVO createOrUpdateDeviceClass(Optional<DeviceClassUpdate> deviceClass, Set<DeviceClassEquipmentVO> customEquipmentSet) { DeviceClassWithEquipmentVO stored; ======= public DeviceClassVO createOrUpdateDeviceClass(Optional<DeviceClassUpdate> deviceClass) { DeviceClassVO stored; >>>>>>> public DeviceClassVO createOrUpdateDeviceClass(Optional<DeviceClassUpdate> deviceClass) { DeviceClassVO stored; <<<<<<< deviceClassUpdate.setEquipment(customEquipmentSet); ======= >>>>>>> <<<<<<< public DeviceClassWithEquipmentVO addDeviceClass(DeviceClassWithEquipmentVO deviceClass) { hiveValidator.validate(deviceClass); ======= public DeviceClassVO addDeviceClass(DeviceClassVO deviceClass) { >>>>>>> public DeviceClassVO addDeviceClass(DeviceClassVO deviceClass) { hiveValidator.validate(deviceClass); <<<<<<< update.getData().ifPresent(stored::setData); if (update.getEquipment().isPresent()) { Map<String, DeviceClassEquipmentVO> existing = new HashMap<>(); for (DeviceClassEquipmentVO deviceClassEquipmentVO : stored.getEquipment()) { existing.put(deviceClassEquipmentVO.getCode(), deviceClassEquipmentVO); } for (DeviceClassEquipmentVO deviceClassEquipmentVO : update.getEquipment().get()) { if (existing.containsKey(deviceClassEquipmentVO.getCode())) { Long existingEquipmentId = existing.get(deviceClassEquipmentVO.getCode()).getId(); deviceClassEquipmentVO.setId(existingEquipmentId); } } stored.setEquipment(update.getEquipment().orElse(null)); } ======= if (update.getData() != null) { stored.setData(update.getData().orElse(null)); } >>>>>>> if (update.getData() != null) { stored.setData(update.getData().orElse(null)); } <<<<<<< /** * updates Equipment attributes * * @param equipmentUpdate Equipment instance, containing fields to update (Id field will be ignored) * @param equipmentId id of equipment to update * @param deviceClassId class of equipment to update * @return true, if update successful, false otherwise */ @Transactional public boolean update(EquipmentUpdate equipmentUpdate, @NotNull long equipmentId, @NotNull long deviceClassId) { if (equipmentUpdate == null) { return true; } DeviceClassWithEquipmentVO stored = deviceClassDao.find(deviceClassId); DeviceClassEquipmentVO found = null; for (DeviceClassEquipmentVO deviceClassEquipmentVO : stored.getEquipment()) { if (deviceClassEquipmentVO.getId().equals(equipmentId)) { found = deviceClassEquipmentVO; } } if (found == null) { return false; // equipment with id = equipmentId does not exists } if (equipmentUpdate.getCode().isPresent()){ found.setCode(equipmentUpdate.getCode().get()); } if (equipmentUpdate.getName().isPresent()){ found.setName(equipmentUpdate.getName().get()); } if (equipmentUpdate.getType().isPresent()){ found.setType(equipmentUpdate.getType().get()); } if (equipmentUpdate.getData().isPresent()){ found.setData(equipmentUpdate.getData().get()); } deviceClassDao.merge(stored); return true; } @Transactional public Set<DeviceClassEquipmentVO> createEquipment(@NotNull Long classId, @NotNull Set<DeviceClassEquipmentVO> equipments) { DeviceClassWithEquipmentVO deviceClass = deviceClassDao.find(classId); Set<String> existingCodesSet = deviceClass.getEquipment().stream().map(DeviceClassEquipmentVO::getCode).collect(Collectors.toSet()); Set<String> newCodeSet = equipments.stream().map(DeviceClassEquipmentVO::getCode).collect(Collectors.toSet()); newCodeSet.retainAll(existingCodesSet); if (!newCodeSet.isEmpty()) { String codeSet = StringUtils.join(newCodeSet, ","); throw new HiveException(String.format(Messages.DUPLICATE_EQUIPMENT_ENTRY, codeSet, classId), FORBIDDEN.getStatusCode()); } deviceClass.getEquipment().addAll(equipments); deviceClass = deviceClassDao.merge(deviceClass); //TODO [rafa] duuumb, and lazy, in case of several equipments linked to the class two for loops is fine. for (DeviceClassEquipmentVO equipment : equipments) { for (DeviceClassEquipmentVO s : deviceClass.getEquipment()) { if (equipment.getCode().equals(s.getCode())) { equipment.setId(s.getId()); } } } return equipments; } @Transactional public DeviceClassEquipmentVO createEquipment(Long classId, DeviceClassEquipmentVO equipment) { hiveValidator.validate(equipment); DeviceClassWithEquipmentVO deviceClass = deviceClassDao.find(classId); if (deviceClass == null) { throw new HiveException(String.format(Messages.DEVICE_CLASS_NOT_FOUND, classId), NOT_FOUND.getStatusCode()); } if (deviceClass.getIsPermanent()) { throw new HiveException(Messages.UPDATE_PERMANENT_EQUIPMENT, NOT_FOUND.getStatusCode()); } Set<DeviceClassEquipmentVO> equipments = deviceClass.getEquipment(); String newCode = equipment.getCode(); if (equipments != null) { for (DeviceClassEquipmentVO e : equipments) { if (newCode.equals(e.getCode())) { String errorMessage = String.format(Messages.DUPLICATE_EQUIPMENT_ENTRY, e.getCode(), classId); throw new HiveException(errorMessage, FORBIDDEN.getStatusCode()); } } } deviceClass.getEquipment().add(equipment); deviceClass = deviceClassDao.merge(deviceClass); //TODO [rafa] find device equipment class back from the set in device class. for (DeviceClassEquipmentVO s : deviceClass.getEquipment()) { if (equipment.getCode().equals(s.getCode())) { equipment.setId(s.getId()); } } return equipment; } ======= >>>>>>>
<<<<<<< private JsonStringWrapper data; @JsonPolicyDef({DEVICECLASS_PUBLISHED, DEVICE_SUBMITTED}) private Set<DeviceClassEquipmentVO> equipment; public Optional<Set<DeviceClassEquipmentVO>> getEquipment() { return Optional.ofNullable(equipment); } public void setEquipment(Set<DeviceClassEquipmentVO> equipment) { this.equipment = equipment; } ======= private Optional<JsonStringWrapper> data; >>>>>>> private JsonStringWrapper data; <<<<<<< public DeviceClassWithEquipmentVO convertTo() { DeviceClassWithEquipmentVO deviceClass = new DeviceClassWithEquipmentVO(); if (this.id != null){ deviceClass.setId(this.id); ======= public DeviceClassVO convertTo() { DeviceClassVO deviceClass = new DeviceClassVO(); deviceClass.setId(id); if (isPermanent != null) { deviceClass.setIsPermanent(isPermanent.orElse(null)); >>>>>>> public DeviceClassVO convertTo() { DeviceClassVO deviceClass = new DeviceClassVO(); if (this.id != null){ deviceClass.setId(this.id); <<<<<<< if (this.equipment != null){ deviceClass.setEquipment(this.equipment); } ======= >>>>>>>
<<<<<<< @NamedQuery(name = "Equipment.findByCode", query = "select e from Equipment e where e.code = :code"), @NamedQuery(name = "Equipment.getByDeviceClass", query = "select e from Equipment e where e.deviceClass = :deviceClass"), ======= @NamedQuery(name = "Equipment.getByDeviceClass", query = "select e from Equipment e where e.deviceClass = " + ":deviceClass"), >>>>>>> @NamedQuery(name = "Equipment.getByDeviceClass", query = "select e from Equipment e where e.deviceClass = " + ":deviceClass"), <<<<<<< public class Equipment implements Serializable { ======= public class Equipment implements HiveEntity { @SerializedName("id") >>>>>>> public class Equipment implements HiveEntity {
<<<<<<< JwtPayloadView.Builder builder = new JwtPayloadView.Builder(); JwtPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); ======= JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceIds).buildPayload(); >>>>>>> JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); <<<<<<< JwtPayloadView.Builder builder = new JwtPayloadView.Builder(); JwtPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); ======= JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceIds).buildPayload(); >>>>>>> JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); <<<<<<< JwtPayloadView.Builder builder = new JwtPayloadView.Builder(); JwtPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); ======= JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceIds).buildPayload(); >>>>>>> JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); <<<<<<< JwtPayloadView.Builder builder = new JwtPayloadView.Builder(); JwtPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); ======= JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceIds).buildPayload(); >>>>>>> JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); <<<<<<< JwtPayloadView.Builder builder = new JwtPayloadView.Builder(); JwtPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload(); ======= JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceIds).buildPayload(); >>>>>>> JwtUserPayloadView.Builder builder = new JwtUserPayloadView.Builder(); JwtUserPayloadView payload = builder.withPublicClaims(userId, actions, networkIds, deviceTypeIds).buildPayload();
<<<<<<< @JsonPolicyApply(JsonPolicyDef.Policy.USERS_LISTED) public User insertUser(UserRequest user) { ======= public Response insertUser(UserInsert user) { >>>>>>> @JsonPolicyApply(JsonPolicyDef.Policy.USERS_LISTED) public Response insertUser(UserInsert user) { <<<<<<< @JsonPolicyApply(JsonPolicyDef.Policy.USERS_LISTED) public User updateCurrent(UserRequest ui) { ======= public Response updateCurrent(UserInsert ui) { >>>>>>> @JsonPolicyApply(JsonPolicyDef.Policy.USERS_LISTED) public Response updateCurrent(UserInsert ui) {
<<<<<<< ExecutorService executor = Executors.newFixedThreadPool(responseConsumerThreads); Properties consumerProps = consumerProps(); ======= ExecutorService executor = Executors.newCachedThreadPool(); Properties consumerProps = kafkaRpcConfig.clientConsumerProps(); >>>>>>> ExecutorService executor = Executors.newFixedThreadPool(responseConsumerThreads); Properties consumerProps = kafkaRpcConfig.clientConsumerProps();
<<<<<<< LIST_SUBSCRIBE_RESPONSE ======= LIST_SUBSCRIBE_RESPONSE, DEVICE_CREATE_REQUEST, DEVICE_CREATE_RESPONSE, DEVICE_DELETE_REQUEST, DEVICE_DELETE_RESPONSE >>>>>>> LIST_SUBSCRIBE_RESPONSE, DEVICE_DELETE_REQUEST, DEVICE_DELETE_RESPONSE
<<<<<<< package com.devicehive.dao; import com.devicehive.auth.HivePrincipal; import com.devicehive.vo.DeviceVO; import javax.validation.constraints.NotNull; import java.util.List; import java.util.Map; /** * Created by Gleb on 07.07.2016. */ public interface DeviceDao { DeviceVO findByUUID(String uuid); void persist(DeviceVO device); DeviceVO merge(DeviceVO device); int deleteByUUID(String guid); List<DeviceVO> getDeviceList(List<String> guids, HivePrincipal principal); long getAllowedDeviceCount(HivePrincipal principal, List<String> guids); List<DeviceVO> list(String name, String namePattern, String status, Long networkId, String networkName, Long deviceClassId, String deviceClassName, String sortField, @NotNull Boolean sortOrderAsc, Integer take, Integer skip, HivePrincipal principal); Map<String, Integer> getOfflineTimeForDevices(List<String> guids); void changeStatusForDevices(String status, List<String> guids); } ======= package com.devicehive.dao; /* * #%L * DeviceHive Common Dao Interfaces * %% * Copyright (C) 2016 DataArt * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import com.devicehive.auth.HivePrincipal; import com.devicehive.vo.DeviceVO; import javax.validation.constraints.NotNull; import java.util.List; import java.util.Map; /** * Created by Gleb on 07.07.2016. */ public interface DeviceDao { DeviceVO findByUUID(String uuid); void persist(DeviceVO device); DeviceVO merge(DeviceVO device); int deleteByUUID(String guid); List<DeviceVO> getDeviceList(List<String> guids, HivePrincipal principal); long getAllowedDeviceCount(HivePrincipal principal, List<String> guids); List<DeviceVO> getList(String name, String namePattern, String status, Long networkId, String networkName, Long deviceClassId, String deviceClassName, String sortField, @NotNull Boolean sortOrderAsc, Integer take, Integer skip, HivePrincipal principal); Map<String, Integer> getOfflineTimeForDevices(List<String> guids); void changeStatusForDevices(String status, List<String> guids); } >>>>>>> package com.devicehive.dao; /* * #%L * DeviceHive Common Dao Interfaces * %% * Copyright (C) 2016 DataArt * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import com.devicehive.auth.HivePrincipal; import com.devicehive.vo.DeviceVO; import javax.validation.constraints.NotNull; import java.util.List; import java.util.Map; /** * Created by Gleb on 07.07.2016. */ public interface DeviceDao { DeviceVO findByUUID(String uuid); void persist(DeviceVO device); DeviceVO merge(DeviceVO device); int deleteByUUID(String guid); List<DeviceVO> getDeviceList(List<String> guids, HivePrincipal principal); long getAllowedDeviceCount(HivePrincipal principal, List<String> guids); List<DeviceVO> list(String name, String namePattern, String status, Long networkId, String networkName, Long deviceClassId, String deviceClassName, String sortField, @NotNull Boolean sortOrderAsc, Integer take, Integer skip, HivePrincipal principal); Map<String, Integer> getOfflineTimeForDevices(List<String> guids); void changeStatusForDevices(String status, List<String> guids); }
<<<<<<< import com.devicehive.model.IdentityProvider; ======= import com.devicehive.model.Device; >>>>>>> import com.devicehive.model.IdentityProvider; import com.devicehive.model.Device;
<<<<<<< private void validateActions(AccessKey accessKey) { Set<String> actions = new HashSet<>(); for (AccessKeyPermission permission : accessKey.getPermissions()) { Set<String> pActions = permission.getActionsAsSet(); if (pActions != null) { actions.addAll(pActions); } } if (!AvailableActions.validate(actions)) { throw new HiveException(Messages.UNKNOWN_ACTION, Response.Status.BAD_REQUEST.getStatusCode()); } ======= @TransactionAttribute(TransactionAttributeType.SUPPORTS) public AccessKey find(@NotNull Long keyId, @NotNull Long userId) { return accessKeyDAO.get(userId, keyId); >>>>>>> @TransactionAttribute(TransactionAttributeType.SUPPORTS) public AccessKey find(@NotNull Long keyId, @NotNull Long userId) { return accessKeyDAO.get(userId, keyId); } private void validateActions(AccessKey accessKey) { Set<String> actions = new HashSet<>(); for (AccessKeyPermission permission : accessKey.getPermissions()) { Set<String> pActions = permission.getActionsAsSet(); if (pActions != null) { actions.addAll(pActions); } } if (!AvailableActions.validate(actions)) { throw new HiveException(Messages.UNKNOWN_ACTION, Response.Status.BAD_REQUEST.getStatusCode()); }
<<<<<<< /* * #%L * DeviceHive Dao Riak Implementation * %% * Copyright (C) 2016 DataArt * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import com.basho.riak.client.api.RiakClient; ======= >>>>>>> /* * #%L * DeviceHive Dao Riak Implementation * %% * Copyright (C) 2016 DataArt * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ <<<<<<< import org.springframework.beans.factory.annotation.Autowired; ======= import org.springframework.context.annotation.Profile; >>>>>>>
<<<<<<< import android.support.annotation.Nullable; import com.google.android.stardroid.util.OsVersions; ======= >>>>>>>
<<<<<<< import com.google.android.stardroid.activities.DiagnosticActivity; import com.google.android.stardroid.activities.DynamicStarMapModule; import com.google.android.stardroid.activities.DynamicStarMapSubcomponent; ======= import android.content.SharedPreferences; >>>>>>> import android.content.SharedPreferences; import com.google.android.stardroid.activities.DiagnosticActivity; <<<<<<< void inject(DiagnosticActivity activity); ======= >>>>>>> void inject(DiagnosticActivity activity); <<<<<<< void inject(SplashScreenActivity activity); DynamicStarMapSubcomponent newDynamicStarMapSubcomponent(DynamicStarMapModule activityModule); ======= >>>>>>>
<<<<<<< * Display the Terms of Service and privacy policy to the user. */ private Dialog createTermsOfServiceDialog(boolean hideButtons) { AlertDialog tosDialog; LayoutInflater inflater = parentActivity.getLayoutInflater(); View view = inflater.inflate(layout.tos_view, null); String apologyText = parentActivity.getString(string.language_apology_text); Spanned formattedApologyText = Html.fromHtml(apologyText); TextView apologyTextView = (TextView) view.findViewById(R.id.language_apology_box_text); apologyTextView.setText(formattedApologyText, TextView.BufferType.SPANNABLE); String whatsNewText = String.format(parentActivity.getString(string.whats_new_text), getVersionName()); Spanned formattedWhatsNewText = Html.fromHtml(whatsNewText); TextView whatsNewTextView = (TextView) view.findViewById(R.id.whats_new_box_text); whatsNewTextView.setText(formattedWhatsNewText, TextView.BufferType.SPANNABLE); String eulaText = String.format(parentActivity.getString(R.string.eula_text), getVersionName()); Spanned formattedEulaText = Html.fromHtml(eulaText); TextView eulaTextView = (TextView) view.findViewById(R.id.eula_box_text); eulaTextView.setText(formattedEulaText, TextView.BufferType.SPANNABLE); // Note that we've made the "accept" button the negative button and the "decline" button // the positive button as an experiment. if (!hideButtons) { tosDialog = new Builder(parentActivity) .setTitle(string.menu_tos) .setView(view) .setNegativeButton(string.dialog_accept, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { Log.d(TAG, "TOS Dialog closed. User accepts."); parentActivity.recordEulaAccepted(); dialog.dismiss(); analytics.trackEvent( Analytics.APP_CATEGORY, Analytics.TOS_ACCEPT, Analytics.TOS_ACCEPTED, 1); } }) .setPositiveButton(string.dialog_decline, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { Log.d(TAG, "TOS Dialog closed. User declines."); dialog.dismiss(); analytics.trackEvent( Analytics.APP_CATEGORY, Analytics.TOS_ACCEPT, Analytics.TOS_REJECTED, 0); parentActivity.finish(); } }) .create(); } else { tosDialog = new Builder(parentActivity) .setTitle(string.menu_tos) .setView(view) .create(); } return tosDialog; } /** ======= >>>>>>>
<<<<<<< String roomJidId) { ======= String roomJidId, boolean isPrivate) { >>>>>>> String roomJidId, boolean isPrivate) { <<<<<<< Friend friend = DatabaseManager.getFriendById(context, senderId); if (friend == null) { message = context.getResources().getString(R.string.user_created_room, senderId); ======= if(isPrivate) { return; >>>>>>> if(isPrivate) { return; <<<<<<< message = context.getResources().getString(R.string.user_created_room, friend.getFullname()); ======= message = getMessageForNotification(context, senderId); >>>>>>> message = getMessageForNotification(context, senderId); <<<<<<< updateUnreadMessagesCount(context, dialogMessageCache.getRoomJidId(), dialogMessageCache.getMessage()); ======= updateDialog(context, dialogMessageCache.getRoomJidId(), dialogMessageCache.getMessage(), dialogMessageCache.getTime()); >>>>>>> updateDialog(context, dialogMessageCache.getRoomJidId(), dialogMessageCache.getMessage(), dialogMessageCache.getTime()); <<<<<<< String occupantsIdsString = ChatUtils.getOccupantsIdsStringFromList(dialog.getOccupants()); ======= values.put(DialogTable.Cols.LAST_DATE_SENT, dialog.getLastMessageDateSent()); String[] occupantsIdsArray = ChatUtils.getOccupantsIdsArrayFromList(dialog.getOccupants()); String occupantsIdsString = ChatUtils.getOccupantsIdsStringFromArray(occupantsIdsArray); >>>>>>> values.put(DialogTable.Cols.LAST_DATE_SENT, dialog.getLastMessageDateSent()); String occupantsIdsString = ChatUtils.getOccupantsIdsStringFromList(dialog.getOccupants()); <<<<<<< ======= public static int getCountUnreadMessagesByRoomJid(Context context, String roomJidId) { Cursor cursor = context.getContentResolver().query(DialogMessageTable.CONTENT_URI, null, DialogMessageTable.Cols.IS_READ + " = 0 AND " + DialogMessageTable.Cols.ROOM_JID_ID + " = '" + roomJidId + "'", null, null); int countMessages = cursor.getCount(); cursor.close(); return countMessages; } private static List<Friend> getFriendListFromCursor(Cursor cursor) { if (cursor.getCount() > Consts.ZERO_INT_VALUE) { List<Friend> friendList = new ArrayList<Friend>(cursor.getCount()); for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) { friendList.add(getFriendFromCursor(cursor)); } cursor.close(); return friendList; } return null; } public static void clearAllCache(Context context) { DatabaseManager.deleteAllFriends(context); DatabaseManager.deleteAllMessages(context); DatabaseManager.deleteAllDialogs(context); // TODO SF clear something else } public static void updateStatusMessage(Context context, String messageId, boolean isRead) { ContentValues values = new ContentValues(); String condition = DialogMessageTable.Cols.ID + "='" + messageId + "'"; ContentResolver resolver = context.getContentResolver(); Cursor cursor = resolver.query(DialogMessageTable.CONTENT_URI, null, condition, null, null); if (cursor != null && cursor.moveToFirst()) { String roomJidId = cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.ROOM_JID_ID)); String message = cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.BODY)); long time = cursor.getLong(cursor.getColumnIndex(DialogMessageTable.Cols.TIME)); values.put(DialogMessageTable.Cols.IS_READ, isRead); resolver.update(DialogMessageTable.CONTENT_URI, values, condition, null); cursor.close(); updateDialog(context, roomJidId, message, time); } } >>>>>>> public static int getCountUnreadMessagesByRoomJid(Context context, String roomJidId) { Cursor cursor = context.getContentResolver().query(DialogMessageTable.CONTENT_URI, null, DialogMessageTable.Cols.IS_READ + " = 0 AND " + DialogMessageTable.Cols.ROOM_JID_ID + " = '" + roomJidId + "'", null, null); int countMessages = cursor.getCount(); cursor.close(); return countMessages; } private static List<Friend> getFriendListFromCursor(Cursor cursor) { if (cursor.getCount() > Consts.ZERO_INT_VALUE) { List<Friend> friendList = new ArrayList<Friend>(cursor.getCount()); for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) { friendList.add(getFriendFromCursor(cursor)); } cursor.close(); return friendList; } return null; } public static void clearAllCache(Context context) { DatabaseManager.deleteAllFriends(context); DatabaseManager.deleteAllMessages(context); DatabaseManager.deleteAllDialogs(context); // TODO SF clear something else } public static void updateStatusMessage(Context context, String messageId, boolean isRead) { ContentValues values = new ContentValues(); String condition = DialogMessageTable.Cols.ID + "='" + messageId + "'"; ContentResolver resolver = context.getContentResolver(); Cursor cursor = resolver.query(DialogMessageTable.CONTENT_URI, null, condition, null, null); if (cursor != null && cursor.moveToFirst()) { String roomJidId = cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.ROOM_JID_ID)); String message = cursor.getString(cursor.getColumnIndex(DialogMessageTable.Cols.BODY)); long time = cursor.getLong(cursor.getColumnIndex(DialogMessageTable.Cols.TIME)); values.put(DialogMessageTable.Cols.IS_READ, isRead); resolver.update(DialogMessageTable.CONTENT_URI, values, condition, null); cursor.close(); updateDialog(context, roomJidId, message, time); } }
<<<<<<< import java.util.Arrays; import java.util.Collections; import java.util.List; import org.schabi.newpipe.extractor.services.bandcamp.BandcampService; ======= >>>>>>> import org.schabi.newpipe.extractor.services.bandcamp.BandcampService;
<<<<<<< import com.quickblox.module.content.model.QBFile; ======= import com.quickblox.internal.core.exception.BaseServiceException; import com.quickblox.module.chat.QBChatService; >>>>>>> import com.quickblox.module.content.model.QBFile; import com.quickblox.internal.core.exception.BaseServiceException; import com.quickblox.module.chat.QBChatService; <<<<<<< import com.quickblox.qmunicate.ui.mediacall.CallActivity; ======= import com.quickblox.qmunicate.ui.utils.Consts; >>>>>>> import com.quickblox.qmunicate.ui.mediacall.CallActivity; import com.quickblox.qmunicate.ui.utils.Consts; <<<<<<< import com.quickblox.qmunicate.ui.utils.ErrorUtils; ======= import com.quickblox.qmunicate.ui.utils.ErrorUtils; import com.quickblox.qmunicate.ui.utils.UriCreator; import com.quickblox.qmunicate.ui.videocall.VideoCallActivity; import com.quickblox.qmunicate.ui.voicecall.VoiceCallActivity; >>>>>>> import com.quickblox.qmunicate.ui.videocall.VideoCallActivity; import com.quickblox.qmunicate.ui.voicecall.VoiceCallActivity; <<<<<<< ======= private void initChat() { if (QBChatService.getInstance().isLoggedIn()) { SignalingChannel signalingChannel = new SignalingChannel( QBChatService.getInstance().getPrivateChatInstance()); } } >>>>>>> private void initChat() { if (QBChatService.getInstance().isLoggedIn()) { SignalingChannel signalingChannel = new SignalingChannel( QBChatService.getInstance().getPrivateChatInstance()); } } <<<<<<< //QBGetFileCommand.start(this, friend.getFileId()); ======= try { String uri = UriCreator.getUri(friend.getAvatarUid()); ImageLoader.getInstance().displayImage(uri, avatarImageView, Consts.avatarDisplayOptions); } catch (BaseServiceException e) { ErrorUtils.showError(this, e); } >>>>>>> try { String uri = UriCreator.getUri(friend.getAvatarUid()); ImageLoader.getInstance().displayImage(uri, avatarImageView, Consts.avatarDisplayOptions); } catch (BaseServiceException e) { ErrorUtils.showError(this, e); }
<<<<<<< } if (lowercaseUrl.contains("youtube.com/shared?ci=")) { return getRealIdFromSharedLink(url); } if (url.contains("vnd.youtube")) { return Parser.matchGroup1(ID_PATTERN, url); } if (url.contains("embed")) { return Parser.matchGroup1("embed/" + ID_PATTERN, url); } if (url.contains("googleads")) { ======= } else if (url.contains("vnd.youtube")) { id = Parser.matchGroup1(ID_PATTERN, url); } else if (url.contains("embed")) { id = Parser.matchGroup1("embed/" + ID_PATTERN, url); } else if (url.contains("googleads")) { >>>>>>> } if (url.contains("vnd.youtube")) { return Parser.matchGroup1(ID_PATTERN, url); } if (url.contains("embed")) { return Parser.matchGroup1("embed/" + ID_PATTERN, url); } if (url.contains("googleads")) {
<<<<<<< import com.quickblox.ui.kit.chatmessage.adapter.listeners.QBChatMessageLinkClickListener; import com.quickblox.ui.kit.chatmessage.adapter.utils.QBMessageTextClickMovement; ======= import com.quickblox.q_municate_user_service.model.QMUser; >>>>>>> import com.quickblox.ui.kit.chatmessage.adapter.listeners.QBChatMessageLinkClickListener; import com.quickblox.ui.kit.chatmessage.adapter.utils.QBMessageTextClickMovement; import com.quickblox.q_municate_user_service.model.QMUser; <<<<<<< protected BaseChatMessagesAdapter messagesAdapter; protected User opponentUser; ======= protected BaseRecyclerViewAdapter messagesAdapter; protected QMUser opponentUser; >>>>>>> protected BaseChatMessagesAdapter messagesAdapter; protected QMUser opponentUser;
<<<<<<< @Override public String getBaseUrl() { return "https://soundcloud.com"; } ======= >>>>>>>
<<<<<<< import android.view.View; import android.widget.ImageView; import android.widget.TextView; ======= import android.view.View; import android.widget.ImageView; >>>>>>> import android.view.View; import android.widget.ImageView; import android.widget.TextView; <<<<<<< avatarImageView = _findViewById(R.id.avatarImageView); nameTextView = _findViewById(R.id.nameTextView); onlineImageView = _findViewById(R.id.onlineImageView); onlineStatusTextView = _findViewById(R.id.onlineStatusTextView); photeTextView = _findViewById(R.id.photeTextView); friend = (Friend) getIntent().getExtras().getSerializable(PARAM_FRIEND); fillUI(friend); runLoader(FriendDetailsLoader.ID, FriendDetailsLoader.newArguments(friend.getId())); } private void fillUI(Friend friend) { new QBLoadImageTask(this).execute(friend.getFileId(), avatarImageView); nameTextView.setText(friend.getFullname()); if (friend.isOnline()) { onlineImageView.setVisibility(View.VISIBLE); } else { onlineImageView.setVisibility(View.INVISIBLE); } onlineStatusTextView.setText(friend.getOnlineStatus()); photeTextView.setText(friend.getPhone()); ======= initUI(); } private void initUI() { imageViewFriendVideoCall = _findViewById(R.id.imageViewFriendVideoCall); imageViewFriendVoiceCall = _findViewById(R.id.imageViewFriendVoiceCall); } public void onClickStartFriendVideoCallActivity(View view) { FriendVideoCallActivity.start(FriendDetailsActivity.this); } public void onClickStartFriendVoiceCallActivity(View view) { FriendVoiceCallActivity.start(FriendDetailsActivity.this); >>>>>>> avatarImageView = _findViewById(R.id.avatarImageView); nameTextView = _findViewById(R.id.nameTextView); onlineImageView = _findViewById(R.id.onlineImageView); onlineStatusTextView = _findViewById(R.id.onlineStatusTextView); photeTextView = _findViewById(R.id.photeTextView); imageViewFriendVideoCall = _findViewById(R.id.imageViewFriendVideoCall); imageViewFriendVoiceCall = _findViewById(R.id.imageViewFriendVoiceCall); friend = (Friend) getIntent().getExtras().getSerializable(PARAM_FRIEND); fillUI(friend); runLoader(FriendDetailsLoader.ID, FriendDetailsLoader.newArguments(friend.getId())); } private void fillUI(Friend friend) { new QBLoadImageTask(this).execute(friend.getFileId(), avatarImageView); nameTextView.setText(friend.getFullname()); if (friend.isOnline()) { onlineImageView.setVisibility(View.VISIBLE); } else { onlineImageView.setVisibility(View.INVISIBLE); } onlineStatusTextView.setText(friend.getOnlineStatus()); photeTextView.setText(friend.getPhone());
<<<<<<< logger.info("Running COPY from file {}", s3KeyName); // create temporary credential right before COPY operation because // it has timeout. BasicSessionCredentials creds = generateReaderSessionCredentials(s3KeyName); ======= >>>>>>>
<<<<<<< public void testReplaceLongNameMultibyte() throws Exception { String table = "TEST12345678901234567890"; dropTable(table); createTable(table); run("/yml/test-replace-long-name-multibyte.yml"); assertGeneratedTable(table); } ======= public void testStringTimestamp() throws Exception { String table = "TEST1"; dropTable(table); createTable(table); run("/yml/test-string-timestamp.yml"); assertTable(table, TimeZone.getDefault()); } >>>>>>> public void testReplaceLongNameMultibyte() throws Exception { String table = "TEST12345678901234567890"; run("/yml/test-replace-long-name-multibyte.yml"); assertGeneratedTable(table); } public void testStringTimestamp() throws Exception { String table = "TEST1"; dropTable(table); createTable(table); run("/yml/test-string-timestamp.yml"); assertTable(table, TimeZone.getDefault()); }
<<<<<<< isRunning = true; TransactionManager.paymentUsingCard(mTransactionRequest.getActivity(), cardTransfer, ======= TransactionManager.paymentUsingCard(transactionRequest.getActivity(), cardTransfer, >>>>>>> isRunning = true; TransactionManager.paymentUsingCard(transactionRequest.getActivity(), cardTransfer, <<<<<<< isRunning = true; TransactionManager.paymentUsingMandiriClickPay(mTransactionRequest.getActivity(), ======= TransactionManager.paymentUsingMandiriClickPay(transactionRequest.getActivity(), >>>>>>> isRunning = true; TransactionManager.paymentUsingMandiriClickPay(transactionRequest.getActivity(), <<<<<<< isRunning = true; TransactionManager.paymentUsingMandiriBillPay(mTransactionRequest.getActivity(), ======= TransactionManager.paymentUsingMandiriBillPay(transactionRequest.getActivity(), >>>>>>> isRunning = true; TransactionManager.paymentUsingMandiriBillPay(transactionRequest.getActivity(), <<<<<<< mTransactionRequest = transactionRequest; Logger.i("transaction info set"); ======= this.transactionRequest = transactionRequest; >>>>>>> this.transactionRequest = transactionRequest;
<<<<<<< public void showAddCardDetailFragment(SaveCardRequest card, PromoResponse promoResponse) { showCardDetailFragment(card, promoResponse); } ======= public void setFromSavedCard(boolean fromSavedCard) { this.fromSavedCard = fromSavedCard; } >>>>>>> public void setFromSavedCard(boolean fromSavedCard) { this.fromSavedCard = fromSavedCard; } public void showAddCardDetailFragment(SaveCardRequest card, PromoResponse promoResponse) { showCardDetailFragment(card, promoResponse); }
<<<<<<< textTotalAmount = findViewById(R.id.text_amount); ======= String currency = transaction.getTransactionDetails().getCurrency(); textTotalAmount = findViewById(R.id.text_amount); >>>>>>> String currency = transaction.getTransactionDetails().getCurrency(); textTotalAmount = findViewById(R.id.text_amount); <<<<<<< TextView textOrderId = findViewById(R.id.text_order_id); if (textOrderId != null) { textOrderId.setText(transaction.getTransactionDetails().getOrderId()); } ======= // init item details List<ItemDetails> itemDetails = paymentDetails.getItemDetailsList(); initTransactionDetail(itemDetails, currency); } >>>>>>> // init item details List<ItemDetails> itemDetails = paymentDetails.getItemDetailsList(); initTransactionDetail(itemDetails, currency); } TextView textOrderId = findViewById(R.id.text_order_id); if (textOrderId != null) { textOrderId.setText(transaction.getTransactionDetails().getOrderId()); }
<<<<<<< public static final int MONTH_COUNT = 12; public static final CharSequence RETROFIT_NETWORK_MESSAGE = "Unable to resolve host"; public static final CharSequence CALLBACK_STRING = "/token/callback/"; public static final String WEBURL = "weburl"; public static final String BANK_NAME = "bni"; ======= /** * When failed to create api request, probably because of no network connection. */ public static final String ERROR_UNABLE_TO_CONNECT = "failed to connect to server."; public static final String ERROR_INVALID_EMAIL_ID = "Invalid email Id."; public static final String SUCCESS_CODE_200 = "200"; public static final String SUCCESS_CODE_201 = "201"; >>>>>>> public static final int MONTH_COUNT = 12; public static final CharSequence RETROFIT_NETWORK_MESSAGE = "Unable to resolve host"; public static final CharSequence CALLBACK_STRING = "/token/callback/"; public static final String WEBURL = "weburl"; public static final String BANK_NAME = "bni"; /** * When failed to create api request, probably because of no network connection. */ public static final String ERROR_UNABLE_TO_CONNECT = "failed to connect to server."; public static final String ERROR_INVALID_EMAIL_ID = "Invalid email Id."; public static final String SUCCESS_CODE_200 = "200"; public static final String SUCCESS_CODE_201 = "201";
<<<<<<< ======= public static String createPaymentErrorMessage(Context context, String errorMessage, String defaultMessage) { String message; if (!TextUtils.isEmpty(defaultMessage)) { message = defaultMessage; } else { message = context.getString(R.string.payment_failed); } if (errorMessage == null) { message = context.getString(R.string.error_empty_response); } else { if (errorMessage.contains(TIME_OUT) || errorMessage.contains(TIMED_OUT)) { message = context.getString(R.string.timeout_message); } } return message; } >>>>>>> public static String createPaymentErrorMessage(Context context, String errorMessage, String defaultMessage) { String message; if (!TextUtils.isEmpty(defaultMessage)) { message = defaultMessage; } else { message = context.getString(R.string.payment_failed); } if (errorMessage == null) { message = context.getString(R.string.error_empty_response); } else { if (errorMessage.contains(TIME_OUT) || errorMessage.contains(TIMED_OUT)) { message = context.getString(R.string.timeout_message); } } return message; }
<<<<<<< ======= for (int i = 0; i < userAddresses.size(); i++) { UserAddress userAddress = userAddresses.get(i); if (userAddress.getAddressType() == Constants.ADDRESS_TYPE_BILLING) { BillingAddress billingAddress; billingAddress = new BillingAddress(); billingAddress.setCity(userAddress.getCity()); billingAddress.setFirstName(userDetail.getUserFullName()); billingAddress.setLastName(""); billingAddress.setPhone(userDetail.getPhoneNumber()); billingAddress.setCountryCode(userAddress.getCountry()); billingAddress.setPostalCode(userAddress.getZipcode()); billingAddresses.add(billingAddress); } } CardPaymentDetails cardPaymentDetails = new CardPaymentDetails(Constants.BANK_NAME, tokenDetailsResponse.getTokenId(), cbStoreCard.isChecked()); try { CardTransfer cardTransfer = new CardTransfer(cardPaymentDetails, transactionDetails, null, billingAddresses, null, customerDetails); ((CreditDebitCardFlowActivity) getActivity()).payUsingCard(cardTransfer, this); currentApiCallNumber = PAY_USING_CARD; }catch (NullPointerException e){ e.printStackTrace(); } } } } } } >>>>>>>
<<<<<<< @ColorInt public static int getThemeColor(@NonNull final Context context, @AttrRes final int attributeColor) { final TypedValue value = new TypedValue(); context.getTheme().resolveAttribute(attributeColor, value, true); return value.data; } ======= public static List<SavedToken> removeCardFromSavedCards(List<SavedToken> savedTokens, String maskedCard) { List<SavedToken> updatedTokens = new ArrayList<>(); for (SavedToken savedToken : savedTokens) { if (!savedToken.getMaskedCard().equals(maskedCard)) { updatedTokens.add(savedToken); } } return updatedTokens; } public static ArrayList<SaveCardRequest> convertSavedToken(List<SavedToken> savedTokens) { ArrayList<SaveCardRequest> cards = new ArrayList<>(); if (savedTokens != null && !savedTokens.isEmpty()) { for (SavedToken saved : savedTokens) { cards.add(new SaveCardRequest(saved.getToken(), saved.getMaskedCard(), saved.getTokenType())); } } return cards; } public static List<SaveCardRequest> filterCardsByClickType(Context context, List<SaveCardRequest> cards) { MidtransSDK midtransSDK = MidtransSDK.getInstance(); ArrayList<SaveCardRequest> filteredCards = new ArrayList<>(); if (cards != null && !cards.isEmpty()) { if (midtransSDK.isEnableBuiltInTokenStorage()) { for (SaveCardRequest card : cards) { if (midtransSDK.getTransactionRequest().getCardClickType().equals(context.getString(R.string.card_click_type_one_click)) && card.getType().equals(context.getString(R.string.saved_card_one_click))) { filteredCards.add(card); } else if (midtransSDK.getTransactionRequest().getCardClickType().equals(context.getString(R.string.card_click_type_two_click)) && card.getType().equals(context.getString(R.string.saved_card_two_click))) { filteredCards.add(card); } } } else { //if token storage on merchant server then saved cards can be used just for two click String clickType = midtransSDK.getTransactionRequest().getCardClickType(); if (!TextUtils.isEmpty(clickType) && clickType.equals(context.getString(R.string.card_click_type_two_click))) { filteredCards.addAll(cards); } } } return filteredCards; } public static List<SaveCardRequest> filterMultipleSavedCard(ArrayList<SaveCardRequest> savedCards) { Collections.reverse(savedCards); Set<String> maskedCardSet = new HashSet<>(); for (Iterator<SaveCardRequest> it = savedCards.iterator(); it.hasNext(); ) { if (!maskedCardSet.add(it.next().getMaskedCard())) { it.remove(); } } return savedCards; } >>>>>>> public static List<SavedToken> removeCardFromSavedCards(List<SavedToken> savedTokens, String maskedCard) { List<SavedToken> updatedTokens = new ArrayList<>(); for (SavedToken savedToken : savedTokens) { if (!savedToken.getMaskedCard().equals(maskedCard)) { updatedTokens.add(savedToken); } } return updatedTokens; } public static ArrayList<SaveCardRequest> convertSavedToken(List<SavedToken> savedTokens) { ArrayList<SaveCardRequest> cards = new ArrayList<>(); if (savedTokens != null && !savedTokens.isEmpty()) { for (SavedToken saved : savedTokens) { cards.add(new SaveCardRequest(saved.getToken(), saved.getMaskedCard(), saved.getTokenType())); } } return cards; } public static List<SaveCardRequest> filterCardsByClickType(Context context, List<SaveCardRequest> cards) { MidtransSDK midtransSDK = MidtransSDK.getInstance(); ArrayList<SaveCardRequest> filteredCards = new ArrayList<>(); if (cards != null && !cards.isEmpty()) { if (midtransSDK.isEnableBuiltInTokenStorage()) { for (SaveCardRequest card : cards) { if (midtransSDK.getTransactionRequest().getCardClickType().equals(context.getString(R.string.card_click_type_one_click)) && card.getType().equals(context.getString(R.string.saved_card_one_click))) { filteredCards.add(card); } else if (midtransSDK.getTransactionRequest().getCardClickType().equals(context.getString(R.string.card_click_type_two_click)) && card.getType().equals(context.getString(R.string.saved_card_two_click))) { filteredCards.add(card); } } } else { //if token storage on merchant server then saved cards can be used just for two click String clickType = midtransSDK.getTransactionRequest().getCardClickType(); if (!TextUtils.isEmpty(clickType) && clickType.equals(context.getString(R.string.card_click_type_two_click))) { filteredCards.addAll(cards); } } } return filteredCards; } public static List<SaveCardRequest> filterMultipleSavedCard(ArrayList<SaveCardRequest> savedCards) { Collections.reverse(savedCards); Set<String> maskedCardSet = new HashSet<>(); for (Iterator<SaveCardRequest> it = savedCards.iterator(); it.hasNext(); ) { if (!maskedCardSet.add(it.next().getMaskedCard())) { it.remove(); } } return savedCards; } @ColorInt public static int getThemeColor(@NonNull final Context context, @AttrRes final int attributeColor) { final TypedValue value = new TypedValue(); context.getTheme().resolveAttribute(attributeColor, value, true); return value.data; }
<<<<<<< public class TransactionManager extends BaseTransactionManager{ ======= public class TransactionManager { // Event Name private static final String KEY_TRANSACTION_SUCCESS = "Transaction Success"; private static final String KEY_TRANSACTION_FAILED = "Transaction Failed"; private static final String KEY_TOKENIZE_SUCCESS = "Tokenize Success"; private static final String KEY_TOKENIZE_FAILED = "Tokenize Failed"; // Payment Name private static final String PAYMENT_TYPE_CIMB_CLICK = "cimb_click"; private static final String PAYMENT_TYPE_BCA_KLIKPAY = "bca_klikpay"; private static final String PAYMENT_TYPE_MANDIRI_CLICKPAY = "mandiri_clickpay"; private static final String PAYMENT_TYPE_MANDIRI_ECASH = "mandiri_ecash"; private static final String PAYMENT_TYPE_BANK_TRANSFER = "bank_transfer"; private static final String PAYMENT_TYPE_CREDIT_CARD = "cc"; private static final String PAYMENT_TYPE_BRI_EPAY = "bri_epay"; private static final String PAYMENT_TYPE_BBM_MONEY = "bbm_money"; private static final String PAYMENT_TYPE_INDOSAT_DOMPETKU = "indosat_dompetku"; private static final String PAYMENT_TYPE_INDOMARET = "indomaret"; private static final String PAYMENT_TYPE_KLIK_BCA = "bca_klikbca"; private static final String PAYMENT_TYPE_SNAP = "snap"; // Snap private static final String GET_SNAP_TRANSACTION_FAILED = "Failed Getting Snap Transaction"; private static final String GET_SNAP_TRANSACTION_SUCCESS = "Success Getting Snap Transaction"; // Bank transfer type private static final String BANK_PERMATA = "permata"; private static final String BANK_BCA = "bca"; private static final String BANK_MANDIRI = "mandiri"; private Context context; private VeritransRestAPI veritransPaymentAPI; private MerchantRestAPI merchantPaymentAPI; private boolean isSDKLogEnabled = false; private MixpanelAnalyticsManager analyticsManager; >>>>>>> public class TransactionManager extends BaseTransactionManager{ // Payment Name private static final String PAYMENT_TYPE_CIMB_CLICK = "cimb_click"; private static final String PAYMENT_TYPE_BCA_KLIKPAY = "bca_klikpay"; private static final String PAYMENT_TYPE_MANDIRI_CLICKPAY = "mandiri_clickpay"; private static final String PAYMENT_TYPE_MANDIRI_ECASH = "mandiri_ecash"; private static final String PAYMENT_TYPE_BANK_TRANSFER = "bank_transfer"; private static final String PAYMENT_TYPE_CREDIT_CARD = "cc"; private static final String PAYMENT_TYPE_BRI_EPAY = "bri_epay"; private static final String PAYMENT_TYPE_BBM_MONEY = "bbm_money"; private static final String PAYMENT_TYPE_INDOSAT_DOMPETKU = "indosat_dompetku"; private static final String PAYMENT_TYPE_INDOMARET = "indomaret"; private static final String PAYMENT_TYPE_KLIK_BCA = "bca_klikbca"; private static final String PAYMENT_TYPE_SNAP = "snap"; // Snap private static final String GET_SNAP_TRANSACTION_FAILED = "Failed Getting Snap Transaction"; private static final String GET_SNAP_TRANSACTION_SUCCESS = "Success Getting Snap Transaction"; // Bank transfer type private static final String BANK_PERMATA = "permata"; private static final String BANK_BCA = "bca"; private static final String BANK_MANDIRI = "mandiri"; <<<<<<< ======= private static void displayTokenResponse(TokenDetailsResponse tokenDetailsResponse) { Logger.d("token response: status code ", "" + tokenDetailsResponse.getStatusCode()); Logger.d("token response: status message ", "" + tokenDetailsResponse.getStatusMessage()); Logger.d("token response: token Id ", "" + tokenDetailsResponse .getTokenId()); Logger.d("token response: redirect url ", "" + tokenDetailsResponse.getRedirectUrl()); Logger.d("token response: bank ", "" + tokenDetailsResponse .getBank()); } private static void displayResponse(TransactionResponse transferResponse) { Logger.d("transfer response: virtual account" + " number ", "" + transferResponse.getPermataVANumber()); Logger.d(" transfer response: status message " + "", "" + transferResponse.getStatusMessage()); Logger.d(" transfer response: status code ", "" + transferResponse.getStatusCode()); Logger.d(" transfer response: transaction Id ", "" + transferResponse .getTransactionId()); Logger.d(" transfer response: transaction " + "status ", "" + transferResponse .getTransactionStatus()); } public void setVeritransPaymentAPI(VeritransRestAPI veritransPaymentAPI) { this.veritransPaymentAPI = veritransPaymentAPI; } public void setMerchantPaymentAPI(MerchantRestAPI merchantPaymentAPI) { this.merchantPaymentAPI = merchantPaymentAPI; } public void setSDKLogEnabled(boolean SDKLogEnabled) { isSDKLogEnabled = SDKLogEnabled; } >>>>>>> private static void displayTokenResponse(TokenDetailsResponse tokenDetailsResponse) { Logger.d("token response: status code ", "" + tokenDetailsResponse.getStatusCode()); Logger.d("token response: status message ", "" + tokenDetailsResponse.getStatusMessage()); Logger.d("token response: token Id ", "" + tokenDetailsResponse .getTokenId()); Logger.d("token response: redirect url ", "" + tokenDetailsResponse.getRedirectUrl()); Logger.d("token response: bank ", "" + tokenDetailsResponse .getBank()); } private static void displayResponse(TransactionResponse transferResponse) { Logger.d("transfer response: virtual account" + " number ", "" + transferResponse.getPermataVANumber()); Logger.d(" transfer response: status message " + "", "" + transferResponse.getStatusMessage()); Logger.d(" transfer response: status code ", "" + transferResponse.getStatusCode()); Logger.d(" transfer response: transaction Id ", "" + transferResponse .getTransactionId()); Logger.d(" transfer response: transaction " + "status ", "" + transferResponse .getTransactionStatus()); } public void setVeritransPaymentAPI(VeritransRestAPI veritransPaymentAPI) { this.veritransPaymentAPI = veritransPaymentAPI; } public void setMerchantPaymentAPI(MerchantRestAPI merchantPaymentAPI) { this.merchantPaymentAPI = merchantPaymentAPI; } public void setSDKLogEnabled(boolean SDKLogEnabled) { isSDKLogEnabled = SDKLogEnabled; }
<<<<<<< private SwitchCompat switchSaveCard, switchBanksPoint; private Button buttonIncrease, buttonDecrease; ======= private AppCompatCheckBox cbSaveCard; private FancyButton buttonIncrease, buttonDecrease; >>>>>>> private AppCompatCheckBox cbSaveCard; private FancyButton buttonIncrease, buttonDecrease; <<<<<<< private ImageView imageCvvHelp; private ImageView imageBanksPointHelp; ======= private ImageButton imageCvvHelp; >>>>>>> private ImageButton imageCvvHelp; private ImageView imageBanksPointHelp; <<<<<<< private LinearLayout layoutInstallment, layoutSaveCard, layoutBanksPoint; ======= private LinearLayout layoutInstallment; private RelativeLayout layoutSaveCard; >>>>>>> private LinearLayout layoutInstallment; private RelativeLayout layoutSaveCard; private LinearLayout layoutBanksPoint; <<<<<<< switchSaveCard = (SwitchCompat) view.findViewById(R.id.cb_store_card); switchBanksPoint = (SwitchCompat) view.findViewById(R.id.cb_bni_point); ======= cbSaveCard = (AppCompatCheckBox) view.findViewById(R.id.cb_store_card); >>>>>>> cbSaveCard = (AppCompatCheckBox) view.findViewById(R.id.cb_store_card); <<<<<<< imageCvvHelp = (ImageView) view.findViewById(R.id.image_cvv_help); imageBanksPointHelp = (ImageView) view.findViewById(R.id.image_bni_help); payNowBtn = (Button) view.findViewById(R.id.btn_pay_now); ======= imageCvvHelp = (ImageButton) view.findViewById(R.id.image_cvv_help); payNowBtn = (FancyButton) view.findViewById(R.id.btn_pay_now); >>>>>>> imageCvvHelp = (ImageButton) view.findViewById(R.id.image_cvv_help); payNowBtn = (FancyButton) view.findViewById(R.id.btn_pay_now); imageBanksPointHelp = (ImageView) view.findViewById(R.id.image_bni_help); payNowBtn = (Button) view.findViewById(R.id.btn_pay_now); <<<<<<< layoutSaveCard = (LinearLayout) view.findViewById(R.id.layout_save_card_detail); layoutBanksPoint = (LinearLayout) view.findViewById(R.id.layout_bni_point); buttonIncrease = (Button) view.findViewById(R.id.button_installment_increase); buttonDecrease = (Button) view.findViewById(R.id.button_installment_decrease); ======= layoutSaveCard = (RelativeLayout) view.findViewById(R.id.layout_save_card_detail); buttonIncrease = (FancyButton) view.findViewById(R.id.button_installment_increase); buttonDecrease = (FancyButton) view.findViewById(R.id.button_installment_decrease); >>>>>>> layoutSaveCard = (RelativeLayout) view.findViewById(R.id.layout_save_card_detail); buttonIncrease = (FancyButton) view.findViewById(R.id.button_installment_increase); buttonDecrease = (FancyButton) view.findViewById(R.id.button_installment_decrease); layoutBanksPoint = (LinearLayout) view.findViewById(R.id.layout_bni_point); <<<<<<< private void initBNIPoints(boolean validCardNumber) { ArrayList<String> pointBanks = MidtransSDK.getInstance().getBanksPointEnabled(); if (validCardNumber && pointBanks != null && !pointBanks.isEmpty()) { String cardBin = cardNumber.replace(" ", "").substring(0, 6); String bankBin = ((CreditDebitCardFlowActivity) getActivity()).getBankByBin(cardBin); if (!TextUtils.isEmpty(bankBin) && bankBin.equals(BankType.BNI)) { showBanksPoint(true); } else { showBanksPoint(false); } } else { showBanksPoint(false); } } private boolean isBanksPointActivated() { if (layoutBanksPoint.getVisibility() == View.VISIBLE && switchBanksPoint.isChecked()) { return true; } return false; } private void showBanksPoint(boolean show) { if (show) { layoutBanksPoint.setVisibility(View.VISIBLE); } else { layoutBanksPoint.setVisibility(View.GONE); } } ======= private void changeDialogButtonColor(AlertDialog alertDialog) { if (alertDialog.isShowing() && midtransSDK != null && midtransSDK.getColorTheme() != null && midtransSDK.getColorTheme().getPrimaryDarkColor() != 0) { Button positiveButton = alertDialog.getButton(DialogInterface.BUTTON_POSITIVE); positiveButton.setTextColor(midtransSDK.getColorTheme().getPrimaryDarkColor()); } } >>>>>>> private void initBNIPoints(boolean validCardNumber) { ArrayList<String> pointBanks = MidtransSDK.getInstance().getBanksPointEnabled(); if (validCardNumber && pointBanks != null && !pointBanks.isEmpty()) { String cardBin = cardNumber.replace(" ", "").substring(0, 6); String bankBin = ((CreditDebitCardFlowActivity) getActivity()).getBankByBin(cardBin); if (!TextUtils.isEmpty(bankBin) && bankBin.equals(BankType.BNI)) { showBanksPoint(true); } else { showBanksPoint(false); } } else { showBanksPoint(false); } } private boolean isBanksPointActivated() { if (layoutBanksPoint.getVisibility() == View.VISIBLE && switchBanksPoint.isChecked()) { return true; } return false; } private void showBanksPoint(boolean show) { if (show) { layoutBanksPoint.setVisibility(View.VISIBLE); } else { layoutBanksPoint.setVisibility(View.GONE); } } private void changeDialogButtonColor(AlertDialog alertDialog) { if (alertDialog.isShowing() && midtransSDK != null && midtransSDK.getColorTheme() != null && midtransSDK.getColorTheme().getPrimaryDarkColor() != 0) { Button positiveButton = alertDialog.getButton(DialogInterface.BUTTON_POSITIVE); positiveButton.setTextColor(midtransSDK.getColorTheme().getPrimaryDarkColor()); } }
<<<<<<< public static final int PAYMENT_METHOD_NOT_SELECTED = -1; public static final int PAYMENT_METHOD_OFFERS = 1; public static final int PAYMENT_METHOD_CREDIT_OR_DEBIT = 2; public static final int PAYMENT_METHOD_MANDIRI_CLICK_PAY = 3; public static final int PAYMENT_METHOD_CIMB_CLICKS = 4; public static final int PAYMENT_METHOD_EPAY_BRI = 5; public static final int PAYMENT_METHOD_BBM_MONEY = 6; public static final int PAYMENT_METHOD_INDOSAT_DOMPETKU = 7; public static final int PAYMENT_METHOD_MANDIRI_ECASH = 8; public static final int PAYMENT_METHOD_MANDIRI_BILL_PAYMENT = 9; public static final int PAYMENT_METHOD_PERMATA_VA_BANK_TRANSFER = 10; public static final String TAG = "VeritransSDK"; ======= public static final int PHONE_NUMBER_LENGTH = 10; public static final String USER_DETAILS = "user_details"; public static final int ZIPCODE_LENGTH = 6; public static final String USER_ADDRESS_DETAILS = "user_address_details"; >>>>>>> public static final int PAYMENT_METHOD_NOT_SELECTED = -1; public static final int PAYMENT_METHOD_OFFERS = 1; public static final int PAYMENT_METHOD_CREDIT_OR_DEBIT = 2; public static final int PAYMENT_METHOD_MANDIRI_CLICK_PAY = 3; public static final int PAYMENT_METHOD_CIMB_CLICKS = 4; public static final int PAYMENT_METHOD_EPAY_BRI = 5; public static final int PAYMENT_METHOD_BBM_MONEY = 6; public static final int PAYMENT_METHOD_INDOSAT_DOMPETKU = 7; public static final int PAYMENT_METHOD_MANDIRI_ECASH = 8; public static final int PAYMENT_METHOD_MANDIRI_BILL_PAYMENT = 9; public static final int PAYMENT_METHOD_PERMATA_VA_BANK_TRANSFER = 10; public static final String TAG = "VeritransSDK"; public static final int PHONE_NUMBER_LENGTH = 10; public static final String USER_DETAILS = "user_details"; public static final int ZIPCODE_LENGTH = 6; public static final String USER_ADDRESS_DETAILS = "user_address_details";
<<<<<<< public void getToken(Activity activity, CardTokenRequest cardTokenRequest, TokenCallBack tokenCallBack) { ======= public void getToken(Activity activity, CardTokenRequest cardTokenRequest, TokenCallBack tokenCallBack) { >>>>>>> public void getToken(Activity activity, CardTokenRequest cardTokenRequest, TokenCallBack tokenCallBack) { <<<<<<< TransactionCallback cardPaymentTransactionCallback) { if (activity != null && mandiriClickPayRequestModel != null && cardPaymentTransactionCallback != null) { setCurrentPaymentMethod(Constants.PAYMENT_METHOD_MANDIRI_CLICK_PAY); ======= TransactionCallback cardPaymentTransactionCallback ) { if (activity != null && mandiriClickPayRequestModel != null && cardPaymentTransactionCallback != null) { >>>>>>> TransactionCallback cardPaymentTransactionCallback) { if (activity != null && mandiriClickPayRequestModel != null && cardPaymentTransactionCallback != null) { <<<<<<< public int getCurrentPaymentMethod() { return currentPaymentMethod; } private void setCurrentPaymentMethod(int currentPaymentMethod) { VeritransSDK.currentPaymentMethod = currentPaymentMethod; } public static String getCardClickType() { return cardClickType; } public static boolean isSecureCard() { return isSecureCard; } ======= public void paymentUsingMandiriBillPay(Activity activity, MandiriBillPayTransferModel mandiriBillPayTransferModel, TransactionCallback mandiriBillPayTransferStatus) { if (activity != null && mandiriBillPayTransferModel != null && mandiriBillPayTransferStatus != null) { if(mandiriBillPayTransferModel.getBillInfoModel() != null && mandiriBillPayTransferModel.getItemDetails() != null) { TransactionManager.paymentUsingMandiriBillPay(activity, mandiriBillPayTransferModel, mandiriBillPayTransferStatus); }else{ Logger.e("Error: both bill info and item details are necessary."); } } else { Logger.e(Constants.ERROR_INVALID_DATA_SUPPLIED); } } >>>>>>> public void paymentUsingMandiriBillPay(Activity activity, MandiriBillPayTransferModel mandiriBillPayTransferModel, TransactionCallback mandiriBillPayTransferStatus) { if (activity != null && mandiriBillPayTransferModel != null && mandiriBillPayTransferStatus != null) { if(mandiriBillPayTransferModel.getBillInfoModel() != null && mandiriBillPayTransferModel.getItemDetails() != null) { TransactionManager.paymentUsingMandiriBillPay(activity, mandiriBillPayTransferModel, mandiriBillPayTransferStatus); }else{ Logger.e("Error: both bill info and item details are necessary."); } } else { Logger.e(Constants.ERROR_INVALID_DATA_SUPPLIED); } } public int getCurrentPaymentMethod() { return currentPaymentMethod; } private void setCurrentPaymentMethod(int currentPaymentMethod) { VeritransSDK.currentPaymentMethod = currentPaymentMethod; } public static String getCardClickType() { return cardClickType; } public static boolean isSecureCard() { return isSecureCard; }
<<<<<<< ======= } else if(nameText.getText().toString().trim().equalsIgnoreCase(sActivity .getResources().getString(R.string.epay_bri))){ Intent startMandiriClickpay = new Intent(sActivity, EpayBriActivity .class); sActivity.startActivityForResult(startMandiriClickpay, Constants.RESULT_CODE_PAYMENT_TRANSFER); } else if (nameText.getText().toString().trim().equalsIgnoreCase(sActivity .getResources().getString(R.string.cimb_clicks))) { Intent startCIMBClickpay = new Intent(sActivity, CIMBClickPayActivity .class); sActivity.startActivityForResult(startCIMBClickpay, Constants.RESULT_CODE_PAYMENT_TRANSFER); >>>>>>> } else if(nameText.getText().toString().trim().equalsIgnoreCase(sActivity .getResources().getString(R.string.epay_bri))){ Intent startMandiriClickpay = new Intent(sActivity, EpayBriActivity .class); sActivity.startActivityForResult(startMandiriClickpay, Constants.RESULT_CODE_PAYMENT_TRANSFER); } else if (nameText.getText().toString().trim().equalsIgnoreCase(sActivity .getResources().getString(R.string.cimb_clicks))) { Intent startCIMBClickpay = new Intent(sActivity, CIMBClickPayActivity .class); sActivity.startActivityForResult(startCIMBClickpay, Constants.RESULT_CODE_PAYMENT_TRANSFER);
<<<<<<< ======= >>>>>>> <<<<<<< private static final int ID_FRIEND_LIST_FRAGMENT = 0; private static final int ID_CHATS_LIST_FRAGMENT = 1; private static final int ID_SETTINGS_FRAGMENT = 2; private static final int ID_INVITE_FRIENDS_FRAGMENT = 3; private Fragment currentFragment; // private GSMHelper gsmHelper; ======= private final int ID_FRIEND_LIST_FRAGMENT = 0; private final int ID_CHATS_LIST_FRAGMENT = 1; private final int ID_SETTINGS_FRAGMENT = 2; private final int ID_INVITE_FRIENDS_FRAGMENT = 3; private Fragment currentFragment; private FacebookHelper facebookHelper; private ImportFriends importFriends; private boolean isImportInitialized; >>>>>>> private static final int ID_FRIEND_LIST_FRAGMENT = 0; private static final int ID_CHATS_LIST_FRAGMENT = 1; private static final int ID_SETTINGS_FRAGMENT = 2; private static final int ID_INVITE_FRIENDS_FRAGMENT = 3; private Fragment currentFragment; private FacebookHelper facebookHelper; private ImportFriends importFriends; private boolean isImportInitialized; // private GSMHelper gsmHelper;
<<<<<<< if (VERBOSE) Log.d(TAG, "no output available, spinning to await EOS"); ======= mEosSpinCount++; if (mEosSpinCount > MAX_EOS_SPINS) { if (VERBOSE) Log.i(TAG, "Force shutting down Muxer"); mMuxer.forceStop(); break; } /*if (VERBOSE) */Log.d(TAG, "no output available, spinning to await EOS"); >>>>>>> mEosSpinCount++; if (mEosSpinCount > MAX_EOS_SPINS) { if (VERBOSE) Log.i(TAG, "Force shutting down Muxer"); mMuxer.forceStop(); break; } if (VERBOSE) Log.d(TAG, "no output available, spinning to await EOS");
<<<<<<< case MAGE: return mageProperties; ======= case MAGE: return mage; default: return null; >>>>>>> case MAGE: return mageProperties; default: return null;
<<<<<<< import com.google.sitebricks.mail.imap.*; ======= import com.google.sitebricks.mail.imap.Command; import com.google.sitebricks.mail.imap.Folder; import com.google.sitebricks.mail.imap.FolderStatus; import com.google.sitebricks.mail.imap.Message; import com.google.sitebricks.mail.imap.MessageStatus; import com.google.sitebricks.mail.oauth.OAuthConfig; import com.google.sitebricks.mail.oauth.XoauthSasl; import net.oauth.OAuthException; >>>>>>> import com.google.sitebricks.mail.imap.*; import com.google.sitebricks.mail.oauth.OAuthConfig; import com.google.sitebricks.mail.oauth.XoauthSasl; import net.oauth.OAuthException; <<<<<<< import java.util.EnumSet; ======= import java.net.URISyntaxException; >>>>>>> import java.util.EnumSet; import java.net.URISyntaxException;
<<<<<<< /** * AliPay pc网站支付返回的body体,html 可直接嵌入网页使用 */ private String body; ======= /** 扫码付模式二用来生成二维码*/ private String codeUrl; >>>>>>> /** * AliPay pc网站支付返回的body体,html 可直接嵌入网页使用 */ private String body; /** 扫码付模式二用来生成二维码*/ private String codeUrl;
<<<<<<< return getRegistry().instanceIDs(SliderKeys.APP_TYPE); } catch (YarnException | IOException e) { ======= maybeStartRegistry(); return registry.instanceIDs(SliderKeys.APP_TYPE); /// JDK7 } catch (YarnException | IOException e) { } catch (IOException e) { throw e; } catch (YarnException e) { >>>>>>> return getRegistry().instanceIDs(SliderKeys.APP_TYPE); /// JDK7 } catch (YarnException | IOException e) { } catch (IOException e) { throw e; } catch (YarnException e) {
<<<<<<< sliderAMProvider.applyInitialRegistryDefinitions(unsecureWebAPI, secureWebAPI, instanceData, serviceRecord); ======= sliderAMProvider.applyInitialRegistryDefinitions(amWebURI, agentOpsURI, agentStatusURI, instanceData); >>>>>>> sliderAMProvider.applyInitialRegistryDefinitions(amWebURI, agentOpsURI, agentStatusURI, instanceData, serviceRecord); <<<<<<< providerService.applyInitialRegistryDefinitions(unsecureWebAPI, secureWebAPI, instanceData, serviceRecord); ======= providerService.applyInitialRegistryDefinitions(amWebURI, agentOpsURI, agentStatusURI, instanceData); >>>>>>> providerService.applyInitialRegistryDefinitions(amWebURI, agentOpsURI, agentStatusURI, instanceData, serviceRecord);
<<<<<<< actionAMSuicideArgs, actionBuildArgs, actionCreateArgs, actionUpdateArgs, actionDestroyArgs, actionDiagnosticArgs, actionExistsArgs, actionFlexArgs, actionFreezeArgs, actionGetConfArgs, actionHelpArgs, actionInstallPackageArgs, actionKillContainerArgs, actionListArgs, actionRegistryArgs, actionResolveArgs, actionStatusArgs, actionThawArgs, actionVersionArgs ); ======= actionAMSuicideArgs, actionBuildArgs, actionCreateArgs, actionUpdateArgs, actionDestroyArgs, actionExistsArgs, actionFlexArgs, actionFreezeArgs, actionKillContainerArgs, actionListArgs, actionRegistryArgs, actionStatusArgs, actionThawArgs, actionHelpArgs, actionVersionArgs, actionInstallPackageArgs, actionDiagnosticArgs ); >>>>>>> actionAMSuicideArgs, actionBuildArgs, actionCreateArgs, actionUpdateArgs, actionDestroyArgs, actionDiagnosticArgs, actionExistsArgs, actionFlexArgs, actionFreezeArgs, actionHelpArgs, actionInstallPackageArgs, actionKillContainerArgs, actionListArgs, actionRegistryArgs, actionResolveArgs, actionStatusArgs, actionThawArgs, actionVersionArgs );
<<<<<<< //here the superclass is inited; getConfig returns a non-null value sliderFileSystem = new SliderFileSystem(getConfig()); YarnAppListClient = new YarnAppListClient(yarnClient, getUsername(), getConfig()); ======= >>>>>>> //here the superclass is inited; getConfig returns a non-null value sliderFileSystem = new SliderFileSystem(getConfig()); YarnAppListClient = new YarnAppListClient(yarnClient, getUsername(), getConfig());
<<<<<<< import org.apache.hadoop.yarn.api.records.NodeReport; ======= import org.apache.hadoop.yarn.api.records.Priority; >>>>>>> import org.apache.hadoop.yarn.api.records.NodeReport; import org.apache.hadoop.yarn.api.records.Priority;
<<<<<<< final int port = AvailablePortFinder.getNextAvailable(33333); brokerUri = "tcp://localhost:" + port; //Disable the JMX by default broker.setUseJmx(false); ======= final int port = AvailablePortFinder.getNextAvailable(33333); brokerUri = "tcp://localhost:" + port; broker.getManagementContext().setConnectorPort(AvailablePortFinder.getNextAvailable(port + 1)); >>>>>>> final int port = AvailablePortFinder.getNextAvailable(33333); brokerUri = "tcp://localhost:" + port; //Disable the JMX by default broker.setUseJmx(false); broker.getManagementContext().setConnectorPort(AvailablePortFinder.getNextAvailable(port + 1));
<<<<<<< RangeVariable remix = new RangeVariable( title, key, defaultValue, minValue, maxValue, increment, parentObject, callback, layoutId); remix.init(); return remix; ======= RangeVariable variable = new RangeVariable( title, key, defaultValue, minValue, maxValue, increment, callback, layoutId); variable.init(); return variable; >>>>>>> RangeVariable variable = new RangeVariable( title, key, defaultValue, minValue, maxValue, increment, parentObject, callback, layoutId); variable.init(); return variable;
<<<<<<< ItemListVariable<T> remix = new ItemListVariable<T>( title, key, defaultValue, possibleValues, parentObject, callback, layoutId); remix.init(); return remix; ======= ItemListVariable<T> variable = new ItemListVariable<T>(title, key, defaultValue, possibleValues, callback, layoutId); variable.init(); return variable; >>>>>>> ItemListVariable<T> variable = new ItemListVariable<T>( title, key, defaultValue, possibleValues, parentObject, callback, layoutId); variable.init(); return variable;
<<<<<<< import com.google.common.collect.ImmutableList; ======= import com.google.common.collect.ImmutableSet; >>>>>>> import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet;
<<<<<<< @Override public Memory memory() { return new Memory() { @Override public boolean contains(long record) { return destination.memory().contains(record) && buffer.memory().contains(record); } @Override public boolean contains(String key, long record) { return destination.memory().contains(key, record) && buffer.memory().contains(key, record); } @Override public boolean contains(String key) { return destination.memory().contains(key) && buffer.memory().contains(key); } }; } ======= >>>>>>>
<<<<<<< try { for (final Step t : list) { res.add((R) clo.call(t)); } } catch (Exception e) { System.out.println("Found error while tyring to collect steps: " + e.getMessage()); ======= if (list == null) { return res; } for (final Step t : list) { res.add((R) clo.call(t)); >>>>>>> try { if (list == null) { return res; } for (final Step t : list) { res.add((R) clo.call(t)); } } catch (Exception e) { System.out.println("Found error while tyring to collect steps: " + e.getMessage());
<<<<<<< import android.graphics.Bitmap; ======= >>>>>>> import android.graphics.Bitmap; <<<<<<< private static final int REQUEST_INSTALL = 0; private static final int REQUEST_UNINSTALL = 1; private static class ViewHolder { TextView version; TextView status; TextView size; TextView api; TextView buildtype; TextView added; TextView nativecode; } ======= >>>>>>> private static class ViewHolder { TextView version; TextView status; TextView size; TextView api; TextView buildtype; TextView added; TextView nativecode; } <<<<<<< private final Context mctx = this; private DisplayImageOptions displayImageOptions; ======= private Context mctx = this; private InstallManager installManager; >>>>>>> private final Context mctx = this; private DisplayImageOptions displayImageOptions; private InstallManager installManager; <<<<<<< private void installApk(File file, String id) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse("file://" + file.getPath()), "application/vnd.android.package-archive"); startActivityForResult(intent, REQUEST_INSTALL); ======= private void removeApk(String id) { installManager.removeApk(id); >>>>>>> private void removeApk(String id) { installManager.removeApk(id);
<<<<<<< public RepoXMLHandler(int repo, List<DB.App> apps) { ======= public RepoXMLHandler(DB.Repo repo, Vector<DB.App> apps, ProgressListener listener) { >>>>>>> public RepoXMLHandler(DB.Repo repo, List<DB.App> apps, ProgressListener listener) { <<<<<<< List<DB.App> apps, StringBuilder newetag, List<Integer> keeprepos) { ======= Vector<DB.App> apps, StringBuilder newetag, Vector<Integer> keeprepos, ProgressListener progressListener) { >>>>>>> List<DB.App> apps, StringBuilder newetag, List<Integer> keeprepos, ProgressListener progressListener) {
<<<<<<< private ProgressDialog getProgressDialog(String file) { if (progressDialog == null) { final ProgressDialog pd = new ProgressDialog(this); pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); if (Build.VERSION.SDK_INT >= 11) { pd.setProgressNumberFormat("%1d/%2d KiB"); } pd.setMessage(getString(R.string.download_server) + ":\n " + file); pd.setCancelable(true); pd.setCanceledOnTouchOutside(false); // The indeterminate-ness will get overridden on the first progress event we receive. pd.setIndeterminate(true); pd.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { Log.d(TAG, "User clicked 'cancel' on download, attempting to interrupt download thread."); if (downloadHandler != null) { downloadHandler.cancel(); cleanUpFinishedDownload(); } else { Log.e(TAG, "Tried to cancel, but the downloadHandler doesn't exist."); } if (mainButton != null) mainButton.setEnabled(true); progressDialog = null; Toast.makeText(AppDetails.this, getString(R.string.download_cancelled), Toast.LENGTH_LONG).show(); } }); pd.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.cancel), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { pd.cancel(); } } ); progressDialog = pd; } return progressDialog; } /** * Looks at the current <code>downloadHandler</code> and finds it's size and progress. * This is in comparison to {@link org.fdroid.fdroid.AppDetails#updateProgressDialog(int, int)}, * which is used when you have the details from a freshly received * {@link org.fdroid.fdroid.ProgressListener.Event}. */ private void updateProgressDialog() { if (downloadHandler != null) { updateProgressDialog(downloadHandler.getProgress(), downloadHandler.getTotalSize()); } } private void updateProgressDialog(int progress, int total) { if (downloadHandler != null) { ProgressDialog pd = getProgressDialog(downloadHandler.getRemoteAddress()); if (total > 0) { pd.setIndeterminate(false); pd.setProgress(progress/1024); pd.setMax(total/1024); } else { pd.setIndeterminate(true); pd.setProgress(progress/1024); pd.setMax(0); } if (!pd.isShowing()) { Log.d(TAG, "Showing progress dialog for download."); pd.show(); } } } ======= >>>>>>> <<<<<<< ======= case Downloader.EVENT_PROGRESS: if (mHeaderFragment != null) mHeaderFragment.updateProgress(event.progress, event.total); break; >>>>>>> <<<<<<< mainButton.setVisibility(View.VISIBLE); mainButton.setEnabled(true); ======= btMain.setVisibility(View.VISIBLE); >>>>>>> btMain.setVisibility(View.VISIBLE); <<<<<<< mainButton.setText(R.string.menu_install); mainButton.setOnClickListener(mOnClickListener); ======= btMain.setText(R.string.menu_install); btMain.setOnClickListener(mOnClickListener); btMain.setEnabled(true); >>>>>>> btMain.setText(R.string.menu_install); btMain.setOnClickListener(mOnClickListener); btMain.setEnabled(true);