conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
appContext.getWsAgentServerApiEndpoint() + pathToService + "?projectpath=" + projectPath;
=======
appContext.getDevMachine().getWsAgentBaseUrl()
+ pathToService
+ "?projectpath="
+ encodePath(valueOf(projectPath));
>>>>>>>
appContext.getWsAgentServerApiEndpoint()
+ pathToService
+ "?projectpath="
+ encodePath(valueOf(projectPath)); |
<<<<<<<
=======
import org.eclipse.che.api.promises.client.PromiseError;
import org.eclipse.che.ide.api.dialogs.ConfirmCallback;
import org.eclipse.che.ide.api.dialogs.ConfirmDialog;
import org.eclipse.che.ide.api.machine.DevMachine;
>>>>>>>
import org.eclipse.che.api.promises.client.PromiseError;
import org.eclipse.che.ide.api.dialogs.ConfirmCallback;
import org.eclipse.che.ide.api.dialogs.ConfirmDialog;
import org.eclipse.che.ide.api.machine.DevMachine;
<<<<<<<
=======
when(appContext.getResource()).thenReturn(resource);
when(resource.getLocation()).thenReturn(Path.valueOf("test/location"));
when(appContext.getDevMachine()).thenReturn(mock(DevMachine.class));
>>>>>>>
when(appContext.getResource()).thenReturn(resource);
when(resource.getLocation()).thenReturn(Path.valueOf("test/location"));
when(appContext.getDevMachine()).thenReturn(mock(DevMachine.class));
<<<<<<<
when(service.add(any(Path.class), anyBoolean(), any(Path[].class))).thenReturn(voidPromise);
when(service.commit(any(Path.class), anyString(), anyBoolean(), any(Path[].class), anyBoolean()))
=======
when(stringPromise.then(any(Operation.class))).thenReturn(stringPromise);
when(stringPromise.catchError(any(Operation.class))).thenReturn(stringPromise);
when(branchListPromise.then(any(Operation.class))).thenReturn(branchListPromise);
when(branchListPromise.catchError(any(Operation.class))).thenReturn(branchListPromise);
when(pushPromise.then(any(Operation.class))).thenReturn(pushPromise);
when(logPromise.then(any(Operation.class))).thenReturn(logPromise);
when(logPromise.catchError(any(Operation.class))).thenReturn(logPromise);
when(statusPromise.then(any(Operation.class))).thenReturn(statusPromise);
when(service.add(any(DevMachine.class), any(Path.class), anyBoolean(), any(Path[].class))).thenReturn(voidPromise);
when(service.commit(any(DevMachine.class), any(Path.class), anyString(), anyBoolean(), any(Path[].class), anyBoolean()))
>>>>>>>
when(service.add(any(Path.class), anyBoolean(), any(Path[].class))).thenReturn(voidPromise);
when(service.commit(any(Path.class), anyString(), anyBoolean(), any(Path[].class), anyBoolean()));
when(stringPromise.then(any(Operation.class))).thenReturn(stringPromise);
when(stringPromise.catchError(any(Operation.class))).thenReturn(stringPromise);
when(branchListPromise.then(any(Operation.class))).thenReturn(branchListPromise);
when(branchListPromise.catchError(any(Operation.class))).thenReturn(branchListPromise);
when(pushPromise.then(any(Operation.class))).thenReturn(pushPromise);
when(logPromise.then(any(Operation.class))).thenReturn(logPromise);
when(logPromise.catchError(any(Operation.class))).thenReturn(logPromise);
when(statusPromise.then(any(Operation.class))).thenReturn(statusPromise);
when(service.add(any(Path.class), anyBoolean(), any(Path[].class))).thenReturn(voidPromise);
when(service.commit(any(Path.class), anyString(), anyBoolean(), any(Path[].class), anyBoolean()))
<<<<<<<
verify(service).add(any(Path.class), anyBoolean(), any(Path[].class));
verify(presenter).doCommit(anyString(), anyBoolean(), anyBoolean(), anyBoolean());
=======
verify(notificationManager).notify(eq("addFailed"), eq(FAIL), eq(FLOAT_MODE));
>>>>>>>
verify(notificationManager).notify(eq("addFailed"), eq(FAIL), eq(FLOAT_MODE));
<<<<<<<
verify(service, never()).add(any(Path.class), anyBoolean(), any(Path[].class));
verify(presenter).doCommit(anyString(), anyBoolean(), anyBoolean(), anyBoolean());
=======
verify(notificationManager).notify(eq("pushSuccess"), eq(SUCCESS), eq(FLOAT_MODE));
>>>>>>>
verify(notificationManager).notify(eq("pushSuccess"), eq(SUCCESS), eq(FLOAT_MODE)); |
<<<<<<<
import org.eclipse.che.commons.annotation.Nullable;
import org.eclipse.che.ide.api.app.AppContext;
import org.eclipse.che.ide.api.debug.Breakpoint;
=======
>>>>>>>
import org.eclipse.che.ide.api.app.AppContext;
<<<<<<<
appContext,
id,
requestHandlerManager);
}
@Override
protected String fqnToPath(Location location) {
return PATH;
}
@Nullable
@Override
protected String pathToFqn(VirtualFile file) {
return FQN;
=======
requestHandlerManager,
debuggerResourceHandlerFactory,
id);
>>>>>>>
requestHandlerManager,
debuggerResourceHandlerFactory,
id); |
<<<<<<<
public static final String WORKSPACE_STATUS_CHANGED_METHOD = "workspace/statusChanged";
public static final String MACHINE_STATUS_CHANGED_METHOD = "machine/statusChanged";
public static final String SERVER_STATUS_CHANGED_METHOD = "server/statusChanged";
public static final String MACHINE_LOG_METHOD = "machine/log";
public static final String INSTALLER_LOG_METHOD = "installer/log";
public static final String SERVER_WS_AGENT_HTTP_REFERENCE = "wsagent/http";
public static final String SERVER_WS_AGENT_WEBSOCKET_REFERENCE = "wsagent/ws";
public static final String SERVER_TERMINAL_REFERENCE = "terminal";
public static final String SERVER_SSH_REFERENCE = "ssh";
public static final String SERVER_EXEC_AGENT_WEBSOCKET_REFERENCE = "exec-agent/ws";
public static final String WS_AGENT_PORT = "4401/tcp";
public static final String WS_MACHINE_NAME = "default";
public static final String ACTIVITY_CHECKER = "activity-checker";
=======
>>>>>>>
public static final String WORKSPACE_STATUS_CHANGED_METHOD = "workspace/statusChanged";
public static final String MACHINE_STATUS_CHANGED_METHOD = "machine/statusChanged";
public static final String SERVER_STATUS_CHANGED_METHOD = "server/statusChanged";
public static final String MACHINE_LOG_METHOD = "machine/log";
public static final String INSTALLER_LOG_METHOD = "installer/log";
public static final String SERVER_WS_AGENT_HTTP_REFERENCE = "wsagent/http";
public static final String SERVER_WS_AGENT_WEBSOCKET_REFERENCE = "wsagent/ws";
public static final String SERVER_TERMINAL_REFERENCE = "terminal";
public static final String SERVER_SSH_REFERENCE = "ssh";
public static final String SERVER_EXEC_AGENT_WEBSOCKET_REFERENCE = "exec-agent/ws";
public static final String WS_AGENT_PORT = "4401/tcp";
public static final String WS_MACHINE_NAME = "default"; |
<<<<<<<
import thebetweenlands.common.block.structure.BlockWormDungeonDoorWood;
import thebetweenlands.common.block.structure.BlockWormDungeonPillar;
=======
import thebetweenlands.common.block.structure.BlockWaystone;
>>>>>>>
import thebetweenlands.common.block.structure.BlockWaystone;
import thebetweenlands.common.block.structure.BlockWormDungeonDoorWood;
import thebetweenlands.common.block.structure.BlockWormDungeonPillar;
<<<<<<<
=======
import thebetweenlands.common.world.gen.feature.WorldGenRootPodRoots;
import thebetweenlands.common.world.gen.feature.WorldGenSmallSpiritTree;
>>>>>>>
import thebetweenlands.common.world.gen.feature.WorldGenRootPodRoots; |
<<<<<<<
import thebetweenlands.common.tile.TileEntityRuneChainAltar;
=======
>>>>>>>
import thebetweenlands.common.tile.TileEntityRuneChainAltar;
<<<<<<<
public static final int GUI_RUNE_CHAIN_ALTAR = 17;
=======
public static final int GUI_DRAETON_POUCH = 17;
public static final int GUI_DRAETON_BURNER = 18;
public static final int GUI_DRAETON_CRAFTING = 19;
public static final int GUI_DRAETON_FURNACE = 20;
public static final int GUI_DRAETON_UPGRADES = 21;
>>>>>>>
public static final int GUI_DRAETON_POUCH = 17;
public static final int GUI_DRAETON_BURNER = 18;
public static final int GUI_DRAETON_CRAFTING = 19;
public static final int GUI_DRAETON_FURNACE = 20;
public static final int GUI_DRAETON_UPGRADES = 21;
public static final int GUI_RUNE_CHAIN_ALTAR = 22;
<<<<<<<
case GUI_RUNE_CHAIN_ALTAR:
if (tile instanceof TileEntityRuneChainAltar) {
return new ContainerRuneChainAltar(player, (TileEntityRuneChainAltar) tile);
}
break;
=======
case GUI_DRAETON_POUCH:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isStorageUpgrade(stack)) {
String name = stack.hasDisplayName() ? stack.getDisplayName(): "container.bl.draeton_storage";
return new ContainerDraetonPouch(player, player.inventory, new InventoryItem(stack, 9 + (stack.getItemDamage() * 9), name), (EntityDraeton)entity, y);
}
}
}
break;
case GUI_DRAETON_CRAFTING:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isCraftingUpgrade(stack)) {
return new ContainerDraetonWorkbench(player.inventory, (EntityDraeton) entity, y);
}
}
}
break;
case GUI_DRAETON_FURNACE:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isFurnaceUpgrade(stack)) {
return new ContainerDraetonFurnace(player, player.inventory, ((EntityDraeton) entity).getFurnace(y), (EntityDraeton)entity, y);
}
}
}
break;
case GUI_DRAETON_BURNER:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton)
return new ContainerDraetonBurner(player.inventory, ((EntityDraeton)entity).getBurnerInventory(), (EntityDraeton)entity);
break;
case GUI_DRAETON_UPGRADES:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton)
return new ContainerDraetonUpgrades(player.inventory, (EntityDraeton)entity);
break;
>>>>>>>
case GUI_RUNE_CHAIN_ALTAR:
if (tile instanceof TileEntityRuneChainAltar) {
return new ContainerRuneChainAltar(player, (TileEntityRuneChainAltar) tile);
}
break;
case GUI_DRAETON_POUCH:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isStorageUpgrade(stack)) {
String name = stack.hasDisplayName() ? stack.getDisplayName(): "container.bl.draeton_storage";
return new ContainerDraetonPouch(player, player.inventory, new InventoryItem(stack, 9 + (stack.getItemDamage() * 9), name), (EntityDraeton)entity, y);
}
}
}
break;
case GUI_DRAETON_CRAFTING:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isCraftingUpgrade(stack)) {
return new ContainerDraetonWorkbench(player.inventory, (EntityDraeton) entity, y);
}
}
}
break;
case GUI_DRAETON_FURNACE:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isFurnaceUpgrade(stack)) {
return new ContainerDraetonFurnace(player, player.inventory, ((EntityDraeton) entity).getFurnace(y), (EntityDraeton)entity, y);
}
}
}
break;
case GUI_DRAETON_BURNER:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton)
return new ContainerDraetonBurner(player.inventory, ((EntityDraeton)entity).getBurnerInventory(), (EntityDraeton)entity);
break;
case GUI_DRAETON_UPGRADES:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton)
return new ContainerDraetonUpgrades(player.inventory, (EntityDraeton)entity);
break; |
<<<<<<<
import thebetweenlands.common.capability.item.RuneChainItemCapability;
import thebetweenlands.common.capability.item.RuneItemCapability;
=======
import thebetweenlands.common.capability.playermounts.IPlayerMountsEntityCapability;
import thebetweenlands.common.capability.playermounts.PlayerMountsEntityCapability;
>>>>>>>
import thebetweenlands.common.capability.item.RuneChainItemCapability;
import thebetweenlands.common.capability.item.RuneItemCapability;
import thebetweenlands.common.capability.playermounts.IPlayerMountsEntityCapability;
import thebetweenlands.common.capability.playermounts.PlayerMountsEntityCapability;
<<<<<<<
EntityCapabilityHandler.registerEntityCapability(new RuneChainUserPlayerCapability());
=======
EntityCapabilityHandler.registerEntityCapability(new PlayerMountsEntityCapability());
>>>>>>>
EntityCapabilityHandler.registerEntityCapability(new RuneChainUserPlayerCapability());
EntityCapabilityHandler.registerEntityCapability(new PlayerMountsEntityCapability()); |
<<<<<<<
case GUI_RUNE_CHAIN_ALTAR:
if (tile instanceof TileEntityRuneChainAltar) {
return new GuiRuneChainAltar(player, (TileEntityRuneChainAltar) tile);
}
break;
=======
case GUI_DRAETON_POUCH:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isStorageUpgrade(stack)) {
String name = stack.hasDisplayName() ? stack.getDisplayName(): I18n.format("container.bl.draeton_storage");
return new GuiPouch(new ContainerDraetonPouch(player, player.inventory, new InventoryItem(stack, 9 + (stack.getItemDamage() * 9), name), (EntityDraeton)entity, y));
}
}
}
break;
case GUI_DRAETON_CRAFTING:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isCraftingUpgrade(stack)) {
return new GuiDraetonCrafting(player.inventory, (EntityDraeton) entity, y);
}
}
}
break;
case GUI_DRAETON_FURNACE:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isFurnaceUpgrade(stack)) {
return new GuiBLFurnace(player.inventory, ((EntityDraeton) entity).getFurnace(y));
}
}
}
break;
case GUI_DRAETON_BURNER:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton)
return new GuiDraetonBurner(player.inventory, ((EntityDraeton)entity).getBurnerInventory(), (EntityDraeton)entity);
break;
case GUI_DRAETON_UPGRADES:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton)
return new GuiDraetonUpgrades(player.inventory, (EntityDraeton)entity);
break;
>>>>>>>
case GUI_RUNE_CHAIN_ALTAR:
if (tile instanceof TileEntityRuneChainAltar) {
return new GuiRuneChainAltar(player, (TileEntityRuneChainAltar) tile);
}
break;
case GUI_DRAETON_POUCH:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isStorageUpgrade(stack)) {
String name = stack.hasDisplayName() ? stack.getDisplayName(): I18n.format("container.bl.draeton_storage");
return new GuiPouch(new ContainerDraetonPouch(player, player.inventory, new InventoryItem(stack, 9 + (stack.getItemDamage() * 9), name), (EntityDraeton)entity, y));
}
}
}
break;
case GUI_DRAETON_CRAFTING:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isCraftingUpgrade(stack)) {
return new GuiDraetonCrafting(player.inventory, (EntityDraeton) entity, y);
}
}
}
break;
case GUI_DRAETON_FURNACE:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton) {
IInventory upgrades = ((EntityDraeton) entity).getUpgradesInventory();
if(y >= 0 && y < 4) {
ItemStack stack = upgrades.getStackInSlot(y);
if(!stack.isEmpty() && ((EntityDraeton) entity).isFurnaceUpgrade(stack)) {
return new GuiBLFurnace(player.inventory, ((EntityDraeton) entity).getFurnace(y));
}
}
}
break;
case GUI_DRAETON_BURNER:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton)
return new GuiDraetonBurner(player.inventory, ((EntityDraeton)entity).getBurnerInventory(), (EntityDraeton)entity);
break;
case GUI_DRAETON_UPGRADES:
entity = world.getEntityByID(x);
if (entity instanceof EntityDraeton)
return new GuiDraetonUpgrades(player.inventory, (EntityDraeton)entity);
break; |
<<<<<<<
registerTileEntity(TileEntityRuneChainAltar.class, "rune_chain_altar");
=======
registerTileEntity(TileEntityWaystone.class, "waystone");
>>>>>>>
registerTileEntity(TileEntityRuneChainAltar.class, "rune_chain_altar");
registerTileEntity(TileEntityWaystone.class, "waystone"); |
<<<<<<<
EntityCapabilityHandler.registerEntityCapability(new RingOfDispersionEntityCapability());
=======
EntityCapabilityHandler.registerEntityCapability(new RuneChainUserPlayerCapability());
>>>>>>>
EntityCapabilityHandler.registerEntityCapability(new RingOfDispersionEntityCapability());
EntityCapabilityHandler.registerEntityCapability(new RuneChainUserPlayerCapability()); |
<<<<<<<
public static final String VERSION = "3.3.12";
public static final String API_VERSION = "1.11.3";
=======
public static final String VERSION = "3.3.13";
public static final String API_VERSION = "1.11.1";
>>>>>>>
public static final String VERSION = "3.3.13";
public static final String API_VERSION = "1.11.3"; |
<<<<<<<
public static String[] entityList = new String[]{
"thebetweenlands.swampHag",
"thebetweenlands.wight",};
public BlockBLSpawner() {
super();
setHarvestLevel("pickaxe", 0);
setBlockName("thebetweenlands.blSpawner");
setCreativeTab(ModCreativeTabs.blocks);
setBlockTextureName("thebetweenlands:betweenstone");
}
public static void setMob(World world, int x, int y, int z, String mobName) {
TileEntity te = world.getTileEntity(x, y, z);
if (te != null && te instanceof TileEntityBLSpawner) {
MobSpawnerBaseLogic spawnerLogic = ((TileEntityBLSpawner) te).func_145881_a();
String prevMob = spawnerLogic.getEntityNameToSpawn();
spawnerLogic.setEntityName(mobName);
//resets the rendered entity
if (world.isRemote && prevMob != mobName) {
NBTTagCompound nbt = new NBTTagCompound();
spawnerLogic.writeToNBT(nbt);
spawnerLogic.readFromNBT(nbt);
}
}
}
public static void setRandomMob(World world, int x, int y, int z, Random random) {
setMob(world, x, y, z, entityList[random.nextInt(entityList.length - 1)]);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) {
super.onBlockPlacedBy(world, x, y, z, entity, itemStack);
Random random = new Random();
setRandomMob(world, x, y, z, random);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityBLSpawner();
}
@Override
public int getRenderType() {
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random rnd) {
}
=======
public BlockBLSpawner() {
super();
setHarvestLevel("pickaxe", 0);
setBlockName("thebetweenlands.blSpawner");
setCreativeTab(BLCreativeTabs.blocks);
setBlockTextureName("thebetweenlands:betweenstone");
}
public static void setMob(World world, int x, int y, int z, String mobName) {
TileEntity te = world.getTileEntity(x, y, z);
if(te != null && te instanceof TileEntityBLSpawner) {
MobSpawnerBaseLogic spawnerLogic = ((TileEntityBLSpawner)te).func_145881_a();
String prevMob = spawnerLogic.getEntityNameToSpawn();
spawnerLogic.setEntityName(mobName);
//resets the rendered entity
if(world.isRemote && prevMob != mobName) {
NBTTagCompound nbt = new NBTTagCompound();
spawnerLogic.writeToNBT(nbt);
spawnerLogic.readFromNBT(nbt);
}
}
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityBLSpawner();
}
@Override
public int getRenderType() {
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random rnd) { }
>>>>>>>
public static String[] entityList = new String[]{
"thebetweenlands.swampHag",
"thebetweenlands.wight",};
public BlockBLSpawner() {
super();
setHarvestLevel("pickaxe", 0);
setBlockName("thebetweenlands.blSpawner");
setCreativeTab(BLCreativeTabs.blocks);
setBlockTextureName("thebetweenlands:betweenstone");
}
public static void setMob(World world, int x, int y, int z, String mobName) {
TileEntity te = world.getTileEntity(x, y, z);
if (te != null && te instanceof TileEntityBLSpawner) {
MobSpawnerBaseLogic spawnerLogic = ((TileEntityBLSpawner) te).func_145881_a();
String prevMob = spawnerLogic.getEntityNameToSpawn();
spawnerLogic.setEntityName(mobName);
//resets the rendered entity
if (world.isRemote && prevMob != mobName) {
NBTTagCompound nbt = new NBTTagCompound();
spawnerLogic.writeToNBT(nbt);
spawnerLogic.readFromNBT(nbt);
}
}
}
public static void setRandomMob(World world, int x, int y, int z, Random random) {
setMob(world, x, y, z, entityList[random.nextInt(entityList.length - 1)]);
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemStack) {
super.onBlockPlacedBy(world, x, y, z, entity, itemStack);
Random random = new Random();
setRandomMob(world, x, y, z, random);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityBLSpawner();
}
@Override
public int getRenderType() {
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random rnd) {
} |
<<<<<<<
RenderingRegistry.registerEntityRenderingHandler(EntityChiromawDroppings.class, RenderChiromawDroppings::new);
=======
RenderingRegistry.registerEntityRenderingHandler(EntityShock.class, RenderNothing::new);
>>>>>>>
RenderingRegistry.registerEntityRenderingHandler(EntityChiromawDroppings.class, RenderChiromawDroppings::new);
RenderingRegistry.registerEntityRenderingHandler(EntityShock.class, RenderNothing::new); |
<<<<<<<
public static final BLSoundEvent RUNE_SLATE_MOVE = reg("rune_slate_move");
public static final BLSoundEvent RUNE_SLOT_SHIFT = reg("rune_slot_shift");
=======
public static final BLSoundEvent DRAETON_TURN = reg("draeton_turn");
public static final BLSoundEvent DRAETON_DAMAGE = reg("draeton_damage");
public static final BLSoundEvent DRAETON_BURNER = reg("draeton_burner");
public static final BLSoundEvent DRAETON_PULLEY = reg("draeton_pulley");
public static final BLSoundEvent DRAETON_ANCHOR = reg("draeton_anchor");
public static final BLSoundEvent DRAETON_LEAK_START = reg("draeton_leak_start");
public static final BLSoundEvent DRAETON_LEAK_LOOP = reg("draeton_leak_loop");
public static final BLSoundEvent DRAETON_PLUG = reg("draeton_plug");
public static final BLSoundEvent DRAETON_POP = reg("draeton_pop");
public static final BLSoundEvent GREEBLING_FALL = reg("greebling_fall");
public static final BLSoundEvent GREEBLING_HEY = reg("greebling_hey");
public static final BLSoundEvent GREEBLING_GIGGLE = reg("greebling_giggle");
public static final BLSoundEvent CHIROMAW_GREEBLING_RIDER_LIVING = reg("chirowmaw_greebling_rider_living");
public static final BLSoundEvent SLINGSHOT_CHARGE = reg("slingshot_charge");
public static final BLSoundEvent SLINGSHOT_HIT = reg("slingshot_hit");
public static final BLSoundEvent SLINGSHOT_SHOOT = reg("slingshot_shoot");
public static final BLSoundEvent ZAP = reg("zap");
public static final BLSoundEvent CHIROBARB_ERUPTER = reg("chirobarb_erupter");
>>>>>>>
public static final BLSoundEvent RUNE_SLATE_MOVE = reg("rune_slate_move");
public static final BLSoundEvent RUNE_SLOT_SHIFT = reg("rune_slot_shift");
public static final BLSoundEvent DRAETON_TURN = reg("draeton_turn");
public static final BLSoundEvent DRAETON_DAMAGE = reg("draeton_damage");
public static final BLSoundEvent DRAETON_BURNER = reg("draeton_burner");
public static final BLSoundEvent DRAETON_PULLEY = reg("draeton_pulley");
public static final BLSoundEvent DRAETON_ANCHOR = reg("draeton_anchor");
public static final BLSoundEvent DRAETON_LEAK_START = reg("draeton_leak_start");
public static final BLSoundEvent DRAETON_LEAK_LOOP = reg("draeton_leak_loop");
public static final BLSoundEvent DRAETON_PLUG = reg("draeton_plug");
public static final BLSoundEvent DRAETON_POP = reg("draeton_pop");
public static final BLSoundEvent GREEBLING_FALL = reg("greebling_fall");
public static final BLSoundEvent GREEBLING_HEY = reg("greebling_hey");
public static final BLSoundEvent GREEBLING_GIGGLE = reg("greebling_giggle");
public static final BLSoundEvent CHIROMAW_GREEBLING_RIDER_LIVING = reg("chirowmaw_greebling_rider_living");
public static final BLSoundEvent SLINGSHOT_CHARGE = reg("slingshot_charge");
public static final BLSoundEvent SLINGSHOT_HIT = reg("slingshot_hit");
public static final BLSoundEvent SLINGSHOT_SHOOT = reg("slingshot_shoot");
public static final BLSoundEvent ZAP = reg("zap");
public static final BLSoundEvent CHIROBARB_ERUPTER = reg("chirobarb_erupter"); |
<<<<<<<
registerEntity(EntitySmolSludgeWorm.class, "smol_sludge_worm", 0x3A2F0B, 0x5F4C0B);
=======
registerEntity(EntityLurkerSkinRaft.class, "lurker_skin_raft");
>>>>>>>
registerEntity(EntitySmolSludgeWorm.class, "smol_sludge_worm", 0x3A2F0B, 0x5F4C0B);
registerEntity(EntityLurkerSkinRaft.class, "lurker_skin_raft"); |
<<<<<<<
import thebetweenlands.client.render.tile.RenderRuneCarvingTable;
import thebetweenlands.client.render.tile.RenderRuneCarvingTableFiller;
import thebetweenlands.client.render.tile.RenderRuneWeavingTable;
import thebetweenlands.client.render.tile.RenderRuneWeavingTableFiller;
=======
import thebetweenlands.client.render.tile.RenderSimulacrum;
>>>>>>>
import thebetweenlands.client.render.tile.RenderRuneCarvingTable;
import thebetweenlands.client.render.tile.RenderRuneCarvingTableFiller;
import thebetweenlands.client.render.tile.RenderRuneWeavingTable;
import thebetweenlands.client.render.tile.RenderRuneWeavingTableFiller;
import thebetweenlands.client.render.tile.RenderSimulacrum;
<<<<<<<
import thebetweenlands.common.tile.TileEntityRuneCarvingTable;
import thebetweenlands.common.tile.TileEntityRuneCarvingTableFiller;
import thebetweenlands.common.tile.TileEntityRuneWeavingTable;
import thebetweenlands.common.tile.TileEntityRuneWeavingTableFiller;
=======
import thebetweenlands.common.tile.TileEntitySimulacrum;
>>>>>>>
import thebetweenlands.common.tile.TileEntityRuneCarvingTable;
import thebetweenlands.common.tile.TileEntityRuneCarvingTableFiller;
import thebetweenlands.common.tile.TileEntityRuneWeavingTable;
import thebetweenlands.common.tile.TileEntityRuneWeavingTableFiller;
import thebetweenlands.common.tile.TileEntitySimulacrum;
<<<<<<<
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRuneWeavingTable.class, new RenderRuneWeavingTable());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRuneWeavingTableFiller.class, new RenderRuneWeavingTableFiller());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRuneCarvingTable.class, new RenderRuneCarvingTable());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRuneCarvingTableFiller.class, new RenderRuneCarvingTableFiller());
=======
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySimulacrum.class, new RenderSimulacrum());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOfferingTable.class, new RenderGroundItem());
>>>>>>>
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRuneWeavingTable.class, new RenderRuneWeavingTable());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRuneWeavingTableFiller.class, new RenderRuneWeavingTableFiller());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRuneCarvingTable.class, new RenderRuneCarvingTable());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRuneCarvingTableFiller.class, new RenderRuneCarvingTableFiller());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySimulacrum.class, new RenderSimulacrum());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOfferingTable.class, new RenderGroundItem()); |
<<<<<<<
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.DRUID_ALTAR), 0, TileEntityDruidAltar.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.COMPOST_BIN), 0, TileEntityCompostBin.class);
//ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.DRUID_SPAWNER), 0, TileEntityDruidSpawner.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.PURIFIER), 0, TileEntityPurifier.class);
for(EnumFacing facing : EnumFacing.HORIZONTALS) {
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.LOOT_POT), EnumLootPot.POT_1.getMetadata(facing), TileEntityLootPot.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.LOOT_POT), EnumLootPot.POT_2.getMetadata(facing), TileEntityLootPot.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.LOOT_POT), EnumLootPot.POT_3.getMetadata(facing), TileEntityLootPot.class);
}
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.MOB_SPAWNER), 0, TileEntityMobSpawnerBetweenlands.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.SPIKE_TRAP), 0, TileEntitySpikeTrap.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.POSSESSED_BLOCK), 0, TileEntityPossessedBlock.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.ITEM_CAGE), 0, TileEntityItemCage.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.GECKO_CAGE), 0, TileEntityGeckoCage.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.INFUSER), 0, TileEntityInfuser.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.MORTAR), 0, TileEntityMortar.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.ANIMATOR), 0, TileEntityAnimator.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.ALEMBIC), 0, TileEntityAlembic.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.ITEM_SHELF), 0, TileEntityItemShelf.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.REPELLER), 0, TileEntityRepeller.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.WORM_DUNGEON_DOOR_WOOD), 0, TileEntityWormDungeonDoorWood.class);
for(EnumFacing facing : EnumFacing.HORIZONTALS) {
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.TAR_LOOT_POT), EnumLootPot.POT_1.getMetadata(facing), TileEntityTarLootPot1.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.TAR_LOOT_POT), EnumLootPot.POT_2.getMetadata(facing), TileEntityTarLootPot2.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.TAR_LOOT_POT), EnumLootPot.POT_3.getMetadata(facing), TileEntityTarLootPot3.class);
}
=======
Item.getItemFromBlock(BlockRegistry.DRUID_ALTAR).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityDruidAltar.class));
Item.getItemFromBlock(BlockRegistry.COMPOST_BIN).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityCompostBin.class));
Item.getItemFromBlock(BlockRegistry.PURIFIER).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityPurifier.class));
Item.getItemFromBlock(BlockRegistry.MOB_SPAWNER).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityMobSpawnerBetweenlands.class));
Item.getItemFromBlock(BlockRegistry.SPIKE_TRAP).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntitySpikeTrap.class));
Item.getItemFromBlock(BlockRegistry.POSSESSED_BLOCK).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityPossessedBlock.class));
Item.getItemFromBlock(BlockRegistry.ITEM_CAGE).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityItemCage.class));
Item.getItemFromBlock(BlockRegistry.GECKO_CAGE).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityGeckoCage.class));
Item.getItemFromBlock(BlockRegistry.INFUSER).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityInfuser.class));
Item.getItemFromBlock(BlockRegistry.MORTAR).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityMortar.class));
Item.getItemFromBlock(BlockRegistry.ANIMATOR).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityAnimator.class));
Item.getItemFromBlock(BlockRegistry.ALEMBIC).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityAlembic.class));
Item.getItemFromBlock(BlockRegistry.ITEM_SHELF).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityItemShelf.class));
Item.getItemFromBlock(BlockRegistry.REPELLER).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityRepeller.class));
Item.getItemFromBlock(BlockRegistry.TAR_LOOT_POT).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(renderer -> {
for(EnumFacing facing : EnumFacing.HORIZONTALS) {
renderer.add(EnumLootPot.POT_1.getMetadata(facing), TileEntityTarLootPot1.class);
renderer.add(EnumLootPot.POT_2.getMetadata(facing), TileEntityTarLootPot2.class);
renderer.add(EnumLootPot.POT_3.getMetadata(facing), TileEntityTarLootPot3.class);
}
}));
ItemRegistry.LIVING_WEEDWOOD_SHIELD.setTileEntityItemStackRenderer(new RenderLivingWeedwoodShield());
>>>>>>>
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.DRUID_ALTAR), 0, TileEntityDruidAltar.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.COMPOST_BIN), 0, TileEntityCompostBin.class);
//ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.DRUID_SPAWNER), 0, TileEntityDruidSpawner.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.PURIFIER), 0, TileEntityPurifier.class);
for(EnumFacing facing : EnumFacing.HORIZONTALS) {
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.LOOT_POT), EnumLootPot.POT_1.getMetadata(facing), TileEntityLootPot.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.LOOT_POT), EnumLootPot.POT_2.getMetadata(facing), TileEntityLootPot.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.LOOT_POT), EnumLootPot.POT_3.getMetadata(facing), TileEntityLootPot.class);
}
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.MOB_SPAWNER), 0, TileEntityMobSpawnerBetweenlands.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.SPIKE_TRAP), 0, TileEntitySpikeTrap.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.POSSESSED_BLOCK), 0, TileEntityPossessedBlock.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.ITEM_CAGE), 0, TileEntityItemCage.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.GECKO_CAGE), 0, TileEntityGeckoCage.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.INFUSER), 0, TileEntityInfuser.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.MORTAR), 0, TileEntityMortar.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.ANIMATOR), 0, TileEntityAnimator.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.ALEMBIC), 0, TileEntityAlembic.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.ITEM_SHELF), 0, TileEntityItemShelf.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.REPELLER), 0, TileEntityRepeller.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.WORM_DUNGEON_DOOR_WOOD), 0, TileEntityWormDungeonDoorWood.class);
for(EnumFacing facing : EnumFacing.HORIZONTALS) {
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.TAR_LOOT_POT), EnumLootPot.POT_1.getMetadata(facing), TileEntityTarLootPot1.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.TAR_LOOT_POT), EnumLootPot.POT_2.getMetadata(facing), TileEntityTarLootPot2.class);
ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlockRegistry.TAR_LOOT_POT), EnumLootPot.POT_3.getMetadata(facing), TileEntityTarLootPot3.class);
}
Item.getItemFromBlock(BlockRegistry.DRUID_ALTAR).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityDruidAltar.class));
Item.getItemFromBlock(BlockRegistry.COMPOST_BIN).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityCompostBin.class));
Item.getItemFromBlock(BlockRegistry.PURIFIER).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityPurifier.class));
Item.getItemFromBlock(BlockRegistry.MOB_SPAWNER).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityMobSpawnerBetweenlands.class));
Item.getItemFromBlock(BlockRegistry.SPIKE_TRAP).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntitySpikeTrap.class));
Item.getItemFromBlock(BlockRegistry.POSSESSED_BLOCK).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityPossessedBlock.class));
Item.getItemFromBlock(BlockRegistry.ITEM_CAGE).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityItemCage.class));
Item.getItemFromBlock(BlockRegistry.GECKO_CAGE).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityGeckoCage.class));
Item.getItemFromBlock(BlockRegistry.INFUSER).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityInfuser.class));
Item.getItemFromBlock(BlockRegistry.MORTAR).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityMortar.class));
Item.getItemFromBlock(BlockRegistry.ANIMATOR).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityAnimator.class));
Item.getItemFromBlock(BlockRegistry.ALEMBIC).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityAlembic.class));
Item.getItemFromBlock(BlockRegistry.ITEM_SHELF).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityItemShelf.class));
Item.getItemFromBlock(BlockRegistry.REPELLER).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityRepeller.class));
Item.getItemFromBlock(BlockRegistry.TAR_LOOT_POT).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(renderer -> {
for(EnumFacing facing : EnumFacing.HORIZONTALS) {
renderer.add(EnumLootPot.POT_1.getMetadata(facing), TileEntityTarLootPot1.class);
renderer.add(EnumLootPot.POT_2.getMetadata(facing), TileEntityTarLootPot2.class);
renderer.add(EnumLootPot.POT_3.getMetadata(facing), TileEntityTarLootPot3.class);
}
}));
ItemRegistry.LIVING_WEEDWOOD_SHIELD.setTileEntityItemStackRenderer(new RenderLivingWeedwoodShield()); |
<<<<<<<
registerMessage(MessageSetRuneChainAltarPage.class, Side.SERVER);
registerMessage(MessageShiftRuneChainAltarSlot.class, Side.SERVER);
registerMessage(MessageLinkRuneChainAltarRune.class, Side.SERVER);
registerMessage(MessageUnlinkRuneChainAltarRune.class, Side.SERVER);
registerMessage(MessageSetRuneChainAltarConfiguration.class, Side.SERVER);
=======
registerMessage(MessageUpdateDraetonPhysicsPart.class, Side.SERVER);
registerMessage(MessageSetDraetonAnchorPos.class, Side.SERVER);
registerMessage(MessagePurgeDraetonBurner.class, Side.SERVER);
registerMessage(MessageChiromawDoubleJump.class, Side.SERVER);
>>>>>>>
registerMessage(MessageSetRuneChainAltarPage.class, Side.SERVER);
registerMessage(MessageShiftRuneChainAltarSlot.class, Side.SERVER);
registerMessage(MessageLinkRuneChainAltarRune.class, Side.SERVER);
registerMessage(MessageUnlinkRuneChainAltarRune.class, Side.SERVER);
registerMessage(MessageSetRuneChainAltarConfiguration.class, Side.SERVER);
registerMessage(MessageUpdateDraetonPhysicsPart.class, Side.SERVER);
registerMessage(MessageSetDraetonAnchorPos.class, Side.SERVER);
registerMessage(MessagePurgeDraetonBurner.class, Side.SERVER);
registerMessage(MessageChiromawDoubleJump.class, Side.SERVER); |
<<<<<<<
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPuffshroom.class, new TileEntityPuffshroomRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWormDungeonDoorWood.class, new RenderWormDungeonDoorWood());
=======
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWaystone.class, new RenderWaystone());
>>>>>>>
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPuffshroom.class, new TileEntityPuffshroomRenderer());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWormDungeonDoorWood.class, new RenderWormDungeonDoorWood());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWaystone.class, new RenderWaystone());
<<<<<<<
=======
Item.getItemFromBlock(BlockRegistry.WAYSTONE).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityWaystone.class));
>>>>>>>
Item.getItemFromBlock(BlockRegistry.WAYSTONE).setTileEntityItemStackRenderer(new RenderItemStackAsTileEntity(TileEntityWaystone.class)); |
<<<<<<<
void save(boolean async);
=======
public void save();
>>>>>>>
void save();
<<<<<<<
void delete(boolean async);
=======
public void delete();
>>>>>>>
void delete();
<<<<<<<
void update(boolean async);
=======
public void update();
>>>>>>>
void update();
<<<<<<<
void insert(boolean async);
=======
public void insert();
>>>>>>>
void insert(); |
<<<<<<<
import com.raizlabs.android.dbflow.data.Blob;
=======
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Unique;
>>>>>>>
import com.raizlabs.android.dbflow.data.Blob;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Unique;
<<<<<<<
public void writeSaveDefinition(JavaWriter javaWriter, boolean isModelContainerAdapter, boolean isContentValues,
AtomicInteger columnCount) throws IOException {
if (columnType == Column.FOREIGN_KEY && isModel) {
=======
public void writeSaveDefinition(JavaWriter javaWriter, boolean isModelContainerDefinition, boolean isContentValues, AtomicInteger columnCount) throws IOException {
if (isForeignKey && isModel) {
>>>>>>>
public void writeSaveDefinition(JavaWriter javaWriter, boolean isModelContainerAdapter, boolean isContentValues, AtomicInteger columnCount) throws IOException {
if (isForeignKey && isModel) {
<<<<<<<
if (isModelContainerAdapter) {
javaWriter.emitSingleLineComment("Model Container Definition");
}
=======
if (isModelContainerDefinition) {
String modelContainerName = ModelUtils.getVariable(true) + columnFieldName;
javaWriter.emitStatement("ModelContainer %1s = %1s.getInstance(%1s.getValue(\"%1s\"), %1s.class)", modelContainerName,
ModelUtils.getVariable(true), ModelUtils.getVariable(true), columnFieldName, columnFieldType);
if (saveModelForeignKey) {
javaWriter.emitStatement("%1s.save()", modelContainerName);
}
for (ForeignKeyReference foreignKeyReference : foreignKeyReferences) {
AdapterQueryBuilder adapterQueryBuilder = new AdapterQueryBuilder();
if (!isContentValues) {
adapterQueryBuilder.appendBindSQLiteStatement(columnCount.intValue(),
ModelUtils.getClassFromAnnotation(foreignKeyReference));
} else {
adapterQueryBuilder.appendContentValues().appendPut(foreignKeyReference.columnName());
}
adapterQueryBuilder
.appendCast(ModelUtils.getClassFromAnnotation(foreignKeyReference))
.append(modelContainerName)
.append(".")
.appendGetValue(foreignKeyReference.foreignColumnName())
.append("))");
javaWriter.emitStatement(adapterQueryBuilder.getQuery());
columnCount.incrementAndGet();
}
>>>>>>>
if (isModelContainerAdapter) {
javaWriter.emitSingleLineComment("Model Container Definition");
}
<<<<<<<
javaWriter.beginControlFlow("if (%1s != null)", modelDefinition);
}
if (saveModelForeignKey) {
javaWriter.emitStatement("%1s.save(false)", modelDefinition);
}
List<AdapterQueryBuilder> elseNullPuts = new ArrayList<>();
for (ForeignKeyReference foreignKeyReference : foreignKeyReferences) {
ColumnAccessModel columnAccessModel = new ColumnAccessModel(this, foreignKeyReference);
ForeignKeyContainerModel foreignKeyContainerModel = new ForeignKeyContainerModel(columnAccessModel,
isContentValues);
foreignKeyContainerModel.setModelContainerName(modelDefinition);
foreignKeyContainerModel.setIndex(columnCount.intValue());
foreignKeyContainerModel.setIsModelContainerDefinition(isModelContainerAdapter);
foreignKeyContainerModel.setPutValue(foreignKeyReference.columnName());
foreignKeyContainerModel.write(javaWriter);
if (!isModelContainerAdapter) {
elseNullPuts.add(foreignKeyContainerModel.getNullStatement());
=======
String modelStatement = ModelUtils.getModelStatement(columnFieldName);
javaWriter.beginControlFlow("if (%1s != null)", modelStatement);
if (saveModelForeignKey) {
javaWriter.emitStatement("%1s.save()", modelStatement);
>>>>>>>
javaWriter.beginControlFlow("if (%1s != null)", modelDefinition);
}
if (saveModelForeignKey) {
javaWriter.emitStatement("%1s.save(false)", modelDefinition);
}
List<AdapterQueryBuilder> elseNullPuts = new ArrayList<>();
for (ForeignKeyReference foreignKeyReference : foreignKeyReferences) {
ColumnAccessModel columnAccessModel = new ColumnAccessModel(this, foreignKeyReference);
ForeignKeyContainerModel foreignKeyContainerModel = new ForeignKeyContainerModel(columnAccessModel,
isContentValues);
foreignKeyContainerModel.setModelContainerName(modelDefinition);
foreignKeyContainerModel.setIndex(columnCount.intValue());
foreignKeyContainerModel.setIsModelContainerDefinition(isModelContainerAdapter);
foreignKeyContainerModel.setPutValue(foreignKeyReference.columnName());
foreignKeyContainerModel.write(javaWriter);
if (!isModelContainerAdapter) {
elseNullPuts.add(foreignKeyContainerModel.getNullStatement());
<<<<<<<
public void writeLoadFromCursorDefinition(BaseTableDefinition tableDefinition, JavaWriter javaWriter,
boolean isModelContainerAdapter) throws IOException {
if (columnType == Column.FOREIGN_KEY) {
=======
public void writeLoadFromCursorDefinition(BaseTableDefinition tableDefinition, JavaWriter javaWriter, boolean isModelContainerDefinition) throws IOException {
if (isForeignKey) {
>>>>>>>
public void writeLoadFromCursorDefinition(BaseTableDefinition tableDefinition, JavaWriter javaWriter, boolean isModelContainerAdapter) throws IOException {
if (isForeignKey) { |
<<<<<<<
boolean isBlobRaw = false;
if (columnAccess instanceof TypeConverterAccess ||
=======
if (columnAccess instanceof WrapperColumnAccess ||
>>>>>>>
boolean isBlobRaw = false;
if (columnAccess instanceof TypeConverterAccess ||
<<<<<<<
boolean isBlobRaw = false;
if (columnAccess instanceof TypeConverterAccess
=======
if (columnAccess instanceof WrapperColumnAccess
>>>>>>>
boolean isBlobRaw = false;
if (columnAccess instanceof WrapperColumnAccess
<<<<<<<
isBlobRaw = (typeName.equals(ClassName.get(Blob.class)));
} else if (columnAccess instanceof EnumColumnAccess) {
typeName = ClassName.get(String.class);
} else if (columnAccess instanceof BlobColumnAccess) {
typeName = ArrayTypeName.of(TypeName.BYTE);
=======
codeBuilder.addStatement("$T $L = $L", typeName,
finalAccessStatement, statement);
>>>>>>>
isBlobRaw = (typeName.equals(ClassName.get(Blob.class))); |
<<<<<<<
if(columnDefinition.columnType != Column.PRIMARY_KEY_AUTO_INCREMENT) {
columnDefinition.writeSaveDefinition(javaWriter, isModelContainerAdapter, false, columnCounter);
=======
if(!columnDefinition.isPrimaryKeyAutoIncrement) {
columnDefinition.writeSaveDefinition(javaWriter, isModelContainer, false, columnCounter);
>>>>>>>
if(!columnDefinition.isPrimaryKeyAutoIncrement) {
columnDefinition.writeSaveDefinition(javaWriter, isModelContainerAdapter, false, columnCounter); |
<<<<<<<
if (unitExists(f, g))
=======
if (g.unit != null)
{
invalidate(ErrorType.INCOMPATIBLE_UNIT);
}
if (f.isComplex() || g.isComplex())
>>>>>>>
if (unitExists(f, g))
<<<<<<<
}
if (f.isComplex() || g.isComplex())
{
=======
else
{
unit = null;
}
>>>>>>>
}
else
{
unit = null;
}
if (f.isComplex() || g.isComplex())
{
<<<<<<<
=======
if (f.unit != null)
{
final int n = g.getInteger();
if ((double) n != g.real)
{
invalidate(ErrorType.INCOMPATIBLE_UNIT);
}
else
{
unit = f.unit.pow(n);
}
}
else
{
unit = null;
}
>>>>>>> |
<<<<<<<
=======
protected static ThreadLocal<Stack<TransactionContext>> transactionContextThreadLocal = new ThreadLocal<Stack<TransactionContext>>();
protected static ThreadLocal<Stack<ExecutionContext>> executionContextStackThreadLocal = new ThreadLocal<Stack<ExecutionContext>>();
>>>>>>>
protected static ThreadLocal<Stack<TransactionContext>> transactionContextThreadLocal = new ThreadLocal<Stack<TransactionContext>>();
<<<<<<<
=======
public static TransactionContext getTransactionContext() {
Stack<TransactionContext> stack = getStack(transactionContextThreadLocal);
if (stack.isEmpty()) {
return null;
}
return stack.peek();
}
public static void setTransactionContext(TransactionContext transactionContext) {
getStack(transactionContextThreadLocal).push(transactionContext);
}
public static void removeTransactionContext() {
getStack(transactionContextThreadLocal).pop();
}
public static ExecutionContext getExecutionContext() {
return getStack(executionContextStackThreadLocal).peek();
}
public static boolean isExecutionContextActive() {
Stack<ExecutionContext> stack = executionContextStackThreadLocal.get();
return stack != null && !stack.isEmpty();
}
public static void setExecutionContext(ExecutionEntity execution) {
getStack(executionContextStackThreadLocal).push(new ExecutionContext(execution));
}
public static void removeExecutionContext() {
getStack(executionContextStackThreadLocal).pop();
}
>>>>>>>
public static TransactionContext getTransactionContext() {
Stack<TransactionContext> stack = getStack(transactionContextThreadLocal);
if (stack.isEmpty()) {
return null;
}
return stack.peek();
}
public static void setTransactionContext(TransactionContext transactionContext) {
getStack(transactionContextThreadLocal).push(transactionContext);
}
public static void removeTransactionContext() {
getStack(transactionContextThreadLocal).pop();
} |
<<<<<<<
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
Log.warn("Failed to query stty ", name, e);
return -1;
=======
Log.debug("Failed to query stty ", name, "\n", e);
if (config == null) {
return -1;
}
>>>>>>>
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
Log.debug("Failed to query stty ", name, "\n", e);
if (config == null) {
return -1;
} |
<<<<<<<
import org.bitcoinj.params.TestNet3Params;
=======
import org.bitcoinj.params.RegTestParams;
import org.bitcoinj.params.TestNet3Params;
>>>>>>>
import org.bitcoinj.params.RegTestParams;
import org.bitcoinj.params.TestNet3Params;
<<<<<<<
private static final NetworkParameters PARAMS = TestNet3Params.get();//MainNetParams.get();
private static final File PLAIN_CHECKPOINTS_FILE = new File("checkpoints");
private static final File TEXTUAL_CHECKPOINTS_FILE = new File("checkpoints.txt");
=======
private static NetworkParameters params;
>>>>>>>
private static NetworkParameters params;
<<<<<<<
final BlockStore store = new MemoryBlockStore(PARAMS);
final BlockChain chain = new BlockChain(PARAMS, store);
final PeerGroup peerGroup = new PeerGroup(PARAMS, chain);
peerGroup.addAddress(InetAddress.getByName("188.226.228.88"));
final InetAddress peerAddress = InetAddress.getLocalHost();
=======
final BlockStore store = new MemoryBlockStore(params);
final BlockChain chain = new BlockChain(params, store);
final PeerGroup peerGroup = new PeerGroup(params, chain);
>>>>>>>
final BlockStore store = new MemoryBlockStore(params);
final BlockChain chain = new BlockChain(params, store);
final PeerGroup peerGroup = new PeerGroup(params, chain);
<<<<<<<
final long oneMonthAgo = now;// - (86400 * 30);
=======
final long timeAgo = now - (86400 * options.valueOf(daysFlag));
System.out.println("Checkpointing up to " + Utils.dateTimeFormat(timeAgo * 1000));
>>>>>>>
final long timeAgo = now - (86400 * options.valueOf(daysFlag));
System.out.println("Checkpointing up to " + Utils.dateTimeFormat(timeAgo * 1000));
<<<<<<<
if (height % CoinDefinition.getIntervalCheckpoints() == 0 && block.getHeader().getTimeSeconds() <= oneMonthAgo) {
// if (height % PARAMS.getInterval() == 0 && block.getHeader().getTimeSeconds() <= oneMonthAgo) {
System.out.println(String.format("Checkpointing block %s at height %d",
block.getHeader().getHash(), block.getHeight()));
=======
if (height % params.getInterval() == 0 && block.getHeader().getTimeSeconds() <= timeAgo) {
System.out.println(String.format("Checkpointing block %s at height %d, time %s",
block.getHeader().getHash(), block.getHeight(), Utils.dateTimeFormat(block.getHeader().getTime())));
>>>>>>>
if (height % CoinDefinition.getIntervalCheckpoints() == 0 && block.getHeader().getTimeSeconds() <= timeAgo) {
System.out.println(String.format("Checkpointing block %s at height %d, time %s",
block.getHeader().getHash(), block.getHeight(), Utils.dateTimeFormat(block.getHeader().getTime())));
<<<<<<<
/*if (PARAMS.getId().equals(NetworkParameters.ID_MAINNET)) {
=======
if (params.getId().equals(NetworkParameters.ID_MAINNET)) {
>>>>>>>
/*
if (params.getId().equals(NetworkParameters.ID_MAINNET)) { |
<<<<<<<
peerGroup.addAddress(InetAddress.getLocalHost());
peerGroup.addAddress(InetAddress.getByName("188.226.228.88"));
//peerGroup.addAddress(InetAddress.getByName(CoinDefinition.testnetDnsSeeds[0]));
=======
final InetAddress peerAddress = InetAddress.getLocalHost();
System.out.println("Connecting to " + peerAddress + "...");
peerGroup.addAddress(peerAddress);
>>>>>>>
peerGroup.addAddress(InetAddress.getByName("188.226.228.88"));
final InetAddress peerAddress = InetAddress.getLocalHost();
System.out.println("Connecting to " + peerAddress + "...");
peerGroup.addAddress(peerAddress); |
<<<<<<<
new ExtensionAttribute(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_USER_ASSIGNEE),
new ExtensionAttribute(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_USER_OWNER),
=======
new ExtensionAttribute(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_USER_BUSINESS_CALENDAR_NAME),
new ExtensionAttribute(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_USER_ASSIGNEE),
>>>>>>>
new ExtensionAttribute(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_USER_BUSINESS_CALENDAR_NAME),
new ExtensionAttribute(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_USER_ASSIGNEE),
new ExtensionAttribute(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_TASK_USER_OWNER), |
<<<<<<<
public static int minBroadcastConnections = 3; //0 for default; Using 3 like BreadWallet.
=======
public static int minBroadcastConnections = 3; //0 for default; we need more peers.
>>>>>>>
public static int minBroadcastConnections = 0; //0 for default; Using 3 like BreadWallet. |
<<<<<<<
// The execution is waiting in the first usertask. This contains a boundary timer event.
Job timerJob = managementService.createTimerJobQuery().processInstanceId(processInstance.getId()).singleResult();
=======
// The execution is waiting in the first usertask. This contains a boundary timer event.
Job timerJob = managementService.createJobQuery().processInstanceId(processInstance.getId()).singleResult();
Date duedate = timerJob.getDuedate();
>>>>>>>
// The execution is waiting in the first usertask. This contains a boundary timer event.
Job timerJob = managementService.createTimerJobQuery().processInstanceId(processInstance.getId()).singleResult();
Date duedate = timerJob.getDuedate(); |
<<<<<<<
headerItem.addSubItem(call, R.drawable.baseline_call_24, LocaleController.getString("Call", R.string.Call));
=======
headerItem.addSubItem(call, R.drawable.msg_callback, LocaleController.getString("Call", R.string.Call));
if (Build.VERSION.SDK_INT >= 18) {
headerItem.addSubItem(video_call, R.drawable.msg_videocall, LocaleController.getString("VideoCall", R.string.VideoCall));
}
>>>>>>>
headerItem.addSubItem(call, R.drawable.baseline_call_24, LocaleController.getString("Call", R.string.Call));
if (Build.VERSION.SDK_INT >= 18) {
headerItem.addSubItem(video_call, R.drawable.msg_videocall, LocaleController.getString("VideoCall", R.string.VideoCall));
} |
<<<<<<<
if (id == clear_history) {
if (chatInfo != null && chatInfo.pinned_msg_id != 0) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
preferences.edit().putInt("pin_" + dialog_id, chatInfo.pinned_msg_id).apply();
updatePinnedMessageView(true);
} else if (userInfo != null && userInfo.pinned_msg_id != 0) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
preferences.edit().putInt("pin_" + dialog_id, userInfo.pinned_msg_id).apply();
updatePinnedMessageView(true);
}
getMessagesController().deleteDialog(dialog_id, 1, param);
clearingHistory = false;
clearHistory(false);
chatAdapter.notifyDataSetChanged();
} else {
if (isChat) {
if (ChatObject.isNotInChat(currentChat)) {
getMessagesController().deleteDialog(dialog_id, 0, param);
} else {
getMessagesController().deleteUserFromChat((int) -dialog_id, getMessagesController().getUser(getUserConfig().getClientUserId()), null);
}
} else {
getMessagesController().deleteDialog(dialog_id, 0, param);
}
finishFragment();
=======
if (chatInfo != null && chatInfo.pinned_msg_id != 0) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
preferences.edit().putInt("pin_" + dialog_id, chatInfo.pinned_msg_id).commit();
updatePinnedMessageView(true);
} else if (userInfo != null && userInfo.pinned_msg_id != 0) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
preferences.edit().putInt("pin_" + dialog_id, userInfo.pinned_msg_id).commit();
updatePinnedMessageView(true);
>>>>>>>
if (chatInfo != null && chatInfo.pinned_msg_id != 0) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
preferences.edit().putInt("pin_" + dialog_id, chatInfo.pinned_msg_id).apply();
updatePinnedMessageView(true);
} else if (userInfo != null && userInfo.pinned_msg_id != 0) {
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
preferences.edit().putInt("pin_" + dialog_id, userInfo.pinned_msg_id).apply();
updatePinnedMessageView(true);
<<<<<<<
View view = chatScrollHelper.positionToOldView.get(nextPosition);
if (view != null) {
if (child.getTranslationY() != 0) {
canvas.restore();
}
return result;
}
=======
View view = chatScrollHelper.positionToOldView.get(nextPosition);
if (view != null) {
if (child.getTranslationY() != 0) {
canvas.restore();
}
imageReceiver.setVisible(false, false);
return result;
}
>>>>>>>
View view = chatScrollHelper.positionToOldView.get(nextPosition);
if (view != null) {
if (child.getTranslationY() != 0) {
canvas.restore();
}
imageReceiver.setVisible(false, false);
return result;
}
<<<<<<<
closeReportSpam.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_topPanelClose), PorterDuff.Mode.SRC_IN));
=======
if (Build.VERSION.SDK_INT >= 21) {
closeReportSpam.setBackground(Theme.createSelectorDrawable(Theme.getColor(Theme.key_chat_topPanelClose) & 0x19ffffff));
}
closeReportSpam.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_topPanelClose), PorterDuff.Mode.MULTIPLY));
>>>>>>>
if (Build.VERSION.SDK_INT >= 21) {
closeReportSpam.setBackground(Theme.createSelectorDrawable(Theme.getColor(Theme.key_chat_topPanelClose) & 0x19ffffff));
}
closeReportSpam.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_topPanelClose), PorterDuff.Mode.SRC_IN));
<<<<<<<
if (message.canDeleteMessage(inScheduleMode, currentChat)) {
items.add(LocaleController.getString("Delete", R.string.Delete));
options.add(1);
icons.add(R.drawable.baseline_delete_24);
}
=======
>>>>>>>
<<<<<<<
if (message.canDeleteMessage(inScheduleMode, currentChat)) {
items.add(LocaleController.getString("Delete", R.string.Delete));
options.add(1);
icons.add(R.drawable.baseline_delete_24);
}
=======
}
if (message.canDeleteMessage(inScheduleMode, currentChat)) {
items.add(LocaleController.getString("Delete", R.string.Delete));
options.add(1);
icons.add(R.drawable.msg_delete);
>>>>>>>
}
if (message.canDeleteMessage(inScheduleMode, currentChat)) {
items.add(LocaleController.getString("Delete", R.string.Delete));
options.add(1);
icons.add(R.drawable.baseline_delete_24);
<<<<<<<
if (fromUserBlocked) {
messageCell.setVisibility(View.GONE);
} else {
messageCell.setVisibility(View.VISIBLE);
}
=======
if (!animatingDocuments.isEmpty() && animatingDocuments.containsKey(message.getDocument())) {
animatingDocuments.remove(message.getDocument());
if (chatListItemAniamtor != null) {
chatListItemAniamtor.onGreetingStickerTransition(holder, greetingsViewContainer);
}
}
>>>>>>>
if (fromUserBlocked) {
messageCell.setVisibility(View.GONE);
} else {
messageCell.setVisibility(View.VISIBLE);
}
if (!animatingDocuments.isEmpty() && animatingDocuments.containsKey(message.getDocument())) {
animatingDocuments.remove(message.getDocument());
if (chatListItemAniamtor != null) {
chatListItemAniamtor.onGreetingStickerTransition(holder, greetingsViewContainer);
}
} |
<<<<<<<
final ImageView undoImageView = new ImageView(getContext());
undoImageView.setOnClickListener(v -> undo());
undoImageView.setImageResource(R.drawable.chats_undo);
undoImageView.setColorFilter(new PorterDuffColorFilter(undoCancelColor, PorterDuff.Mode.SRC_IN));
undoImageView.setBackground(Theme.createSelectorDrawable((undoCancelColor & 0x00ffffff) | 0x19000000));
ViewHelper.setPaddingRelative(undoImageView, 0, 12, 0, 12);
addView(undoImageView, LayoutHelper.createFrameRelatively(56, 48, Gravity.CENTER_VERTICAL));
=======
if (text) {
TextView undoTextView = new TextView(context);
undoTextView.setOnClickListener(v -> undo());
undoTextView.setBackground(Theme.createSelectorDrawable((undoCancelColor & 0x00ffffff) | 0x19000000, 7));
undoTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
undoTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
undoTextView.setTextColor(undoCancelColor);
undoTextView.setText(LocaleController.getString("Undo", R.string.Undo));
undoTextView.setGravity(Gravity.CENTER_VERTICAL);
ViewHelper.setPaddingRelative(undoTextView, 16, 0, 16, 0);
addView(undoTextView, LayoutHelper.createFrameRelatively(LayoutHelper.WRAP_CONTENT, 48, Gravity.CENTER_VERTICAL, 0, 0, 0, 0));
} else {
final ImageView undoImageView = new ImageView(getContext());
undoImageView.setOnClickListener(v -> undo());
undoImageView.setImageResource(R.drawable.chats_undo);
undoImageView.setColorFilter(new PorterDuffColorFilter(undoCancelColor, PorterDuff.Mode.MULTIPLY));
undoImageView.setBackground(Theme.createSelectorDrawable((undoCancelColor & 0x00ffffff) | 0x19000000));
ViewHelper.setPaddingRelative(undoImageView, 0, 12, 0, 12);
addView(undoImageView, LayoutHelper.createFrameRelatively(56, 48, Gravity.CENTER_VERTICAL));
}
>>>>>>>
if (text) {
TextView undoTextView = new TextView(context);
undoTextView.setOnClickListener(v -> undo());
undoTextView.setBackground(Theme.createSelectorDrawable((undoCancelColor & 0x00ffffff) | 0x19000000, 7));
undoTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
undoTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
undoTextView.setTextColor(undoCancelColor);
undoTextView.setText(LocaleController.getString("Undo", R.string.Undo));
undoTextView.setGravity(Gravity.CENTER_VERTICAL);
ViewHelper.setPaddingRelative(undoTextView, 16, 0, 16, 0);
addView(undoTextView, LayoutHelper.createFrameRelatively(LayoutHelper.WRAP_CONTENT, 48, Gravity.CENTER_VERTICAL, 0, 0, 0, 0));
} else {
final ImageView undoImageView = new ImageView(getContext());
undoImageView.setOnClickListener(v -> undo());
undoImageView.setImageResource(R.drawable.chats_undo);
undoImageView.setColorFilter(new PorterDuffColorFilter(undoCancelColor, PorterDuff.Mode.SRC_IN));
undoImageView.setBackground(Theme.createSelectorDrawable((undoCancelColor & 0x00ffffff) | 0x19000000));
ViewHelper.setPaddingRelative(undoImageView, 0, 12, 0, 12);
addView(undoImageView, LayoutHelper.createFrameRelatively(56, 48, Gravity.CENTER_VERTICAL));
} |
<<<<<<<
import tw.nekomimi.nekogram.NekoConfig;
=======
>>>>>>>
import tw.nekomimi.nekogram.NekoConfig;
<<<<<<<
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.SRC_IN));
=======
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(darkTheme ? Theme.key_voipgroup_mutedIcon : Theme.key_dialogSearchIcon), PorterDuff.Mode.MULTIPLY));
>>>>>>>
searchIconImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(darkTheme ? Theme.key_voipgroup_mutedIcon : Theme.key_dialogSearchIcon), PorterDuff.Mode.SRC_IN));
<<<<<<<
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogSearchIcon), PorterDuff.Mode.SRC_IN));
=======
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(darkTheme ? Theme.key_voipgroup_searchPlaceholder : Theme.key_dialogSearchIcon), PorterDuff.Mode.MULTIPLY));
>>>>>>>
clearSearchImageView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(darkTheme ? Theme.key_voipgroup_searchPlaceholder : Theme.key_dialogSearchIcon), PorterDuff.Mode.SRC_IN));
<<<<<<<
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN));
=======
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(darkTheme ? Theme.key_voipgroup_inviteMembersBackground : Theme.key_dialogBackground), PorterDuff.Mode.MULTIPLY));
>>>>>>>
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(darkTheme ? Theme.key_voipgroup_inviteMembersBackground : Theme.key_dialogBackground), PorterDuff.Mode.SRC_IN)); |
<<<<<<<
public static int BUILD_VERSION = 1862;
public static String BUILD_VERSION_STRING = "5.14.0.5";
public static int APP_ID = 336779; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
public static String APP_HASH = "b91eefacc86747c068c8d8a16b41500d"; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id
public static String HOCKEY_APP_HASH = "your-hockeyapp-api-key-here";
public static String HOCKEY_APP_HASH_DEBUG = "your-hockeyapp-api-key-here";
public static String SMS_HASH = ""; //https://developers.google.com/identity/sms-retriever/overview
public static String PLAYSTORE_APP_URL = "https://play.google.com/store/apps/details?id=tw.nekomimi.nekogram";
=======
public static int BUILD_VERSION = 1866;
public static String BUILD_VERSION_STRING = "5.15.0";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
public static String HOCKEY_APP_HASH = "a5b5c4f551dadedc9918d9766a22ca7c";
public static String HOCKEY_APP_HASH_DEBUG = "f972660267c948d2b5d04761f1c1a8f3";
//
public static String SMS_HASH = DEBUG_VERSION ? "O2P2z+/jBpJ" : "oLeq9AcOZkT";
public static String PLAYSTORE_APP_URL = "https://play.google.com/store/apps/details?id=org.telegram.messenger";
>>>>>>>
public static int BUILD_VERSION = 1866;
public static String BUILD_VERSION_STRING = "5.15.0";
public static int APP_ID = 336779; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
public static String APP_HASH = "b91eefacc86747c068c8d8a16b41500d"; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id
public static String HOCKEY_APP_HASH = "your-hockeyapp-api-key-here";
public static String HOCKEY_APP_HASH_DEBUG = "your-hockeyapp-api-key-here";
public static String SMS_HASH = ""; //https://developers.google.com/identity/sms-retriever/overview
public static String PLAYSTORE_APP_URL = "https://play.google.com/store/apps/details?id=tw.nekomimi.nekogram"; |
<<<<<<<
import kotlin.Unit;
import tw.nekomimi.nekogram.BottomBuilder;
import tw.nekomimi.nekogram.JalaliCalendar;
import tw.nekomimi.nekogram.utils.VibrateUtil;
=======
import androidx.annotation.RequiresApi;
>>>>>>>
import kotlin.Unit;
import tw.nekomimi.nekogram.BottomBuilder;
import tw.nekomimi.nekogram.JalaliCalendar;
import tw.nekomimi.nekogram.utils.VibrateUtil;
import androidx.annotation.RequiresApi;
<<<<<<<
=======
spanned = new SpannableStringBuilder(AndroidUtilities.replaceTags(str));
int start = TextUtils.indexOf(spanned, '[');
int end;
if (start != -1) {
end = TextUtils.indexOf(spanned, ']', start + 1);
if (end != -1) {
spanned.delete(end, end + 1);
spanned.delete(start, start + 1);
}
} else {
end = -1;
}
if (start != -1 && end != -1) {
spanned.setSpan(new URLSpanNoUnderline(language.translations_url) {
@Override
public void onClick(View widget) {
builder.getDismissRunnable().run();
super.onClick(widget);
}
}, start, end - 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
final TextView message = new TextView(activity);
message.setText(spanned);
message.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
message.setLinkTextColor(Theme.getColor(Theme.key_dialogTextLink));
message.setHighlightColor(Theme.getColor(Theme.key_dialogLinkSelection));
message.setPadding(AndroidUtilities.dp(23), 0, AndroidUtilities.dp(23), 0);
message.setMovementMethod(new AndroidUtilities.LinkMovementMethodMy());
message.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
builder.setView(message);
>>>>>>> |
<<<<<<<
public static int BUILD_VERSION = 1918;
public static String BUILD_VERSION_STRING = "6.0.1.3";
public static int APP_ID = 336779;
public static String APP_HASH = "b91eefacc86747c068c8d8a16b41500d";
=======
public static int BUILD_VERSION = 1940;
public static String BUILD_VERSION_STRING = "6.1.0";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
>>>>>>>
public static int BUILD_VERSION = 1940;
public static String BUILD_VERSION_STRING = "6.1.0";
public static int APP_ID = 336779;
public static String APP_HASH = "b91eefacc86747c068c8d8a16b41500d"; |
<<<<<<<
private class DrawerItemTouchHelperCallback extends ItemTouchHelper.Callback {
@Override
public boolean isLongPressDragEnabled() {
return true;
}
@Override
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
if (viewHolder != null && viewHolder.getItemViewType() != 4) {
return makeMovementFlags(0, 0);
}
return makeMovementFlags(ItemTouchHelper.UP | ItemTouchHelper.DOWN, 0);
}
@Override
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
}
@Override
public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {
if (viewHolder != null && viewHolder.getItemViewType() == 4 && actionState != ItemTouchHelper.ACTION_STATE_IDLE) {
sideMenu.cancelClickRunnables(false);
viewHolder.itemView.setPressed(true);
}
super.onSelectedChanged(viewHolder, actionState);
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
}
@Override
public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
super.clearView(recyclerView, viewHolder);
viewHolder.itemView.setPressed(false);
}
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
if (viewHolder.getItemViewType() == 4 && target.getItemViewType() == 4 &&
viewHolder.getAdapterPosition() != target.getAdapterPosition()) {
drawerLayoutAdapter.swapAccountPosition(viewHolder.getAdapterPosition(), target.getAdapterPosition());
return true;
}
return false;
}
}
=======
private static final int PLAY_SERVICES_REQUEST_CHECK_SETTINGS = 140;
>>>>>>>
private class DrawerItemTouchHelperCallback extends ItemTouchHelper.Callback {
@Override
public boolean isLongPressDragEnabled() {
return true;
}
@Override
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
if (viewHolder != null && viewHolder.getItemViewType() != 4) {
return makeMovementFlags(0, 0);
}
return makeMovementFlags(ItemTouchHelper.UP | ItemTouchHelper.DOWN, 0);
}
@Override
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
}
@Override
public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {
if (viewHolder != null && viewHolder.getItemViewType() == 4 && actionState != ItemTouchHelper.ACTION_STATE_IDLE) {
sideMenu.cancelClickRunnables(false);
viewHolder.itemView.setPressed(true);
}
super.onSelectedChanged(viewHolder, actionState);
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
}
@Override
public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
super.clearView(recyclerView, viewHolder);
viewHolder.itemView.setPressed(false);
}
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
if (viewHolder.getItemViewType() == 4 && target.getItemViewType() == 4 &&
viewHolder.getAdapterPosition() != target.getAdapterPosition()) {
drawerLayoutAdapter.swapAccountPosition(viewHolder.getAdapterPosition(), target.getAdapterPosition());
return true;
}
return false;
}
}
private static final int PLAY_SERVICES_REQUEST_CHECK_SETTINGS = 140; |
<<<<<<<
private static SparseArray<MessagesStorage> Instance = new SparseArray();
private final static int LAST_DB_VERSION = 77;
=======
private static volatile MessagesStorage[] Instance = new MessagesStorage[UserConfig.MAX_ACCOUNT_COUNT];
private final static int LAST_DB_VERSION = 78;
>>>>>>>
private static SparseArray<MessagesStorage> Instance = new SparseArray();
private final static int LAST_DB_VERSION = 78; |
<<<<<<<
sideMenu.setAdapter(drawerLayoutAdapter = new DrawerLayoutAdapter(this, sideMenu.getItemAnimator()));
ItemTouchHelper drawerItemTouchHelper = new ItemTouchHelper(new DrawerItemTouchHelperCallback());
drawerItemTouchHelper.attachToRecyclerView(sideMenu);
=======
sideMenu.setAdapter(drawerLayoutAdapter = new DrawerLayoutAdapter(this, itemAnimator));
>>>>>>>
sideMenu.setAdapter(drawerLayoutAdapter = new DrawerLayoutAdapter(this, itemAnimator));
ItemTouchHelper drawerItemTouchHelper = new ItemTouchHelper(new DrawerItemTouchHelperCallback());
drawerItemTouchHelper.attachToRecyclerView(sideMenu);
<<<<<<<
} else if (url.contains("neko")) {
open_settings = 4;
}
} else if (url.startsWith("tg:meow") || url.startsWith("tg://meow") || url.startsWith("tg:nya") || url.startsWith("tg://nya") || url.startsWith("tg:miao") || url.startsWith("tg://miao")) {
try {
Toast.makeText(LaunchActivity.this, LocaleController.getString("Nya", R.string.Nya), Toast.LENGTH_SHORT).show();
} catch (Exception e) {
FileLog.e(e);
=======
} else if (url.contains("folders")) {
open_settings = 4;
>>>>>>>
} else if (url.contains("folders")) {
open_settings = 4;
} else if (url.contains("neko")) {
open_settings = 100;
}
} else if (url.startsWith("tg:meow") || url.startsWith("tg://meow") || url.startsWith("tg:nya") || url.startsWith("tg://nya") || url.startsWith("tg:miao") || url.startsWith("tg://miao")) {
try {
Toast.makeText(LaunchActivity.this, LocaleController.getString("Nya", R.string.Nya), Toast.LENGTH_SHORT).show();
} catch (Exception e) {
FileLog.e(e);
<<<<<<<
} else if (open_settings == 4) {
fragment = new NekoSettingsActivity();
=======
} else if (open_settings == 4) {
fragment = new FiltersSetupActivity();
>>>>>>>
} else if (open_settings == 4) {
fragment = new FiltersSetupActivity();
} else if (open_settings == 100) {
fragment = new NekoSettingsActivity(); |
<<<<<<<
} else if (id == gallery_menu_send || id == gallery_menu_send_noquote) {
=======
currentMessageObject = null;
} else if (id == gallery_menu_send) {
>>>>>>>
currentMessageObject = null;
} else if (id == gallery_menu_send || id == gallery_menu_send_noquote) {
<<<<<<<
for (int a = 0; a < 3; a++) {
if (a == 1 && placeProvider != null && placeProvider.getSelectedPhotos() != null) {
=======
for (int a = 0; a < 2; a++) {
if (a == 0 && !parentChatActivity.canScheduleMessage()) {
continue;
}
if (a == 0 && placeProvider != null && placeProvider.getSelectedPhotos() != null) {
>>>>>>>
for (int a = 0; a < 3; a++) {
if (a == 1 && !parentChatActivity.canScheduleMessage()) {
continue;
}
if (a == 0 && placeProvider != null && placeProvider.getSelectedPhotos() != null) {
<<<<<<<
menuItem.showSubItem(gallery_menu_showinchat);
menuItem.showSubItem(gallery_menu_showall);
setItemVisible(sendNoQuoteItem, true, false);
=======
if (parentChatActivity == null || !parentChatActivity.isThreadChat()) {
menuItem.showSubItem(gallery_menu_showinchat);
menuItem.showSubItem(gallery_menu_showall);
}
>>>>>>>
if (parentChatActivity == null || !parentChatActivity.isThreadChat()) {
menuItem.showSubItem(gallery_menu_showinchat);
menuItem.showSubItem(gallery_menu_showall);
}
setItemVisible(sendNoQuoteItem, true, false); |
<<<<<<<
noCoverDrawable = context.getResources().getDrawable(R.drawable.nocover).mutate();
noCoverDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_placeholder), PorterDuff.Mode.SRC_IN));
=======
>>>>>>>
<<<<<<<
shadowDrawable = context.getResources().getDrawable(R.drawable.sheet_shadow).mutate();
shadowDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_background), PorterDuff.Mode.SRC_IN));
paint.setColor(Theme.getColor(Theme.key_player_placeholderBackground));
=======
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.moreMusicDidLoad);
>>>>>>>
NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.moreMusicDidLoad);
<<<<<<<
menuItem = menu.addItem(0, R.drawable.ic_ab_other);
menuItem.addSubItem(1, R.drawable.msg_forward, LocaleController.getString("Forward", R.string.Forward));
menuItem.addSubItem(2, R.drawable.baseline_share_24, LocaleController.getString("ShareFile", R.string.ShareFile));
menuItem.addSubItem(4, R.drawable.msg_message, LocaleController.getString("ShowInChat", R.string.ShowInChat));
menuItem.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
menuItem.setTranslationX(AndroidUtilities.dp(48));
menuItem.setAlpha(0.0f);
=======
>>>>>>>
<<<<<<<
playerLayout.addView(authorTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 72, 40, 60, 0));
optionsButton = new ActionBarMenuItem(context, null, 0, Theme.getColor(Theme.key_player_actionBarItems));
optionsButton.setLongClickEnabled(false);
optionsButton.setIcon(R.drawable.ic_ab_other);
optionsButton.setAdditionalYOffset(-AndroidUtilities.dp(120));
playerLayout.addView(optionsButton, LayoutHelper.createFrame(40, 40, Gravity.TOP | Gravity.RIGHT, 0, 19, 10, 0));
optionsButton.addSubItem(1, R.drawable.msg_forward, LocaleController.getString("Forward", R.string.Forward));
optionsButton.addSubItem(2, R.drawable.baseline_share_24, LocaleController.getString("ShareFile", R.string.ShareFile));
optionsButton.addSubItem(4, R.drawable.msg_message, LocaleController.getString("ShowInChat", R.string.ShowInChat));
optionsButton.setOnClickListener(v -> optionsButton.toggleSubMenu());
optionsButton.setDelegate(this::onSubItemClick);
optionsButton.setContentDescription(LocaleController.getString("AccDescrMoreOptions", R.string.AccDescrMoreOptions));
=======
playerLayout.addView(authorTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 20, 47, 72, 0));
>>>>>>>
playerLayout.addView(authorTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 20, 47, 72, 0));
<<<<<<<
private void updateShuffleButton() {
if (SharedConfig.shuffleMusic) {
Drawable drawable = getContext().getResources().getDrawable(R.drawable.pl_shuffle).mutate();
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.SRC_IN));
shuffleButton.setIcon(drawable);
shuffleButton.setContentDescription(LocaleController.getString("Shuffle", R.string.Shuffle));
} else {
Drawable drawable = getContext().getResources().getDrawable(R.drawable.music_reverse).mutate();
if (SharedConfig.playOrderReversed) {
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.SRC_IN));
} else {
drawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_button), PorterDuff.Mode.SRC_IN));
}
shuffleButton.setIcon(drawable);
shuffleButton.setContentDescription(LocaleController.getString("ReverseOrder", R.string.ReverseOrder));
}
playOrderButtons[0].setColorFilter(new PorterDuffColorFilter(Theme.getColor(SharedConfig.playOrderReversed ? Theme.key_player_buttonActive : Theme.key_player_button), PorterDuff.Mode.SRC_IN));
playOrderButtons[1].setColorFilter(new PorterDuffColorFilter(Theme.getColor(SharedConfig.shuffleMusic ? Theme.key_player_buttonActive : Theme.key_player_button), PorterDuff.Mode.SRC_IN));
}
=======
>>>>>>>
<<<<<<<
if (mode == 0) {
repeatButton.setImageResource(R.drawable.pl_repeat);
repeatButton.setTag(Theme.key_player_button);
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_button), PorterDuff.Mode.SRC_IN));
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatOff", R.string.AccDescrRepeatOff));
} else if (mode == 1) {
repeatButton.setImageResource(R.drawable.pl_repeat);
repeatButton.setTag(Theme.key_player_buttonActive);
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.SRC_IN));
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatList", R.string.AccDescrRepeatList));
=======
if (mode == 0 || mode == 1) {
if (SharedConfig.shuffleMusic) {
if (mode == 0) {
repeatButton.setIcon(R.drawable.player_new_shuffle);
} else {
repeatButton.setIcon(R.drawable.player_new_repeat_shuffle);
}
} else if (SharedConfig.playOrderReversed) {
if (mode == 0) {
repeatButton.setIcon(R.drawable.player_new_order);
} else {
repeatButton.setIcon(R.drawable.player_new_repeat_reverse);
}
} else {
repeatButton.setIcon(R.drawable.player_new_repeatall);
}
if (mode == 0 && !SharedConfig.shuffleMusic && !SharedConfig.playOrderReversed) {
repeatButton.setTag(Theme.key_player_button);
repeatButton.setIconColor(Theme.getColor(Theme.key_player_button));
Theme.setSelectorDrawableColor(repeatButton.getBackground(), Theme.getColor(Theme.key_listSelector), true);
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatOff", R.string.AccDescrRepeatOff));
} else {
repeatButton.setTag(Theme.key_player_buttonActive);
repeatButton.setIconColor(Theme.getColor(Theme.key_player_buttonActive));
Theme.setSelectorDrawableColor(repeatButton.getBackground(), Theme.getColor(Theme.key_player_buttonActive) & 0x19ffffff, true);
if (mode == 0) {
if (SharedConfig.shuffleMusic) {
repeatButton.setContentDescription(LocaleController.getString("ShuffleList", R.string.ShuffleList));
} else {
repeatButton.setContentDescription(LocaleController.getString("ReverseOrder", R.string.ReverseOrder));
}
} else {
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatList", R.string.AccDescrRepeatList));
}
}
>>>>>>>
if (mode == 0 || mode == 1) {
if (SharedConfig.shuffleMusic) {
if (mode == 0) {
repeatButton.setIcon(R.drawable.player_new_shuffle);
} else {
repeatButton.setIcon(R.drawable.player_new_repeat_shuffle);
}
} else if (SharedConfig.playOrderReversed) {
if (mode == 0) {
repeatButton.setIcon(R.drawable.player_new_order);
} else {
repeatButton.setIcon(R.drawable.player_new_repeat_reverse);
}
} else {
repeatButton.setIcon(R.drawable.player_new_repeatall);
}
if (mode == 0 && !SharedConfig.shuffleMusic && !SharedConfig.playOrderReversed) {
repeatButton.setTag(Theme.key_player_button);
repeatButton.setIconColor(Theme.getColor(Theme.key_player_button));
Theme.setSelectorDrawableColor(repeatButton.getBackground(), Theme.getColor(Theme.key_listSelector), true);
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatOff", R.string.AccDescrRepeatOff));
} else {
repeatButton.setTag(Theme.key_player_buttonActive);
repeatButton.setIconColor(Theme.getColor(Theme.key_player_buttonActive));
Theme.setSelectorDrawableColor(repeatButton.getBackground(), Theme.getColor(Theme.key_player_buttonActive) & 0x19ffffff, true);
if (mode == 0) {
if (SharedConfig.shuffleMusic) {
repeatButton.setContentDescription(LocaleController.getString("ShuffleList", R.string.ShuffleList));
} else {
repeatButton.setContentDescription(LocaleController.getString("ReverseOrder", R.string.ReverseOrder));
}
} else {
repeatButton.setContentDescription(LocaleController.getString("AccDescrRepeatList", R.string.AccDescrRepeatList));
}
}
<<<<<<<
repeatButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_player_buttonActive), PorterDuff.Mode.SRC_IN));
=======
repeatButton.setIconColor(Theme.getColor(Theme.key_player_buttonActive));
Theme.setSelectorDrawableColor(repeatButton.getBackground(), Theme.getColor(Theme.key_player_buttonActive) & 0x19ffffff, true);
>>>>>>>
repeatButton.setIconColor(Theme.getColor(Theme.key_player_buttonActive));
Theme.setSelectorDrawableColor(repeatButton.getBackground(), Theme.getColor(Theme.key_player_buttonActive) & 0x19ffffff, true); |
<<<<<<<
drawableRight.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
=======
drawableRight.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.MULTIPLY));
exclusionRects.add(exclustionRect);
>>>>>>>
drawableRight.setColorFilter(new PorterDuffColorFilter(0xff000000, PorterDuff.Mode.SRC_IN));
exclusionRects.add(exclustionRect); |
<<<<<<<
=======
import org.telegram.ui.PaymentFormActivity;
import org.telegram.ui.TooManyCommunitiesActivity;
import org.telegram.ui.TwoStepVerificationActivity;
import org.telegram.ui.TwoStepVerificationSetupActivity;
>>>>>>>
import org.telegram.ui.TooManyCommunitiesActivity;
import org.telegram.ui.TwoStepVerificationActivity;
import org.telegram.ui.TwoStepVerificationSetupActivity;
<<<<<<<
sendMessage((TLRPC.TL_photo) messageObject.messageOwner.media.photo, null, did, nullReply ? null : messageObject.replyMessageObject, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, params, notify, scheduleDate, messageObject.messageOwner.media.ttl_seconds, messageObject);
=======
sendMessage((TLRPC.TL_photo) messageObject.messageOwner.media.photo, null, did, messageObject.replyMessageObject, null, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, params, true, 0, messageObject.messageOwner.media.ttl_seconds, messageObject);
>>>>>>>
sendMessage((TLRPC.TL_photo) messageObject.messageOwner.media.photo, null, did, nullReply ? null : messageObject.replyMessageObject, null, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, params, notify, scheduleDate, messageObject.messageOwner.media.ttl_seconds, messageObject);
<<<<<<<
sendMessage((TLRPC.TL_document) messageObject.messageOwner.media.document, null, messageObject.messageOwner.attachPath, did, nullReply ? null : messageObject.replyMessageObject, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, params, notify, scheduleDate, messageObject.messageOwner.media.ttl_seconds, messageObject);
=======
sendMessage((TLRPC.TL_document) messageObject.messageOwner.media.document, null, messageObject.messageOwner.attachPath, did, messageObject.replyMessageObject, null, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, params, true, 0, messageObject.messageOwner.media.ttl_seconds, messageObject);
>>>>>>>
sendMessage((TLRPC.TL_document) messageObject.messageOwner.media.document, null, messageObject.messageOwner.attachPath, did, nullReply ? null : messageObject.replyMessageObject, null, messageObject.messageOwner.message, messageObject.messageOwner.entities, null, params, notify, scheduleDate, messageObject.messageOwner.media.ttl_seconds, messageObject);
<<<<<<<
sendMessage(messageObject.messageOwner.media, did, nullReply ? null : messageObject.replyMessageObject, null, null, notify, scheduleDate);
=======
sendMessage(messageObject.messageOwner.media, did, messageObject.replyMessageObject, null, null, null, true, 0);
>>>>>>>
sendMessage(messageObject.messageOwner.media, did, messageObject.replyMessageObject, null, null, null, true, 0);
<<<<<<<
sendMessage(user, did, nullReply ? null : messageObject.replyMessageObject, null, null, notify, scheduleDate);
=======
sendMessage(user, did, messageObject.replyMessageObject, null, null, null, true, 0);
>>>>>>>
sendMessage(user, did, messageObject.replyMessageObject, null, null, null, true, 0);
<<<<<<<
sendMessage(messageObject.messageOwner.message, did, nullReply ? null : messageObject.replyMessageObject, webPage, true, entities, null, null, notify, scheduleDate);
=======
sendMessage(messageObject.messageOwner.message, did, messageObject.replyMessageObject, null, webPage, true, entities, null, null, true, 0);
>>>>>>>
sendMessage(messageObject.messageOwner.message, did, nullReply ? null : messageObject.replyMessageObject, null, webPage, true, entities, null, null, notify, scheduleDate);
<<<<<<<
public static void prepareSendingLocation(AccountInstance accountInstance, final Location location, final long dialog_id) {
accountInstance.getMessagesStorage().getStorageQueue().postRunnable(() -> Utilities.stageQueue.postRunnable(() -> AndroidUtilities.runOnUIThread(() -> {
CharSequence venueTitle = location.getExtras().getCharSequence("venueTitle");
CharSequence venueAddress = location.getExtras().getCharSequence("venueAddress");
TLRPC.MessageMedia sendingMedia;
if(venueTitle != null || venueAddress != null) {
sendingMedia = new TLRPC.TL_messageMediaVenue();
sendingMedia.address = venueAddress == null ? "" : venueAddress.toString();
sendingMedia.title = venueTitle == null ? "" : venueTitle.toString();
sendingMedia.provider = "";
sendingMedia.venue_id = "";
}
else {
sendingMedia = new TLRPC.TL_messageMediaGeo();
}
sendingMedia.geo = new TLRPC.TL_geoPoint();
sendingMedia.geo.lat = location.getLatitude();
sendingMedia.geo._long = location.getLongitude();
accountInstance.getSendMessagesHelper().sendMessage(sendingMedia, dialog_id, null, null, null, true, 0);
})));
}
@UiThread
public static void prepareSendingPhoto(AccountInstance accountInstance, String imageFilePath, Uri imageUri, long dialog_id, MessageObject reply_to_msg, CharSequence caption, ArrayList<TLRPC.MessageEntity> entities, ArrayList<TLRPC.InputDocument> stickers, InputContentInfoCompat inputContent, int ttl, MessageObject editingMessageObject, boolean notify, int scheduleDate) {
=======
public static void prepareSendingPhoto(AccountInstance accountInstance, String imageFilePath, Uri imageUri, long dialogId, MessageObject replyToMsg, MessageObject replyToTopMsg, CharSequence caption, ArrayList<TLRPC.MessageEntity> entities, ArrayList<TLRPC.InputDocument> stickers, InputContentInfoCompat inputContent, int ttl, MessageObject editingMessageObject, boolean notify, int scheduleDate) {
>>>>>>>
public static void prepareSendingLocation(AccountInstance accountInstance, final Location location, final long dialog_id) {
accountInstance.getMessagesStorage().getStorageQueue().postRunnable(() -> Utilities.stageQueue.postRunnable(() -> AndroidUtilities.runOnUIThread(() -> {
CharSequence venueTitle = location.getExtras().getCharSequence("venueTitle");
CharSequence venueAddress = location.getExtras().getCharSequence("venueAddress");
TLRPC.MessageMedia sendingMedia;
if(venueTitle != null || venueAddress != null) {
sendingMedia = new TLRPC.TL_messageMediaVenue();
sendingMedia.address = venueAddress == null ? "" : venueAddress.toString();
sendingMedia.title = venueTitle == null ? "" : venueTitle.toString();
sendingMedia.provider = "";
sendingMedia.venue_id = "";
}
else {
sendingMedia = new TLRPC.TL_messageMediaGeo();
}
sendingMedia.geo = new TLRPC.TL_geoPoint();
sendingMedia.geo.lat = location.getLatitude();
sendingMedia.geo._long = location.getLongitude();
accountInstance.getSendMessagesHelper().sendMessage(sendingMedia, dialog_id, null, null, null, true, 0);
})));
}
@UiThread
public static void prepareSendingPhoto(AccountInstance accountInstance, String imageFilePath, Uri imageUri, long dialogId, MessageObject replyToMsg, MessageObject replyToTopMsg, CharSequence caption, ArrayList<TLRPC.MessageEntity> entities, ArrayList<TLRPC.InputDocument> stickers, InputContentInfoCompat inputContent, int ttl, MessageObject editingMessageObject, boolean notify, int scheduleDate) { |
<<<<<<<
=======
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import androidx.core.view.NestedScrollingParent;
import androidx.core.view.NestedScrollingParentHelper;
import androidx.core.view.ViewCompat;
>>>>>>>
<<<<<<<
params.softInputMode = (useSmoothKeyboard ? WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN : WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
params.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
=======
params.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
params.flags &=~ WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
>>>>>>>
params.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
params.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; |
<<<<<<<
private final static int text_mention = 55;
=======
private final static int text_strike = 55;
private final static int text_underline = 56;
>>>>>>>
private final static int text_strike = 55;
private final static int text_underline = 56;
private final static int text_mention = 57;
<<<<<<<
AlertsCreator.showSendMediaAlert(SendMessagesHelper.getInstance(currentAccount).sendMessage(arrayList, did == 0 ? dialog_id : did), this);
=======
AlertsCreator.showSendMediaAlert(getSendMessagesHelper().sendMessage(arrayList, dialog_id), this);
>>>>>>>
AlertsCreator.showSendMediaAlert(getSendMessagesHelper().sendMessage(arrayList, did == 0 ? dialog_id : did), this);
<<<<<<<
SendMessagesHelper.getInstance(currentAccount).processForwardFromMyName(object, did == 0 ? dialog_id : did);
=======
getSendMessagesHelper().processForwardFromMyName(object, dialog_id);
>>>>>>>
getSendMessagesHelper().processForwardFromMyName(object, did == 0 ? dialog_id : did);
<<<<<<<
=======
} else if (!MessagesController.isSupportUser(currentUser) && getContactsController().contactsDict.get(currentUser.id) == null && (getContactsController().contactsDict.size() != 0 || !getContactsController().isLoadingContacts())) {
if (!TextUtils.isEmpty(currentUser.phone)) {
avatarContainer.setTitle(PhoneFormat.getInstance().format("+" + currentUser.phone));
} else {
avatarContainer.setTitle(UserObject.getUserName(currentUser), currentUser.scam);
}
>>>>>>>
<<<<<<<
menu.add(R.id.menu_groupbolditalic, R.id.menu_link, 9, LocaleController.getString("CreateLink", R.string.CreateLink));
menu.add(R.id.menu_groupbolditalic, R.id.menu_mention, 10, LocaleController.getString("CreateMention", R.string.CreateMention));
menu.add(R.id.menu_groupbolditalic, R.id.menu_regular, 11, LocaleController.getString("Regular", R.string.Regular));
=======
if (currentEncryptedChat != null && AndroidUtilities.getPeerLayerVersion(currentEncryptedChat.layer) >= 101) {
stringBuilder = new SpannableStringBuilder(LocaleController.getString("Strike", R.string.Strike));
TextStyleSpan.TextStyleRun run = new TextStyleSpan.TextStyleRun();
run.flags |= TextStyleSpan.FLAG_STYLE_STRIKE;
stringBuilder.setSpan(new TextStyleSpan(run), 0, stringBuilder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
menu.add(R.id.menu_groupbolditalic, R.id.menu_strike, 9, stringBuilder);
stringBuilder = new SpannableStringBuilder(LocaleController.getString("Underline", R.string.Underline));
run = new TextStyleSpan.TextStyleRun();
run.flags |= TextStyleSpan.FLAG_STYLE_UNDERLINE;
stringBuilder.setSpan(new TextStyleSpan(run), 0, stringBuilder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
menu.add(R.id.menu_groupbolditalic, R.id.menu_underline, 10, stringBuilder);
}
menu.add(R.id.menu_groupbolditalic, R.id.menu_link, 11, LocaleController.getString("CreateLink", R.string.CreateLink));
menu.add(R.id.menu_groupbolditalic, R.id.menu_regular, 12, LocaleController.getString("Regular", R.string.Regular));
>>>>>>>
if (currentEncryptedChat != null && AndroidUtilities.getPeerLayerVersion(currentEncryptedChat.layer) >= 101) {
stringBuilder = new SpannableStringBuilder(LocaleController.getString("Strike", R.string.Strike));
TextStyleSpan.TextStyleRun run = new TextStyleSpan.TextStyleRun();
run.flags |= TextStyleSpan.FLAG_STYLE_STRIKE;
stringBuilder.setSpan(new TextStyleSpan(run), 0, stringBuilder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
menu.add(R.id.menu_groupbolditalic, R.id.menu_strike, 9, stringBuilder);
stringBuilder = new SpannableStringBuilder(LocaleController.getString("Underline", R.string.Underline));
run = new TextStyleSpan.TextStyleRun();
run.flags |= TextStyleSpan.FLAG_STYLE_UNDERLINE;
stringBuilder.setSpan(new TextStyleSpan(run), 0, stringBuilder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
menu.add(R.id.menu_groupbolditalic, R.id.menu_underline, 10, stringBuilder);
}
menu.add(R.id.menu_groupbolditalic, R.id.menu_link, 11, LocaleController.getString("CreateLink", R.string.CreateLink));
menu.add(R.id.menu_groupbolditalic, R.id.menu_mention, 12, LocaleController.getString("CreateMention", R.string.CreateMention));
menu.add(R.id.menu_groupbolditalic, R.id.menu_regular, 13, LocaleController.getString("Regular", R.string.Regular));
<<<<<<<
forwardMessages(fmessages, noForwardQuote, did);
=======
getSendMessagesHelper().sendMessage(fmessages, did);
>>>>>>>
forwardMessages(fmessages, noForwardQuote, did); |
<<<<<<<
writeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingIcon), PorterDuff.Mode.SRC_IN));
=======
writeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingIcon), PorterDuff.Mode.MULTIPLY));
writeButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
>>>>>>>
writeButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingIcon), PorterDuff.Mode.SRC_IN));
writeButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
<<<<<<<
sendPopupLayout.addView(itemCells[a], LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * i, 0, 0));
int chatId = chat == null ? -1 : chat.id;
=======
sendPopupLayout.addView(itemCells[a], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48));
>>>>>>>
sendPopupLayout.addView(itemCells[a], LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48));
int chatId = chat == null ? -1 : chat.id; |
<<<<<<<
items.add(LocaleController.getString("Copy", R.string.Copy));
icons.add(R.drawable.baseline_content_copy_24);
=======
items.add(LocaleController.getString("CopyLink", R.string.CopyLink));
icons.add(R.drawable.msg_copy);
>>>>>>>
items.add(LocaleController.getString("CopyLink", R.string.CopyLink));
icons.add(R.drawable.baseline_content_copy_24);
<<<<<<<
items.add(LocaleController.getString("Edit", R.string.Edit));
icons.add(R.drawable.baseline_edit_24);
=======
items.add(LocaleController.getString("EditLink", R.string.EditLink));
icons.add(R.drawable.msg_edit);
>>>>>>>
items.add(LocaleController.getString("EditLink", R.string.EditLink));
icons.add(R.drawable.baseline_edit_24); |
<<<<<<<
if (SharedConfig.passcodeHash.length() > 0 && !SharedConfig.allowScreenCapture && !NekoXConfig.disableFlagSecure) {
=======
getWindow().setBackgroundDrawableResource(R.drawable.transparent);
if (SharedConfig.passcodeHash.length() > 0 && !SharedConfig.allowScreenCapture) {
>>>>>>>
getWindow().setBackgroundDrawableResource(R.drawable.transparent);
if (SharedConfig.passcodeHash.length() > 0 && !SharedConfig.allowScreenCapture && !NekoXConfig.disableFlagSecure) {
<<<<<<<
} else if (url.startsWith("tg:user") || url.startsWith("tg://user")) {
try {
url = url.replace("tg:user", "tg://telegram.org").replace("tg://user", "tg://telegram.org");
data = Uri.parse(url);
int userId = Utilities.parseInt(data.getQueryParameter("id"));
if (userId != 0) {
push_user_id = userId;
}
} catch (Exception e) {
FileLog.e(e);
}
} else if ((url.startsWith("tg:search") || url.startsWith("tg://search")) && SharedConfig.assistantSupport) {
=======
} else if ((url.startsWith("tg:search") || url.startsWith("tg://search"))) {
>>>>>>>
} else if (url.startsWith("tg:user") || url.startsWith("tg://user")) {
try {
url = url.replace("tg:user", "tg://telegram.org").replace("tg://user", "tg://telegram.org");
data = Uri.parse(url);
int userId = Utilities.parseInt(data.getQueryParameter("id"));
if (userId != 0) {
push_user_id = userId;
}
} catch (Exception e) {
FileLog.e(e);
}
} else if ((url.startsWith("tg:search") || url.startsWith("tg://search"))) { |
<<<<<<<
protected Map<String, Set<String>> customUserIdentityLinks = new HashMap<String, Set<String>>();
protected Map<String, Set<String>> customGroupIdentityLinks = new HashMap<String, Set<String>>();
=======
protected Map<String, Set<String>> customUserIdentityLinks = new HashMap<String, Set<String>>();
protected Map<String, Set<String>> customGroupIdentityLinks = new HashMap<String, Set<String>>();
protected List<CustomProperty> customProperties = new ArrayList<CustomProperty>();
>>>>>>>
protected Map<String, Set<String>> customUserIdentityLinks = new HashMap<String, Set<String>>();
protected Map<String, Set<String>> customGroupIdentityLinks = new HashMap<String, Set<String>>();
protected List<CustomProperty> customProperties = new ArrayList<CustomProperty>();
<<<<<<<
return category;
}
public void setCategory(String category) {
this.category = category;
}
public List<String> getCandidateUsers() {
=======
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getExtensionId() {
return extensionId;
}
public void setExtensionId(String extensionId) {
this.extensionId = extensionId;
}
public boolean isExtended() {
return extensionId != null && !extensionId.isEmpty();
}
public List<String> getCandidateUsers() {
>>>>>>>
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getExtensionId() {
return extensionId;
}
public void setExtensionId(String extensionId) {
this.extensionId = extensionId;
}
public boolean isExtended() {
return extensionId != null && !extensionId.isEmpty();
}
public List<String> getCandidateUsers() {
<<<<<<<
=======
public List<CustomProperty> getCustomProperties() {
return customProperties;
}
public void setCustomProperties(List<CustomProperty> customProperties) {
this.customProperties = customProperties;
}
>>>>>>>
public List<CustomProperty> getCustomProperties() {
return customProperties;
}
public void setCustomProperties(List<CustomProperty> customProperties) {
this.customProperties = customProperties;
}
<<<<<<<
=======
setExtensionId(otherElement.getExtensionId());
>>>>>>>
setExtensionId(otherElement.getExtensionId()); |
<<<<<<<
=======
import com.google.android.gms.auth.api.phone.SmsRetriever;
import com.google.android.gms.auth.api.phone.SmsRetrieverClient;
import com.google.android.gms.tasks.Task;
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
/*try {
if (BuildVars.DEBUG_VERSION) {
if (SystemClock.elapsedRealtime() - lastUpdateCheckTime < 60 * 60 * 1000) {
return;
}
lastUpdateCheckTime = SystemClock.elapsedRealtime();
Distribute.checkForUpdate();
}
} catch (Throwable e) {
FileLog.e(e);
}*/
=======
>>>>>>>
<<<<<<<
if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
return false;
}
Uri data = intent.getData();
if (data == null) return false;
String link = data.toString();
if (link.startsWith("tg://proxy") ||
link.startsWith("tg://socks") ||
link.startsWith("http://t.me/proxy?") ||
link.startsWith("http://t.me/socks?") ||
link.startsWith("https://t.me/proxy?") ||
link.startsWith("https://t.me/socks?") ||
link.startsWith(VMESS_PROTOCOL) ||
link.startsWith(VMESS1_PROTOCOL) ||
link.startsWith(SS_PROTOCOL) ||
link.startsWith(SSR_PROTOCOL) ||
link.startsWith(TROJAN_PROTOCOL)/*||
data.startsWith(RB_PROTOCOL)*/) {
return ProxyUtil.importProxy(activity, link);
=======
try {
if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
return false;
}
Uri data = intent.getData();
if (data != null) {
String user = null;
String password = null;
String port = null;
String address = null;
String secret = null;
String scheme = data.getScheme();
if (scheme != null) {
if ((scheme.equals("http") || scheme.equals("https"))) {
String host = data.getHost().toLowerCase();
if (host.equals("telegram.me") || host.equals("t.me") || host.equals("telegram.dog")) {
String path = data.getPath();
if (path != null) {
if (path.startsWith("/socks") || path.startsWith("/proxy")) {
address = data.getQueryParameter("server");
if (AndroidUtilities.checkHostForPunycode(address)) {
address = IDN.toASCII(address, IDN.ALLOW_UNASSIGNED);
}
port = data.getQueryParameter("port");
user = data.getQueryParameter("user");
password = data.getQueryParameter("pass");
secret = data.getQueryParameter("secret");
}
}
}
} else if (scheme.equals("tg")) {
String url = data.toString();
if (url.startsWith("tg:proxy") || url.startsWith("tg://proxy") || url.startsWith("tg:socks") || url.startsWith("tg://socks")) {
url = url.replace("tg:proxy", "tg://telegram.org").replace("tg://proxy", "tg://telegram.org").replace("tg://socks", "tg://telegram.org").replace("tg:socks", "tg://telegram.org");
data = Uri.parse(url);
address = data.getQueryParameter("server");
if (AndroidUtilities.checkHostForPunycode(address)) {
address = IDN.toASCII(address, IDN.ALLOW_UNASSIGNED);
}
port = data.getQueryParameter("port");
user = data.getQueryParameter("user");
password = data.getQueryParameter("pass");
secret = data.getQueryParameter("secret");
}
}
}
if (!TextUtils.isEmpty(address) && !TextUtils.isEmpty(port)) {
if (user == null) {
user = "";
}
if (password == null) {
password = "";
}
if (secret == null) {
secret = "";
}
showProxyAlert(activity, address, port, user, password, secret);
return true;
}
}
} catch (Exception ignore) {
>>>>>>>
if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
return false;
}
Uri data = intent.getData();
if (data == null) return false;
String link = data.toString();
if (link.startsWith("tg://proxy") ||
link.startsWith("tg://socks") ||
link.startsWith("http://t.me/proxy?") ||
link.startsWith("http://t.me/socks?") ||
link.startsWith("https://t.me/proxy?") ||
link.startsWith("https://t.me/socks?") ||
link.startsWith(VMESS_PROTOCOL) ||
link.startsWith(VMESS1_PROTOCOL) ||
link.startsWith(SS_PROTOCOL) ||
link.startsWith(SSR_PROTOCOL) ||
link.startsWith(TROJAN_PROTOCOL)/*||
data.startsWith(RB_PROTOCOL)*/) {
return ProxyUtil.importProxy(activity, link); |
<<<<<<<
public String emoticon;
=======
public boolean includesDialog(AccountInstance accountInstance, int lowerId) {
MessagesController messagesController = accountInstance.getMessagesController();
TLRPC.Dialog dialog = messagesController.dialogs_dict.get(lowerId);
if (dialog == null) {
return false;
}
return includesDialog(accountInstance, lowerId, dialog);
}
public boolean includesDialog(AccountInstance accountInstance, int lowerId, TLRPC.Dialog d) {
if (alwaysShow.contains(lowerId)) {
return true;
}
if (d.folder_id != 0 && (flags & DIALOG_FILTER_FLAG_EXCLUDE_ARCHIVED) != 0) {
return false;
}
MessagesController messagesController = accountInstance.getMessagesController();
ContactsController contactsController = accountInstance.getContactsController();
boolean skip = false;
if ((flags & DIALOG_FILTER_FLAG_EXCLUDE_MUTED) != 0 && messagesController.isDialogMuted(d.id) && d.unread_mentions_count == 0 ||
(flags & DIALOG_FILTER_FLAG_EXCLUDE_READ) != 0 && d.unread_count == 0 && !d.unread_mark && d.unread_mentions_count == 0 ||
neverShow.contains(lowerId)) {
return false;
}
if (lowerId > 0) {
TLRPC.User user = messagesController.getUser(lowerId);
if (user != null) {
if (!user.bot) {
if (user.self || user.contact || contactsController.isContact(lowerId)) {
if ((flags & DIALOG_FILTER_FLAG_CONTACTS) != 0) {
return true;
}
} else {
if ((flags & DIALOG_FILTER_FLAG_NON_CONTACTS) != 0) {
return true;
}
}
} else {
if ((flags & DIALOG_FILTER_FLAG_BOTS) != 0) {
return true;
}
}
}
} else if (lowerId < 0) {
TLRPC.Chat chat = messagesController.getChat(-lowerId);
if (chat != null) {
if (ChatObject.isChannel(chat) && !chat.megagroup) {
if ((flags & DIALOG_FILTER_FLAG_CHANNELS) != 0) {
return true;
}
} else {
if ((flags & DIALOG_FILTER_FLAG_GROUPS) != 0) {
return true;
}
}
}
}
return false;
}
>>>>>>>
public String emoticon;
public boolean includesDialog(AccountInstance accountInstance, int lowerId) {
MessagesController messagesController = accountInstance.getMessagesController();
TLRPC.Dialog dialog = messagesController.dialogs_dict.get(lowerId);
if (dialog == null) {
return false;
}
return includesDialog(accountInstance, lowerId, dialog);
}
public boolean includesDialog(AccountInstance accountInstance, int lowerId, TLRPC.Dialog d) {
if (alwaysShow.contains(lowerId)) {
return true;
}
if (d.folder_id != 0 && (flags & DIALOG_FILTER_FLAG_EXCLUDE_ARCHIVED) != 0) {
return false;
}
MessagesController messagesController = accountInstance.getMessagesController();
ContactsController contactsController = accountInstance.getContactsController();
boolean skip = false;
if ((flags & DIALOG_FILTER_FLAG_EXCLUDE_MUTED) != 0 && messagesController.isDialogMuted(d.id) && d.unread_mentions_count == 0 ||
(flags & DIALOG_FILTER_FLAG_EXCLUDE_READ) != 0 && d.unread_count == 0 && !d.unread_mark && d.unread_mentions_count == 0 ||
neverShow.contains(lowerId)) {
return false;
}
if (lowerId > 0) {
TLRPC.User user = messagesController.getUser(lowerId);
if (user != null) {
if (!user.bot) {
if (user.self || user.contact || contactsController.isContact(lowerId)) {
if ((flags & DIALOG_FILTER_FLAG_CONTACTS) != 0) {
return true;
}
} else {
if ((flags & DIALOG_FILTER_FLAG_NON_CONTACTS) != 0) {
return true;
}
}
} else {
if ((flags & DIALOG_FILTER_FLAG_BOTS) != 0) {
return true;
}
}
}
} else if (lowerId < 0) {
TLRPC.Chat chat = messagesController.getChat(-lowerId);
if (chat != null) {
if (ChatObject.isChannel(chat) && !chat.megagroup) {
if ((flags & DIALOG_FILTER_FLAG_CHANNELS) != 0) {
return true;
}
} else {
if ((flags & DIALOG_FILTER_FLAG_GROUPS) != 0) {
return true;
}
}
}
}
return false;
} |
<<<<<<<
=======
import org.telegram.ui.Components.CombinedDrawable;
import org.telegram.ui.Components.EditTextEmoji;
import org.telegram.ui.Components.VerticalPositionAutoAnimator;
import org.telegram.ui.Components.ImageUpdater;
>>>>>>> |
<<<<<<<
if (secret) {
cell[0].setText(LocaleController.formatString("DeleteForUser", R.string.DeleteForUser, UserObject.getFirstName(user)), "", deleteForAll[0], false);
} else if (deleteChatForAll) {
deleteForAll[0] = false;
=======
if (deleteChatForAll) {
>>>>>>>
if (deleteChatForAll) {
<<<<<<<
BottomBuilder builder = new BottomBuilder(context);
builder.addTitle(LocaleController.getString("ReportChat", R.string.ReportChat), true);
String[] items;
=======
BottomSheet.Builder builder = new BottomSheet.Builder(context);
builder.setTitle(LocaleController.getString("ReportChat", R.string.ReportChat), true);
CharSequence[] items;
int[] icons;
>>>>>>>
BottomBuilder builder = new BottomBuilder(context);
builder.addTitle(LocaleController.getString("ReportChat", R.string.ReportChat), true);
String[] items;
int[] icons;
<<<<<<<
builder.addItems(items, null, (i, text, cell) -> {
if (i == 4) {
Bundle args = new Bundle();
args.putLong("dialog_id", dialog_id);
args.putLong("message_id", messageId);
parentFragment.presentFragment(new ReportOtherActivity(args));
return Unit.INSTANCE;
}
TLObject req;
TLRPC.InputPeer peer = MessagesController.getInstance(UserConfig.selectedAccount).getInputPeer((int) dialog_id);
if (messageId != 0) {
TLRPC.TL_messages_report request = new TLRPC.TL_messages_report();
request.peer = peer;
request.id.add(messageId);
if (i == 0) {
request.reason = new TLRPC.TL_inputReportReasonSpam();
} else if (i == 1) {
request.reason = new TLRPC.TL_inputReportReasonViolence();
} else if (i == 2) {
request.reason = new TLRPC.TL_inputReportReasonChildAbuse();
} else if (i == 3) {
request.reason = new TLRPC.TL_inputReportReasonPornography();
=======
builder.setItems(items, icons, (dialogInterface, i) -> {
if (messageId == 0 && (i == 0 || i == 2 || i == 3 || i == 4) && parentFragment instanceof ChatActivity) {
((ChatActivity) parentFragment).openReportChat(i);
return;
} else if (messageId == 0 && (i == 5 || i == 1) || messageId != 0 && i == 4) {
parentFragment.showDialog(new ReportAlert(context, i == 4 ? 5 : i) {
@Override
protected void onSend(int type, String message) {
ArrayList<Integer> ids = new ArrayList<>();
if (messageId != 0) {
ids.add(messageId);
>>>>>>>
builder.addItems(items, null, (i, text, cell) -> {
if (messageId == 0 && (i == 0 || i == 2 || i == 3 || i == 4) && parentFragment instanceof ChatActivity) {
((ChatActivity) parentFragment).openReportChat(i);
return Unit.INSTANCE;
} else if (messageId == 0 && (i == 5 || i == 1) || messageId != 0 && i == 4) {
parentFragment.showDialog(new ReportAlert(context, i == 4 ? 5 : i) {
@Override
protected void onSend(int type, String message) {
ArrayList<Integer> ids = new ArrayList<>();
if (messageId != 0) {
ids.add(messageId);
<<<<<<<
ConnectionsManager.getInstance(UserConfig.selectedAccount).sendRequest(req, (response, error) -> AlertUtil.showToast(error));
Toast.makeText(context, LocaleController.getString("ReportChatSent", R.string.ReportChatSent), Toast.LENGTH_SHORT).show();
return Unit.INSTANCE;
=======
});
return;
}
TLObject req;
TLRPC.InputPeer peer = MessagesController.getInstance(UserConfig.selectedAccount).getInputPeer((int) dialog_id);
if (messageId != 0) {
TLRPC.TL_messages_report request = new TLRPC.TL_messages_report();
request.peer = peer;
request.id.add(messageId);
request.message = "";
if (i == 0) {
request.reason = new TLRPC.TL_inputReportReasonSpam();
} else if (i == 1) {
request.reason = new TLRPC.TL_inputReportReasonViolence();
} else if (i == 2) {
request.reason = new TLRPC.TL_inputReportReasonChildAbuse();
} else if (i == 3) {
request.reason = new TLRPC.TL_inputReportReasonPornography();
>>>>>>>
});
return Unit.INSTANCE;
}
TLObject req;
TLRPC.InputPeer peer = MessagesController.getInstance(UserConfig.selectedAccount).getInputPeer((int) dialog_id);
if (messageId != 0) {
TLRPC.TL_messages_report request = new TLRPC.TL_messages_report();
request.peer = peer;
request.id.add(messageId);
request.message = "";
if (i == 0) {
request.reason = new TLRPC.TL_inputReportReasonSpam();
} else if (i == 1) {
request.reason = new TLRPC.TL_inputReportReasonViolence();
} else if (i == 2) {
request.reason = new TLRPC.TL_inputReportReasonChildAbuse();
} else if (i == 3) {
request.reason = new TLRPC.TL_inputReportReasonPornography(); |
<<<<<<<
=======
import android.os.Vibrator;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSmoothScrollerCustom;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager;
>>>>>>>
import android.os.Vibrator;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSmoothScrollerCustom;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager;
<<<<<<<
private int lastMeasuredTopPadding;
=======
private int lastMeasuredTopPadding;
>>>>>>>
private int lastMeasuredTopPadding;
<<<<<<<
if ((initialDialogsType == 3 && NekoConfig.showTabsOnForward) || !onlySelect) {
=======
if (!onlySelect) {
if (filterTabsView != null && filterTabsView.getVisibility() == VISIBLE) {
t = AndroidUtilities.dp(44);
} else {
t = actionBar.getMeasuredHeight();
}
}
int pos = parentPage.layoutManager.findFirstVisibleItemPosition();
if (pos != RecyclerView.NO_POSITION) {
RecyclerView.ViewHolder holder = parentPage.listView.findViewHolderForAdapterPosition(pos);
if (holder != null) {
int top = holder.itemView.getTop();
ignoreLayout = true;
parentPage.layoutManager.scrollToPositionWithOffset(pos, (int) (top - lastListPadding + scrollAdditionalOffset));
ignoreLayout = false;
}
}
if (!onlySelect) {
>>>>>>>
if ((initialDialogsType == 3 && NekoConfig.showTabsOnForward) || !onlySelect) {
if (filterTabsView != null && filterTabsView.getVisibility() == VISIBLE) {
t = AndroidUtilities.dp(44);
} else {
t = actionBar.getMeasuredHeight();
}
}
int pos = parentPage.layoutManager.findFirstVisibleItemPosition();
if (pos != RecyclerView.NO_POSITION) {
RecyclerView.ViewHolder holder = parentPage.listView.findViewHolderForAdapterPosition(pos);
if (holder != null) {
int top = holder.itemView.getTop();
ignoreLayout = true;
parentPage.layoutManager.scrollToPositionWithOffset(pos, (int) (top - lastListPadding + scrollAdditionalOffset));
ignoreLayout = false;
}
}
if (!onlySelect) {
<<<<<<<
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.SRC_IN));
floatingButton.setImageResource(R.drawable.floating_pencil);
=======
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.MULTIPLY));
floatingButton.setAnimation(R.raw.write_contacts_fab_icon, 52, 52);
>>>>>>>
floatingButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chats_actionIcon), PorterDuff.Mode.SRC_IN));
floatingButton.setAnimation(R.raw.write_contacts_fab_icon, 52, 52);
<<<<<<<
if (!NekoConfig.hideAllTab)
filterTabsView.addTab(Integer.MAX_VALUE, LocaleController.getString("FilterAllChats", R.string.FilterAllChats));
=======
filterTabsView.addTab(Integer.MAX_VALUE, 0, LocaleController.getString("FilterAllChats", R.string.FilterAllChats));
>>>>>>>
if (!NekoConfig.hideAllTab)
filterTabsView.addTab(Integer.MAX_VALUE, 0, LocaleController.getString("FilterAllChats", R.string.FilterAllChats));
<<<<<<<
MessagesController.DialogFilter dialogFilter = filters.get(a);
switch (NekoConfig.tabsTitleType) {
case NekoConfig.TITLE_TYPE_TEXT:
filterTabsView.addTab(a, dialogFilter.name);
break;
case NekoConfig.TITLE_TYPE_ICON:
filterTabsView.addTab(a, dialogFilter.emoticon != null ? dialogFilter.emoticon : "📂");
break;
case NekoConfig.TITLE_TYPE_MIX:
filterTabsView.addTab(a, dialogFilter.emoticon != null ? dialogFilter.emoticon + " " + dialogFilter.name : "📂 " + dialogFilter.name);
break;
}
=======
filterTabsView.addTab(a, filters.get(a).localId, filters.get(a).name);
>>>>>>>
MessagesController.DialogFilter dialogFilter = filters.get(a);
switch (NekoConfig.tabsTitleType) {
case NekoConfig.TITLE_TYPE_TEXT:
filterTabsView.addTab(a, filters.get(a).localId, dialogFilter.name);
break;
case NekoConfig.TITLE_TYPE_ICON:
filterTabsView.addTab(a, filters.get(a).localId, dialogFilter.emoticon != null ? dialogFilter.emoticon : "📂");
break;
case NekoConfig.TITLE_TYPE_MIX:
filterTabsView.addTab(a, filters.get(a).localId, dialogFilter.emoticon != null ? dialogFilter.emoticon + " " + dialogFilter.name : "📂 " + dialogFilter.name);
break;
} |
<<<<<<<
Drawable drawable = Theme.createCircleDrawable(AndroidUtilities.dp(16), Theme.getColor(Theme.key_chat_messagePanelSend));
Drawable checkDrawable = context.getResources().getDrawable(R.drawable.input_done).mutate();
checkDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_messagePanelVoicePressed), PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(drawable, checkDrawable, 0, AndroidUtilities.dp(1));
=======
Drawable doneCircleDrawable = Theme.createCircleDrawable(AndroidUtilities.dp(16), Theme.getColor(Theme.key_chat_messagePanelSend));
doneCheckDrawable = context.getResources().getDrawable(R.drawable.input_done).mutate();
doneCheckDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_messagePanelVoicePressed), PorterDuff.Mode.MULTIPLY));
CombinedDrawable combinedDrawable = new CombinedDrawable(doneCircleDrawable, doneCheckDrawable, 0, AndroidUtilities.dp(1));
>>>>>>>
Drawable doneCircleDrawable = Theme.createCircleDrawable(AndroidUtilities.dp(16), Theme.getColor(Theme.key_chat_messagePanelSend));
doneCheckDrawable = context.getResources().getDrawable(R.drawable.input_done).mutate();
doneCheckDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_messagePanelVoicePressed), PorterDuff.Mode.SRC_IN));
CombinedDrawable combinedDrawable = new CombinedDrawable(doneCircleDrawable, doneCheckDrawable, 0, AndroidUtilities.dp(1));
<<<<<<<
int chatId;
if (chat != null) {
chatId = chat.id;
} else if (user != null) {
chatId = user.id;
} else {
chatId = -1;
}
int a = 0;
ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext());
if (parentFragment.canScheduleMessage()) {
cell = new ActionBarMenuSubItem(getContext());
if (UserObject.isUserSelf(user)) {
cell.setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.baseline_date_range_24);
=======
for (int a = 0; a < 2; a++) {
if (a == 0 && !parentFragment.canScheduleMessage() || a == 1 && (UserObject.isUserSelf(user) || slowModeTimer > 0 && !isInScheduleMode())) {
continue;
}
int num = a;
ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext(), a == 0, a == 1);
if (num == 0) {
if (UserObject.isUserSelf(user)) {
cell.setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.msg_schedule);
} else {
cell.setTextAndIcon(LocaleController.getString("ScheduleMessage", R.string.ScheduleMessage), R.drawable.msg_schedule);
}
>>>>>>>
int chatId;
if (chat != null) {
chatId = chat.id;
} else if (user != null) {
chatId = user.id;
} else {
chatId = -1;
}
int a = 0;
ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext(), a == 0, a == 1);
if (parentFragment.canScheduleMessage()) {
cell = new ActionBarMenuSubItem(getContext(), true, UserObject.isUserSelf(user) || slowModeTimer == 0 || isInScheduleMode());
if (UserObject.isUserSelf(user)) {
cell.setTextAndIcon(LocaleController.getString("SetReminder", R.string.SetReminder), R.drawable.baseline_date_range_24);
<<<<<<<
doneButtonContainer.setVisibility(View.GONE);
messageEditText.setFilters(new InputFilter[0]);
=======
currentLimit = -1;
>>>>>>>
doneButtonContainer.setVisibility(View.GONE);
currentLimit = -1; |
<<<<<<<
File file = new File(EnvUtil.getTelegramPath(), "caches");
FileUtil.initDir(file);
return file;
} catch (Throwable e) {
=======
state = Environment.getExternalStorageState();
} catch (Exception e) {
FileLog.e(e);
}
if (state == null || state.startsWith(Environment.MEDIA_MOUNTED)) {
try {
File file;
if (Build.VERSION.SDK_INT >= 19) {
File[] dirs = ApplicationLoader.applicationContext.getExternalCacheDirs();
file = dirs[0];
if (!TextUtils.isEmpty(SharedConfig.storageCacheDir)) {
for (int a = 0; a < dirs.length; a++) {
if (dirs[a] != null && dirs[a].getAbsolutePath().startsWith(SharedConfig.storageCacheDir)) {
file = dirs[a];
break;
}
}
}
} else {
file = ApplicationLoader.applicationContext.getExternalCacheDir();
}
if (file != null) {
return file;
}
} catch (Exception e) {
FileLog.e(e);
}
}
try {
File file = ApplicationLoader.applicationContext.getCacheDir();
if (file != null) {
return file;
}
} catch (Exception e) {
>>>>>>>
File file;
if (Build.VERSION.SDK_INT >= 19) {
File[] dirs = ApplicationLoader.applicationContext.getExternalCacheDirs();
file = dirs[0];
if (!TextUtils.isEmpty(SharedConfig.storageCacheDir)) {
for (int a = 0; a < dirs.length; a++) {
if (dirs[a] != null && dirs[a].getAbsolutePath().startsWith(SharedConfig.storageCacheDir)) {
file = dirs[a];
break;
}
}
}
} else {
file = new File(EnvUtil.getTelegramPath(), "caches");
}
FileUtil.initDir(file);
return file;
} catch (Throwable e) { |
<<<<<<<
import tw.nekomimi.nekogram.NekoConfig;
public class ContextLinkCell extends View implements DownloadController.FileDownloadProgressListener {
=======
public class ContextLinkCell extends FrameLayout implements DownloadController.FileDownloadProgressListener {
>>>>>>>
import tw.nekomimi.nekogram.NekoConfig;
public class ContextLinkCell extends FrameLayout implements DownloadController.FileDownloadProgressListener { |
<<<<<<<
archiveItem.setTextAndIcon(LocaleController.getString("Unarchive", R.string.Unarchive), R.drawable.baseline_unarchive_24);
archive2Item.setIcon(R.drawable.baseline_unarchive_24);
=======
final String contentDescription = LocaleController.getString("Unarchive", R.string.Unarchive);
archiveItem.setTextAndIcon(contentDescription, R.drawable.msg_unarchive);
archive2Item.setIcon(R.drawable.msg_unarchive);
archive2Item.setContentDescription(contentDescription);
>>>>>>>
final String contentDescription = LocaleController.getString("Unarchive", R.string.Unarchive);
archiveItem.setTextAndIcon(contentDescription, R.drawable.baseline_unarchive_24);
archive2Item.setIcon(R.drawable.baseline_unarchive_24);
archive2Item.setContentDescription(contentDescription);
<<<<<<<
archiveItem.setTextAndIcon(LocaleController.getString("Archive", R.string.Archive), R.drawable.baseline_archive_24);
archive2Item.setIcon(R.drawable.baseline_archive_24);
=======
final String contentDescription = LocaleController.getString("Archive", R.string.Archive);
archiveItem.setTextAndIcon(contentDescription, R.drawable.msg_archive);
archive2Item.setIcon(R.drawable.msg_archive);
archive2Item.setContentDescription(contentDescription);
>>>>>>>
final String contentDescription = LocaleController.getString("Archive", R.string.Archive);
archiveItem.setTextAndIcon(contentDescription, R.drawable.baseline_archive_24);
archive2Item.setIcon(R.drawable.baseline_archive_24);
archive2Item.setContentDescription(contentDescription); |
<<<<<<<
=======
import org.telegram.ui.BubbleActivity;
import org.telegram.ui.Components.Paint.PhotoFace;
import org.telegram.ui.Components.Paint.Views.EntitiesContainerView;
import org.telegram.ui.Components.Paint.Views.EntityView;
import org.telegram.ui.Components.Paint.Views.StickerView;
import org.telegram.ui.Components.Paint.Views.TextPaintView;
import org.telegram.ui.Components.Paint.UndoStore;
>>>>>>>
import org.telegram.ui.BubbleActivity;
<<<<<<<
if (selected) {
ImageView check = new ImageView(getContext());
check.setImageResource(R.drawable.ic_ab_done);
check.setScaleType(ImageView.ScaleType.CENTER);
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_dialogFloatingButton), PorterDuff.Mode.SRC_IN));
button.addView(check, LayoutHelper.createFrame(50, LayoutHelper.MATCH_PARENT));
}
=======
TextView textView = new TextView(getContext());
textView.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem));
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
textView.setText(text);
textView.setMinWidth(AndroidUtilities.dp(70));
button.addView(textView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.CENTER_VERTICAL, 0, 0, 16, 0));
ImageView check = new ImageView(getContext());
check.setImageResource(R.drawable.msg_text_check);
check.setScaleType(ImageView.ScaleType.CENTER);
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_radioBackgroundChecked), PorterDuff.Mode.MULTIPLY));
check.setVisibility(selected ? VISIBLE : INVISIBLE);
button.addView(check, LayoutHelper.createLinear(50, LayoutHelper.MATCH_PARENT));
>>>>>>>
TextView textView = new TextView(getContext());
textView.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem));
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
textView.setText(text);
textView.setMinWidth(AndroidUtilities.dp(70));
button.addView(textView, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.CENTER_VERTICAL, 0, 0, 16, 0));
ImageView check = new ImageView(getContext());
check.setImageResource(R.drawable.msg_text_check);
check.setScaleType(ImageView.ScaleType.CENTER);
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_radioBackgroundChecked), PorterDuff.Mode.SRC_IN));
check.setVisibility(selected ? VISIBLE : INVISIBLE);
button.addView(check, LayoutHelper.createLinear(50, LayoutHelper.MATCH_PARENT));
<<<<<<<
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_radioBackgroundChecked), PorterDuff.Mode.SRC_IN));
button.addView(check, LayoutHelper.createFrame(50, LayoutHelper.MATCH_PARENT));
=======
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_radioBackgroundChecked), PorterDuff.Mode.MULTIPLY));
button.addView(check, LayoutHelper.createLinear(50, LayoutHelper.MATCH_PARENT));
>>>>>>>
check.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_radioBackgroundChecked), PorterDuff.Mode.SRC_IN));
button.addView(check, LayoutHelper.createLinear(50, LayoutHelper.MATCH_PARENT));
<<<<<<<
StickerPosition defaultPosition = new StickerPosition(centerPositionForEntity(), 0.75f, 0.0f);
/*
=======
float rotation;
float baseScale;
if (currentCropState != null) {
rotation = -(currentCropState.transformRotation + currentCropState.cropRotate);
baseScale = 0.75f / currentCropState.cropScale;
} else {
rotation = 0.0f;
baseScale = 0.75f;
}
StickerPosition defaultPosition = new StickerPosition(centerPositionForEntity(), baseScale, rotation);
>>>>>>>
float rotation;
float baseScale;
if (currentCropState != null) {
rotation = -(currentCropState.transformRotation + currentCropState.cropRotate);
baseScale = 0.75f / currentCropState.cropScale;
} else {
rotation = 0.0f;
baseScale = 0.75f;
}
StickerPosition defaultPosition = new StickerPosition(centerPositionForEntity(), baseScale, rotation);
/* |
<<<<<<<
delegate.sendSticker(currentDocument, parentObject, actions.get(which) == 0, 0);
=======
delegate.sendSticker(currentDocument, currentQuery, parentObject, true, 0);
>>>>>>>
delegate.sendSticker(currentDocument, currentQuery, parentObject, actions.get(which) == 0, 0); |
<<<<<<<
int providers = 5; // MessagesController.getInstance(currentAccount).availableMapProviders;
=======
ArrayList<Integer> types = new ArrayList<>();
int providers = MessagesController.getInstance(currentAccount).availableMapProviders;
>>>>>>>
ArrayList<Integer> types = new ArrayList<>();
int providers = 5; // MessagesController.getInstance(currentAccount).availableMapProviders; |
<<<<<<<
public CheckItem getItem(int position) {
position -= 2;
if (accountsShown) {
position -= getAccountRowsCount();
}
if (position < 0 || position >= items.size()) {
return null;
}
Item item = items.get(position);
return item instanceof CheckItem ? (CheckItem) item : null;
}
public class Item {
=======
private static class Item {
>>>>>>>
public CheckItem getItem(int position) {
position -= 2;
if (accountsShown) {
position -= getAccountRowsCount();
}
if (position < 0 || position >= items.size()) {
return null;
}
Item item = items.get(position);
return item instanceof CheckItem ? (CheckItem) item : null;
}
private static class Item { |
<<<<<<<
if (executorService != null) {
executorService.execute(new ExecuteAsyncRunnable(job, commandExecutor));
=======
if (isActive) {
threadPoolExecutor.execute(new ExecuteAsyncRunnable(job, commandExecutor));
>>>>>>>
if (isActive) {
executorService.execute(new ExecuteAsyncRunnable(job, commandExecutor)); |
<<<<<<<
boolean transChanged = false;
if (lastTranslated != messageObject.messageOwner.translated) {
lastTranslated = messageObject.messageOwner.translated;
transChanged = true;
}
if (messageChanged || dataChanged || groupChanged || pollChanged || isPhotoDataChanged(messageObject) || pinnedBottom != bottomNear || pinnedTop != topNear || transChanged) {
=======
if (messageChanged || dataChanged || groupChanged || pollChanged || isPhotoDataChanged(messageObject) || pinnedBottom != bottomNear || pinnedTop != topNear) {
wasPinned = isPinned;
>>>>>>>
boolean transChanged = false;
if (lastTranslated != messageObject.messageOwner.translated) {
lastTranslated = messageObject.messageOwner.translated;
transChanged = true;
}
if (messageChanged || dataChanged || groupChanged || pollChanged || isPhotoDataChanged(messageObject) || pinnedBottom != bottomNear || pinnedTop != topNear || transChanged) {
wasPinned = isPinned;
<<<<<<<
currentUrl = AndroidUtilities.formapMapUrl(isSecretChat, lat, lon, (int) (photoWidth / AndroidUtilities.density), (int) (photoHeight / AndroidUtilities.density), false, 15);
=======
currentUrl = AndroidUtilities.formapMapUrl(currentAccount, lat, lon, (int) (photoWidth / AndroidUtilities.density), (int) (photoHeight / AndroidUtilities.density), false, 15, provider);
lastWebFile = currentWebFile;
>>>>>>>
currentUrl = AndroidUtilities.formapMapUrl(isSecretChat, lat, lon, (int) (photoWidth / AndroidUtilities.density), (int) (photoHeight / AndroidUtilities.density), false, 15);
lastWebFile = currentWebFile; |
<<<<<<<
public static void startCall(TLRPC.User user, final Activity activity, TLRPC.UserFull userFull) {
startCall(user, activity, userFull, false);
}
public static void startCall(TLRPC.User user, final Activity activity, TLRPC.UserFull userFull, boolean confirmed) {
=======
public static void startCall(TLRPC.User user, boolean videoCall, boolean canVideoCall, final Activity activity, TLRPC.UserFull userFull) {
>>>>>>>
public static void startCall(TLRPC.User user, boolean videoCall, boolean canVideoCall, final Activity activity, TLRPC.UserFull userFull) {
startCall(user, videoCall, canVideoCall, activity, userFull, false);
}
public static void startCall(TLRPC.User user, boolean videoCall, boolean canVideoCall, final Activity activity, TLRPC.UserFull userFull, boolean confirmed) {
<<<<<<<
if (!confirmed && NekoConfig.askBeforeCall) {
new AlertDialog.Builder(activity)
.setTitle(LocaleController.getString("ConfirmCall", R.string.ConfirmCall))
.setMessage(AndroidUtilities.replaceTags(LocaleController.formatString("CallTo", R.string.CallTo,
ContactsController.formatName(user.first_name, user.last_name))))
.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialog, which) -> startCall(user, activity, userFull, true))
.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null)
.show();
return;
}
initiateCall(user, activity);
=======
initiateCall(user, videoCall, canVideoCall, activity);
>>>>>>>
if (!confirmed && NekoConfig.askBeforeCall) {
new AlertDialog.Builder(activity)
.setTitle(LocaleController.getString("ConfirmCall", R.string.ConfirmCall))
.setMessage(AndroidUtilities.replaceTags(LocaleController.formatString("CallTo", R.string.CallTo,
ContactsController.formatName(user.first_name, user.last_name))))
.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialog, which) -> startCall(user, videoCall, canVideoCall, activity, userFull, true))
.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null)
.show();
return;
}
initiateCall(user, videoCall, canVideoCall, activity); |
<<<<<<<
int side = NekoConfig.disablePhotoSideAction ? 0 : containerView.getMeasuredWidth() / 6;
=======
int side = Math.min(135, containerView.getMeasuredWidth() / 8);
>>>>>>>
int side = NekoConfig.disablePhotoSideAction ? 0 : Math.min(135, containerView.getMeasuredWidth() / 8);
<<<<<<<
int side = NekoConfig.disablePhotoSideAction ? 0 : containerView.getMeasuredWidth() / 6;
=======
int side = Math.min(135, containerView.getMeasuredWidth() / 8);
>>>>>>>
int side = NekoConfig.disablePhotoSideAction ? 0 : Math.min(135, containerView.getMeasuredWidth() / 8);
<<<<<<<
int side = NekoConfig.disablePhotoSideAction ? 0 : containerView.getMeasuredWidth() / 6;
=======
int side = Math.min(135, containerView.getMeasuredWidth() / 8);
>>>>>>>
int side = NekoConfig.disablePhotoSideAction ? 0 : Math.min(135, containerView.getMeasuredWidth() / 8); |
<<<<<<<
import tw.nekomimi.nekogram.utils.EnvUtil;
public class VoIPController{
public static final int NET_TYPE_UNKNOWN=0;
public static final int NET_TYPE_GPRS=1;
public static final int NET_TYPE_EDGE=2;
public static final int NET_TYPE_3G=3;
public static final int NET_TYPE_HSPA=4;
public static final int NET_TYPE_LTE=5;
public static final int NET_TYPE_WIFI=6;
public static final int NET_TYPE_ETHERNET=7;
public static final int NET_TYPE_OTHER_HIGH_SPEED=8;
public static final int NET_TYPE_OTHER_LOW_SPEED=9;
public static final int NET_TYPE_DIALUP=10;
public static final int NET_TYPE_OTHER_MOBILE=11;
public static final int STATE_WAIT_INIT=1;
public static final int STATE_WAIT_INIT_ACK=2;
public static final int STATE_ESTABLISHED=3;
public static final int STATE_FAILED=4;
public static final int STATE_RECONNECTING=5;
public static final int DATA_SAVING_NEVER=0;
public static final int DATA_SAVING_MOBILE=1;
public static final int DATA_SAVING_ALWAYS=2;
public static final int DATA_SAVING_ROAMING=3;
public static final int ERROR_CONNECTION_SERVICE=-5;
public static final int ERROR_INSECURE_UPGRADE=-4;
public static final int ERROR_LOCALIZED=-3;
public static final int ERROR_PRIVACY=-2;
public static final int ERROR_PEER_OUTDATED=-1;
public static final int ERROR_UNKNOWN=0;
public static final int ERROR_INCOMPATIBLE=1;
public static final int ERROR_TIMEOUT=2;
public static final int ERROR_AUDIO_IO=3;
public static final int PEER_CAP_GROUP_CALLS=1;
protected long nativeInst=0;
=======
public class VoIPController {
public static final int NET_TYPE_UNKNOWN = 0;
public static final int NET_TYPE_GPRS = 1;
public static final int NET_TYPE_EDGE = 2;
public static final int NET_TYPE_3G = 3;
public static final int NET_TYPE_HSPA = 4;
public static final int NET_TYPE_LTE = 5;
public static final int NET_TYPE_WIFI = 6;
public static final int NET_TYPE_ETHERNET = 7;
public static final int NET_TYPE_OTHER_HIGH_SPEED = 8;
public static final int NET_TYPE_OTHER_LOW_SPEED = 9;
public static final int NET_TYPE_DIALUP = 10;
public static final int NET_TYPE_OTHER_MOBILE = 11;
public static final int STATE_WAIT_INIT = 1;
public static final int STATE_WAIT_INIT_ACK = 2;
public static final int STATE_ESTABLISHED = 3;
public static final int STATE_FAILED = 4;
public static final int STATE_RECONNECTING = 5;
public static final int DATA_SAVING_NEVER = 0;
public static final int DATA_SAVING_MOBILE = 1;
public static final int DATA_SAVING_ALWAYS = 2;
public static final int DATA_SAVING_ROAMING = 3;
public static final int ERROR_CONNECTION_SERVICE = -5;
public static final int ERROR_INSECURE_UPGRADE = -4;
public static final int ERROR_LOCALIZED = -3;
public static final int ERROR_PRIVACY = -2;
public static final int ERROR_PEER_OUTDATED = -1;
public static final int ERROR_UNKNOWN = 0;
public static final int ERROR_INCOMPATIBLE = 1;
public static final int ERROR_TIMEOUT = 2;
public static final int ERROR_AUDIO_IO = 3;
protected long nativeInst;
>>>>>>>
import tw.nekomimi.nekogram.utils.EnvUtil;
public class VoIPController {
public static final int NET_TYPE_UNKNOWN = 0;
public static final int NET_TYPE_GPRS = 1;
public static final int NET_TYPE_EDGE = 2;
public static final int NET_TYPE_3G = 3;
public static final int NET_TYPE_HSPA = 4;
public static final int NET_TYPE_LTE = 5;
public static final int NET_TYPE_WIFI = 6;
public static final int NET_TYPE_ETHERNET = 7;
public static final int NET_TYPE_OTHER_HIGH_SPEED = 8;
public static final int NET_TYPE_OTHER_LOW_SPEED = 9;
public static final int NET_TYPE_DIALUP = 10;
public static final int NET_TYPE_OTHER_MOBILE = 11;
public static final int STATE_WAIT_INIT = 1;
public static final int STATE_WAIT_INIT_ACK = 2;
public static final int STATE_ESTABLISHED = 3;
public static final int STATE_FAILED = 4;
public static final int STATE_RECONNECTING = 5;
public static final int DATA_SAVING_NEVER = 0;
public static final int DATA_SAVING_MOBILE = 1;
public static final int DATA_SAVING_ALWAYS = 2;
public static final int DATA_SAVING_ROAMING = 3;
public static final int ERROR_CONNECTION_SERVICE = -5;
public static final int ERROR_INSECURE_UPGRADE = -4;
public static final int ERROR_LOCALIZED = -3;
public static final int ERROR_PRIVACY = -2;
public static final int ERROR_PEER_OUTDATED = -1;
public static final int ERROR_UNKNOWN = 0;
public static final int ERROR_INCOMPATIBLE = 1;
public static final int ERROR_TIMEOUT = 2;
public static final int ERROR_AUDIO_IO = 3;
protected long nativeInst; |
<<<<<<<
} else if (open_settings == 100) {
fragment = new NekoSettingsActivity();
=======
} else if (open_settings == 6) {
fragment = new EditWidgetActivity(open_widget_edit_type, open_widget_edit, true);
>>>>>>>
} else if (open_settings == 6) {
fragment = new EditWidgetActivity(open_widget_edit_type, open_widget_edit, true);
} else if (open_settings == 100) {
fragment = new NekoSettingsActivity();
<<<<<<<
NotificationCenter.getGlobalInstance().removeObserver(drawerLayoutAdapter, NotificationCenter.proxySettingsChanged);
NotificationCenter.getGlobalInstance().removeObserver(drawerLayoutAdapter, NotificationCenter.updateUserStatus);
=======
NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.showBulletin);
>>>>>>>
NotificationCenter.getGlobalInstance().removeObserver(this, NotificationCenter.showBulletin);
NotificationCenter.getGlobalInstance().removeObserver(drawerLayoutAdapter, NotificationCenter.proxySettingsChanged);
NotificationCenter.getGlobalInstance().removeObserver(drawerLayoutAdapter, NotificationCenter.updateUserStatus); |
<<<<<<<
import tw.nekomimi.nekogram.FilterPopup;
public class MessagesController implements NotificationCenter.NotificationCenterDelegate {
=======
public class MessagesController extends BaseController implements NotificationCenter.NotificationCenterDelegate {
>>>>>>>
import tw.nekomimi.nekogram.FilterPopup;
public class MessagesController extends BaseController implements NotificationCenter.NotificationCenterDelegate { |
<<<<<<<
private String label;
=======
private ConnectorLoginMode loginMode;
>>>>>>>
private String label;
private ConnectorLoginMode loginMode;
<<<<<<<
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public void setId(Long id) {
this.id = id;
}
=======
public ConnectorLoginMode getLoginMode() {
return loginMode;
}
public void setLoginMode(ConnectorLoginMode loginMode) {
this.loginMode = loginMode;
}
>>>>>>>
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public void setId(Long id) {
this.id = id;
}
public ConnectorLoginMode getLoginMode() {
return loginMode;
}
public void setLoginMode(ConnectorLoginMode loginMode) {
this.loginMode = loginMode;
} |
<<<<<<<
import org.camunda.bpm.engine.impl.EventSubscriptionQueryImpl;
import org.camunda.bpm.engine.impl.cmd.GetActivityInstanceCmd;
=======
>>>>>>>
import org.camunda.bpm.engine.impl.cmd.GetActivityInstanceCmd;
<<<<<<<
import org.camunda.bpm.engine.runtime.ActivityInstance;
=======
import org.camunda.bpm.engine.runtime.EventSubscription;
>>>>>>>
import org.camunda.bpm.engine.runtime.EventSubscription;
import org.camunda.bpm.engine.runtime.ActivityInstance; |
<<<<<<<
import static com.camunda.fox.platform.subsystem.impl.extension.ModelConstants.ATTR_DEFAULT;
import static com.camunda.fox.platform.subsystem.impl.extension.ModelConstants.ATTR_NAME;
import static com.camunda.fox.platform.subsystem.impl.extension.ModelConstants.ELEMENT_DATASOURCE;
import static com.camunda.fox.platform.subsystem.impl.extension.ModelConstants.ELEMENT_HISTORY_LEVEL;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
=======
>>>>>>>
<<<<<<<
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
import java.util.Locale;
=======
>>>>>>>
<<<<<<<
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.Property;
import com.camunda.fox.platform.subsystem.impl.extension.FoxPlatformParser.Tag;
=======
import com.camunda.fox.platform.subsystem.impl.extension.handler.FoxPlatformSubsystemDescribe;
import com.camunda.fox.platform.subsystem.impl.extension.resource.FoxPlatformSubsystemRootResourceDefinition;
import com.camunda.fox.platform.subsystem.impl.extension.resource.ProcessEnginesResourceDefinition;
>>>>>>>
import com.camunda.fox.platform.subsystem.impl.extension.handler.FoxPlatformSubsystemDescribe;
import com.camunda.fox.platform.subsystem.impl.extension.resource.FoxPlatformSubsystemRootResourceDefinition;
import com.camunda.fox.platform.subsystem.impl.extension.resource.ProcessEnginesResourceDefinition;
<<<<<<<
private final FoxPlatformParser parser = new FoxPlatformParser();
=======
private final FoxPlatformParser parser = new FoxPlatformParser();
private static final String RESOURCE_NAME = FoxPlatformExtension.class.getPackage().getName() + ".LocalDescriptions";
>>>>>>>
private final FoxPlatformParser parser = new FoxPlatformParser();
private static final String RESOURCE_NAME = FoxPlatformExtension.class.getPackage().getName() + ".LocalDescriptions";
<<<<<<<
public static ModelNode createAddSubsystemOperation() {
final ModelNode subsystem = new ModelNode();
subsystem.get(OP).set(ADD);
subsystem.get(OP_ADDR).add(SUBSYSTEM, SUBSYSTEM_NAME);
return subsystem;
}
/**
* Recreate the steps to put the subsystem in the same state it was in. This
* is used in domain mode to query the profile being used, in order to get the
* steps needed to create the servers
*/
private static class SubsystemDescribeHandler implements OperationStepHandler, DescriptionProvider {
static final SubsystemDescribeHandler INSTANCE = new SubsystemDescribeHandler();
public ModelNode getModelDescription(Locale locale) {
return CommonDescriptions.getSubsystemDescribeOperation(locale);
}
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
// Add the main operation
context.getResult().add(createAddSubsystemOperation());
//Add the operations to create each child
ModelNode node = context.readResource(PathAddress.EMPTY_ADDRESS).getModel();
for (Property property : node.get(Tag.PROCESS_ENGINE.getLocalName()).asPropertyList()) {
ModelNode addType = new ModelNode();
addType.get(OP).set(ModelDescriptionConstants.ADD);
PathAddress addr = PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME), PathElement.pathElement(Tag.PROCESS_ENGINES.getLocalName()), PathElement.pathElement(Tag.PROCESS_ENGINE.getLocalName(), property.getName()));
addType.get(OP_ADDR).set(addr.toModelNode());
addType.get(ATTR_NAME).set(property.getValue().get(ATTR_NAME).asString());
if (property.getValue().hasDefined(ATTR_DEFAULT)) {
addType.get(ATTR_DEFAULT).set(property.getValue().get(ATTR_DEFAULT).asString());
}
if (property.getValue().hasDefined(ELEMENT_DATASOURCE)) {
addType.get(ELEMENT_DATASOURCE).set(property.getValue().get(ELEMENT_DATASOURCE).asString());
}
if (property.getValue().hasDefined(ELEMENT_HISTORY_LEVEL)) {
addType.get(ELEMENT_HISTORY_LEVEL).set(property.getValue().get(ELEMENT_HISTORY_LEVEL).asString());
}
context.getResult().add(addType);
}
context.completeStep();
}
=======
public static ResourceDescriptionResolver getResourceDescriptionResolver(String keyPrefix) {
return new StandardResourceDescriptionResolver(keyPrefix, RESOURCE_NAME, FoxPlatformExtension.class.getClassLoader(), true, true);
>>>>>>>
public static ResourceDescriptionResolver getResourceDescriptionResolver(String keyPrefix) {
return new StandardResourceDescriptionResolver(keyPrefix, RESOURCE_NAME, FoxPlatformExtension.class.getClassLoader(), true, true); |
<<<<<<<
=======
private String connectorId;
private String name;
>>>>>>> |
<<<<<<<
helper.waitForJobExecutorToProcessAllJobs(15000);
=======
>>>>>>>
<<<<<<<
helper.waitForJobExecutorToProcessAllJobs(15000);
=======
>>>>>>>
<<<<<<<
helper.waitForJobExecutorToProcessAllJobs(15000);
=======
>>>>>>>
<<<<<<<
helper.waitForJobExecutorToProcessAllJobs(15000);
ProcessInstanceQueryDto queryParameter = new ProcessInstanceQueryDto();
=======
ProcessInstanceQueryParameter queryParameter = new ProcessInstanceQueryParameter();
>>>>>>>
ProcessInstanceQueryDto queryParameter = new ProcessInstanceQueryDto(); |
<<<<<<<
for ( FileObject file : children )
{
String baseName = file.getName().getBaseName();
ConnectorNode node = new ConnectorNode(parent.getId()+File.separatorChar+baseName, baseName, getId());
if (file.getType() == FileType.FILE) {
node.setType(ConnectorNodeType.FILE);
} else {
node.setType(ConnectorNodeType.FOLDER);
}
node.setConnectorId(this.getConfiguration().getId());
/**
* it's not possible to get last modified date from symlinks
*/
try {
node.setLastModified(new Date(file.getContent().getLastModifiedTime()));
}catch (Exception exception) {
logger.fine("Could not set last modified time");
}
nodes.add(node);
=======
for (FileObject file: children) {
String baseName = file.getName().getBaseName();
ConnectorNode child = new ConnectorNode(node.getId() + "/" + baseName, baseName, getId());
child.setType(extractFileType(file));
/**
* it's not possible to get last modified date from symlinks
*/
try {
child.setLastModified(new Date(file.getContent().getLastModifiedTime()));
} catch (Exception exception) {
logger.fine("Could not set last modified time");
}
nodes.add(child);
>>>>>>>
for (FileObject file: children) {
String baseName = file.getName().getBaseName();
ConnectorNode child = new ConnectorNode(node.getId() + "/" + baseName, baseName, getId());
child.setType(extractFileType(file));
/**
* it's not possible to get last modified date from symlinks
*/
try {
child.setLastModified(new Date(file.getContent().getLastModifiedTime()));
} catch (Exception exception) {
logger.fine("Could not set last modified time");
}
nodes.add(child);
<<<<<<<
public ConnectorNode createNode(String parentId, String id, String label, ConnectorNodeType type) {
=======
public ConnectorNode createNode(String id, String label, ConnectorNodeType type) {
if (type == null || type == ConnectorNodeType.UNSPECIFIED) {
throw new IllegalArgumentException("Must specify a valid node type");
}
>>>>>>>
public ConnectorNode createNode(String parentId, String id, String label, ConnectorNodeType type) {
if (type == null || type == ConnectorNodeType.UNSPECIFIED) {
throw new IllegalArgumentException("Must specify a valid node type");
} |
<<<<<<<
public class TaskRestServiceImpl extends AbstractProcessEngineAware implements TaskRestService {
=======
public class TaskRestServiceImpl extends AbstractEngineRestService implements TaskRestService {
>>>>>>>
public class TaskRestServiceImpl extends AbstractEngineRestService implements TaskRestService {
public class TaskRestServiceImpl extends AbstractProcessEngineAware implements TaskRestService { |
<<<<<<<
ActivitiEventBuilder.createSignalEvent(ActivitiEventType.ACTIVITY_SIGNALED, signalEventSubscriptionEntity.getActivityId(), signalEventName,
null, signalEventSubscriptionEntity.getExecutionId(), signalEventSubscriptionEntity.getProcessInstanceId(),
=======
ActivitiEventBuilder.createSignalEvent(ActivitiEventType.ACTIVITY_SIGNALED, signalEventSubscriptionEntity.getActivityId(), eventSubscriptionName,
null, signalEventSubscriptionEntity.getExecutionId(), signalEventSubscriptionEntity.getProcessInstanceId(),
>>>>>>>
ActivitiEventBuilder.createSignalEvent(ActivitiEventType.ACTIVITY_SIGNALED, signalEventSubscriptionEntity.getActivityId(), eventSubscriptionName,
null, signalEventSubscriptionEntity.getExecutionId(), signalEventSubscriptionEntity.getProcessInstanceId(),
<<<<<<<
planTakeOutgoingSequenceFlowsOperation(commandContext.getAgenda(), commandContext, (ExecutionEntity) execution, true);
// if (execution.getCurrentActivityId() != null) { // don't continue if process has already finished
// leave(execution);
// }
=======
commandContext.getAgenda().planTakeOutgoingSequenceFlowsOperation((ExecutionEntity) execution, true);
>>>>>>>
planTakeOutgoingSequenceFlowsOperation(commandContext.getAgenda(), commandContext, (ExecutionEntity) execution, true); |
<<<<<<<
import org.camunda.bpm.cockpit.impl.plugin.base.dto.query.ProcessInstanceQueryDto;
=======
import org.camunda.bpm.cockpit.impl.plugin.base.query.parameter.ProcessInstanceQueryParameter;
>>>>>>>
import org.camunda.bpm.cockpit.impl.plugin.base.dto.query.ProcessInstanceQueryDto;
<<<<<<<
helper.waitForJobExecutorToProcessAllJobs(15000);
=======
>>>>>>>
<<<<<<<
helper.waitForJobExecutorToProcessAllJobs(15000);
=======
>>>>>>>
<<<<<<<
resource = new ProcessInstanceResource(getProcessEngine().getName(), processInstance.getId());
helper.waitForJobExecutorToProcessAllJobs(15000);
ProcessDefinition failingProcess = repositoryService
=======
resource = new ProcessInstanceResource(getProcessEngine().getName(), processInstance.getId());
ProcessDefinition userTaskProcess = repositoryService
>>>>>>>
resource = new ProcessInstanceResource(getProcessEngine().getName(), processInstance.getId());
helper.waitForJobExecutorToProcessAllJobs(15000);
ProcessDefinition userTaskProcess = repositoryService
<<<<<<<
ProcessDefinition anotherFailingProcess = repositoryService
=======
ProcessDefinition anotherUserTaskProcess = repositoryService
>>>>>>>
ProcessDefinition anotherUserTaskProcess = repositoryService
<<<<<<<
helper.waitForJobExecutorToProcessAllJobs(15000);
ProcessInstanceQueryDto queryParameter1 = new ProcessInstanceQueryDto();
=======
ProcessInstanceQueryParameter queryParameter1 = new ProcessInstanceQueryParameter();
>>>>>>>
helper.waitForJobExecutorToProcessAllJobs(15000);
ProcessInstanceQueryDto queryParameter1 = new ProcessInstanceQueryDto(); |
<<<<<<<
Set<Object> refs = new HashSet<>();
=======
Set<Object> refs = new CopyOnWriteArraySet<>();
KafkaRestContext ctx = newContext(restConfig);
ExecutorService executor = Executors.newFixedThreadPool(100);
// Captures reference as it's invoked.
for( int i = 0; i < 100; i++) {
executor.submit(() ->
refs.add(ctx.getProducerPool()));
}
executor.shutdown();
assertTrue(executor.awaitTermination(60, TimeUnit.SECONDS));
assertEquals(1, refs.size());
}
@Test
public void testGetAdminClientWrapperThreadSafety() throws InterruptedException {
Set<Object> refs = new CopyOnWriteArraySet<>();
KafkaRestContext ctx = newContext(restConfig);
>>>>>>>
Set<Object> refs = new CopyOnWriteArraySet<>();
<<<<<<<
Set<Object> refs = new HashSet<>();
=======
Set<Object> refs = new CopyOnWriteArraySet<>();
KafkaRestContext ctx = newContext(restConfig);
>>>>>>>
Set<Object> refs = new CopyOnWriteArraySet<>();
<<<<<<<
Set<Object> refs = new HashSet<>();
=======
Set<Object> refs = new CopyOnWriteArraySet<>();
KafkaRestContext ctx = newContext(restConfig);
>>>>>>>
Set<Object> refs = new CopyOnWriteArraySet<>(); |
<<<<<<<
private static final String METRICS_JMX_PREFIX_DEFAULT_OVERRIDE = "kafka-rest";
=======
private static final ConfigDef config;
>>>>>>>
private static final String METRICS_JMX_PREFIX_DEFAULT_OVERRIDE = "kafka-rest";
private static final ConfigDef config;
<<<<<<<
this(props, new SystemTime());
}
public KafkaRestConfig(Properties props, Time time) throws RestConfigException {
super(props);
this.time = time;
}
public Time getTime() {
return time;
=======
super(config, props);
time = new SystemTime();
>>>>>>>
this(props, new SystemTime());
}
public KafkaRestConfig(Properties props, Time time) throws RestConfigException {
super(config, props);
this.time = time;
}
public Time getTime() {
return time; |
<<<<<<<
public JsonConsumerRecord(
@JsonProperty("key") Object key,
@JsonProperty("value") Object value,
@JsonProperty("partition") int partition,
@JsonProperty("offset") long offset
) {
super(key, value, partition, offset);
}
public JsonConsumerRecord(
@JsonProperty("topic") String topic,
@JsonProperty("key") Object key,
@JsonProperty("value") Object value,
@JsonProperty("partition") int partition,
@JsonProperty("offset") long offset
) {
=======
@JsonCreator
public JsonConsumerRecord(@JsonProperty("topic") String topic,
@JsonProperty("key") Object key,
@JsonProperty("value") Object value,
@JsonProperty("partition") int partition,
@JsonProperty("offset") long offset) {
>>>>>>>
@JsonCreator
public JsonConsumerRecord(
@JsonProperty("topic") String topic,
@JsonProperty("key") Object key,
@JsonProperty("value") Object value,
@JsonProperty("partition") int partition,
@JsonProperty("offset") long offset
) { |
<<<<<<<
import org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.activiti.engine.impl.context.Context;
import org.activiti.engine.impl.db.DbSqlSession;
=======
import org.activiti.engine.ActivitiException;
>>>>>>>
<<<<<<<
protected Object execute(CommandContext commandContext, TaskEntity task) {
int historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
ExecutionEntity execution = task.getExecution();
if (historyLevel>=ProcessEngineConfigurationImpl.HISTORYLEVEL_AUDIT && execution != null) {
DbSqlSession dbSqlSession = commandContext.getSession(DbSqlSession.class);
for (String propertyId: properties.keySet()) {
String propertyValue = properties.get(propertyId);
HistoricFormPropertyEntity historicFormProperty = new HistoricFormPropertyEntity(execution, propertyId, propertyValue, taskId);
dbSqlSession.insert(historicFormProperty);
}
}
=======
public Object execute(CommandContext commandContext) {
if(taskId == null) {
throw new ActivitiException("taskId is null");
}
TaskEntity task = commandContext.getTaskManager().findTaskById(taskId);
if (task == null) {
throw new ActivitiException("Cannot find task with id " + taskId);
}
commandContext.getHistoryManager()
.reportFormPropertiesSubmitted(task.getExecution(), properties, taskId);
>>>>>>>
protected Object execute(CommandContext commandContext, TaskEntity task) {
commandContext.getHistoryManager()
.reportFormPropertiesSubmitted(task.getExecution(), properties, taskId); |
<<<<<<<
public KafkaConsumerManager getKafkaConsumerManager() {
=======
public ScalaConsumersContext getScalaConsumersContext() {
return scalaConsumersContext;
}
@Override
public ConsumerManager getConsumerManager() {
return scalaConsumersContext.getConsumerManager();
}
@Override
public SimpleConsumerManager getSimpleConsumerManager() {
return scalaConsumersContext.getSimpleConsumerManager();
}
@Override
public synchronized KafkaConsumerManager getKafkaConsumerManager() {
>>>>>>>
public synchronized KafkaConsumerManager getKafkaConsumerManager() {
<<<<<<<
public Admin getAdmin() {
if (adminClient == null) {
adminClient = AdminClient.create(adminProperties(config));
=======
public synchronized AdminClientWrapper getAdminClientWrapper() {
if (adminClientWrapper == null) {
adminClientWrapper = new AdminClientWrapper(config, getAdmin());
>>>>>>>
public synchronized Admin getAdmin() {
if (adminClient == null) {
adminClient = AdminClient.create(adminProperties(config));
<<<<<<<
public static Properties adminProperties(KafkaRestConfig kafkaRestConfig) {
Properties properties = new Properties();
properties.putAll(kafkaRestConfig.getAdminProperties());
properties.put(
KafkaRestConfig.BOOTSTRAP_SERVERS_CONFIG,
RestConfigUtils.bootstrapBrokers(kafkaRestConfig));
return properties;
=======
@Override
public synchronized AdminClient getAdmin() {
if (admin == null) {
admin = AdminClient.create(AdminClientWrapper.adminProperties(config));
}
return admin;
>>>>>>>
public static Properties adminProperties(KafkaRestConfig kafkaRestConfig) {
Properties properties = new Properties();
properties.putAll(kafkaRestConfig.getAdminProperties());
properties.put(
KafkaRestConfig.BOOTSTRAP_SERVERS_CONFIG,
RestConfigUtils.bootstrapBrokers(kafkaRestConfig));
return properties; |
<<<<<<<
new MessageAndMetadata<>(
topicName,
partitionId,
messageAndOffset.message(),
messageAndOffset.offset(),
binaryDecoder,
binaryDecoder,
0,
TimestampType.CREATE_TIME
);
return new BinaryConsumerRecord(messageAndMetadata.key(), messageAndMetadata.message(),
partitionId, messageAndOffset.offset()
);
=======
new MessageAndMetadata<>(topicName, partitionId,
messageAndOffset.message(), messageAndOffset.offset(),
binaryDecoder, binaryDecoder,
0, TimestampType.CREATE_TIME);
return new BinaryConsumerRecord(topicName,
messageAndMetadata.key(),
messageAndMetadata.message(),
partitionId,
messageAndOffset.offset());
>>>>>>>
new MessageAndMetadata<>(
topicName,
partitionId,
messageAndOffset.message(),
messageAndOffset.offset(),
binaryDecoder,
binaryDecoder,
0,
TimestampType.CREATE_TIME
);
return new BinaryConsumerRecord(
topicName,
messageAndMetadata.key(),
messageAndMetadata.message(),
partitionId,
messageAndOffset.offset()
);
<<<<<<<
new MessageAndMetadata<>(
topicName,
partitionId,
messageAndOffset.message(),
messageAndOffset.offset(),
avroDecoder,
avroDecoder,
0,
TimestampType.CREATE_TIME
);
return new AvroConsumerRecord(
AvroConverter.toJson(messageAndMetadata.key()).json,
AvroConverter.toJson(messageAndMetadata.message()).json,
partitionId, messageAndOffset.offset()
);
=======
new MessageAndMetadata<>(topicName, partitionId,
messageAndOffset.message(), messageAndOffset.offset(),
avroDecoder, avroDecoder,
0, TimestampType.CREATE_TIME);
return new AvroConsumerRecord(topicName,
AvroConverter.toJson(messageAndMetadata.key()).json,
AvroConverter.toJson(messageAndMetadata.message()).json,
partitionId,
messageAndOffset.offset());
>>>>>>>
new MessageAndMetadata<>(
topicName,
partitionId,
messageAndOffset.message(),
messageAndOffset.offset(),
avroDecoder,
avroDecoder,
0,
TimestampType.CREATE_TIME
);
return new AvroConsumerRecord(
topicName,
AvroConverter.toJson(messageAndMetadata.key()).json,
AvroConverter.toJson(messageAndMetadata.message()).json,
partitionId,
messageAndOffset.offset()
);
<<<<<<<
new MessageAndMetadata<>(
topicName,
partitionId,
messageAndOffset.message(),
messageAndOffset.offset(),
jsonDecoder,
jsonDecoder,
0,
TimestampType.CREATE_TIME
);
return new JsonConsumerRecord(
messageAndMetadata.key(),
messageAndMetadata.message(),
partitionId,
messageAndOffset.offset()
);
=======
new MessageAndMetadata<>(topicName, partitionId,
messageAndOffset.message(), messageAndOffset.offset(),
jsonDecoder, jsonDecoder,
0, TimestampType.CREATE_TIME);
return new JsonConsumerRecord(topicName,
messageAndMetadata.key(),
messageAndMetadata.message(),
partitionId,
messageAndOffset.offset());
>>>>>>>
new MessageAndMetadata<>(
topicName,
partitionId,
messageAndOffset.message(),
messageAndOffset.offset(),
jsonDecoder,
jsonDecoder,
0,
TimestampType.CREATE_TIME
);
return new JsonConsumerRecord(
topicName,
messageAndMetadata.key(),
messageAndMetadata.message(),
partitionId,
messageAndOffset.offset()
); |
<<<<<<<
private void adjustCameraParameters() {
SortedSet<Size> sizes = mPreviewSizes.sizes(mAspectRatio);
=======
void adjustCameraParameters() {
final SortedSet<Size> sizes = mPreviewSizes.sizes(mAspectRatio);
>>>>>>>
void adjustCameraParameters() {
SortedSet<Size> sizes = mPreviewSizes.sizes(mAspectRatio); |
<<<<<<<
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
=======
import net.minecraftforge.fml.common.FMLCommonHandler;
>>>>>>>
import net.minecraftforge.common.MinecraftForge; |
<<<<<<<
import org.activiti.engine.impl.persistence.entity.ExecutionEntity;
=======
import org.activiti.engine.impl.persistence.entity.IdentityLinkEntity;
>>>>>>>
import org.activiti.engine.impl.persistence.entity.ExecutionEntity;
<<<<<<<
/**
* responsibilities: - delayed flushing of inserts updates and deletes - optional dirty checking - db specific statement name mapping
*
=======
/** responsibilities:
* - delayed flushing of inserts updates and deletes
* - optional dirty checking
* - db specific statement name mapping
*
>>>>>>>
/**
* responsibilities: - delayed flushing of inserts updates and deletes - optional dirty checking - db specific statement name mapping
*
<<<<<<<
=======
@Override
>>>>>>>
<<<<<<<
=======
@Override
>>>>>>>
<<<<<<<
public <T extends PersistentObject> List<T> pruneDeletedEntities(List<T> listToPrune) {
=======
public <T extends PersistentObject> List<T> pruneDeletedEntities(List<T> listToPrune) {
>>>>>>>
public <T extends PersistentObject> List<T> pruneDeletedEntities(List<T> listToPrune) { |
<<<<<<<
public boolean renderVideo() {
MinecraftForge.EVENT_BUS.post(new ReplayRenderEvent.Pre(this));
=======
public boolean renderVideo() throws Throwable {
FMLCommonHandler.instance().bus().post(new ReplayRenderEvent.Pre(this));
>>>>>>>
public boolean renderVideo() throws Throwable {
MinecraftForge.EVENT_BUS.post(new ReplayRenderEvent.Pre(this)); |
<<<<<<<
|| view.world != world)
|| world.getEntityByID(view.getEntityId()) != view) {
view = world.getPlayerEntityByUUID(spectating);
=======
|| view.worldObj != worldObj)
|| worldObj.getEntityByID(view.getEntityId()) != view) {
if (spectating == null) {
// Entity (non-player) died, stop spectating
ReplayModReplay.instance.getReplayHandler().spectateEntity(this);
return;
}
view = worldObj.getPlayerEntityByUUID(spectating);
>>>>>>>
|| view.world != world)
|| world.getEntityByID(view.getEntityId()) != view) {
if (spectating == null) {
// Entity (non-player) died, stop spectating
ReplayModReplay.instance.getReplayHandler().spectateEntity(this);
return;
}
view = world.getPlayerEntityByUUID(spectating); |
<<<<<<<
import net.minecraftforge.common.MinecraftForge;
=======
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraft.network.NetworkManager;
>>>>>>>
import net.minecraftforge.common.MinecraftForge;
import net.minecraft.network.NetworkManager; |
<<<<<<<
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
=======
import net.minecraft.client.renderer.entity.RenderManager;
>>>>>>>
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
<<<<<<<
//$$ import net.minecraft.client.particle.EntityFX;
=======
//#if MC>=10800
>>>>>>>
//$$ import net.minecraft.client.particle.EntityFX;
//#if MC>=10800
<<<<<<<
//#if MC>=10904
//#if MC>=11200
public static BufferBuilder getBuffer(Tessellator tessellator) {
//#else
//$$ public static VertexBuffer getBuffer(Tessellator tessellator) {
//#endif
//#else
//$$ public static WorldRenderer getBuffer(Tessellator tessellator) {
//#endif
//#if MC>=10904
return Tessellator.getInstance().getBuffer();
//#else
//$$ return Tessellator.getInstance().getWorldRenderer();
//#endif
}
@SuppressWarnings("unchecked")
public static List<VertexFormatElement> getElements(VertexFormat vertexFormat) {
return vertexFormat.getElements();
}
=======
public static Tessellator Tessellator_getInstance() {
//#if MC>=10800
return Tessellator.getInstance();
//#else
//$$ return Tessellator.instance;
//#endif
}
public static RenderManager getRenderManager() {
//#if MC>=10800
return Minecraft.getMinecraft().getRenderManager();
//#else
//$$ return RenderManager.instance;
//#endif
}
>>>>>>>
//#if MC>=10904
//#if MC>=11200
public static BufferBuilder getBuffer(Tessellator tessellator) {
//#else
//$$ public static VertexBuffer getBuffer(Tessellator tessellator) {
//#endif
//#else
//$$ public static WorldRenderer getBuffer(Tessellator tessellator) {
//#endif
//#if MC>=10904
return Tessellator.getInstance().getBuffer();
//#else
//$$ return Tessellator.getInstance().getWorldRenderer();
//#endif
}
@SuppressWarnings("unchecked")
public static List<VertexFormatElement> getElements(VertexFormat vertexFormat) {
return vertexFormat.getElements();
}
public static Tessellator Tessellator_getInstance() {
//#if MC>=10800
return Tessellator.getInstance();
//#else
//$$ return Tessellator.instance;
//#endif
}
public static RenderManager getRenderManager() {
//#if MC>=10800
return Minecraft.getMinecraft().getRenderManager();
//#else
//$$ return RenderManager.instance;
//#endif
}
<<<<<<<
public static double interpPosX() {
//#if MC>=10904
return Particle.interpPosX;
//#else
//$$ return EntityFX.interpPosX;
//#endif
}
public static double interpPosY() {
//#if MC>=10904
return Particle.interpPosY;
//#else
//$$ return EntityFX.interpPosY;
//#endif
}
public static double interpPosZ() {
//#if MC>=10904
return Particle.interpPosZ;
//#else
//$$ return EntityFX.interpPosZ;
//#endif
}
=======
//#if MC<=10710
//$$ public static class GlStateManager {
//$$ public static void resetColor() { /* nop */ }
//$$ public static void clearColor(float r, float g, float b, float a) { glClearColor(r, g, b, a); }
//$$ public static void enableTexture2D() { glEnable(GL_TEXTURE_2D); }
//$$ public static void enableAlpha() { glEnable(GL_ALPHA_TEST); }
//$$ public static void alphaFunc(int func, float ref) { glAlphaFunc(func, ref); }
//$$ public static void enableDepth() { glEnable(GL_DEPTH_TEST); }
//$$ public static void pushMatrix() { glPushMatrix(); }
//$$ public static void popAttrib() { glPopAttrib(); }
//$$ public static void popMatrix() { glPopMatrix(); }
//$$ public static void clear(int mask) { glClear(mask); }
//$$ public static void translate(double x, double y, double z) { glTranslated(x, y, z); }
//$$ public static void rotate(float angle, float x, float y, float z) { glRotatef(angle, x, y, z); }
//$$ }
//#endif
>>>>>>>
public static double interpPosX() {
//#if MC>=10904
return Particle.interpPosX;
//#else
//$$ return EntityFX.interpPosX;
//#endif
}
public static double interpPosY() {
//#if MC>=10904
return Particle.interpPosY;
//#else
//$$ return EntityFX.interpPosY;
//#endif
}
public static double interpPosZ() {
//#if MC>=10904
return Particle.interpPosZ;
//#else
//$$ return EntityFX.interpPosZ;
//#endif
}
//#if MC<=10710
//$$ public static class GlStateManager {
//$$ public static void resetColor() { /* nop */ }
//$$ public static void clearColor(float r, float g, float b, float a) { glClearColor(r, g, b, a); }
//$$ public static void enableTexture2D() { glEnable(GL_TEXTURE_2D); }
//$$ public static void enableAlpha() { glEnable(GL_ALPHA_TEST); }
//$$ public static void alphaFunc(int func, float ref) { glAlphaFunc(func, ref); }
//$$ public static void enableDepth() { glEnable(GL_DEPTH_TEST); }
//$$ public static void pushMatrix() { glPushMatrix(); }
//$$ public static void popAttrib() { glPopAttrib(); }
//$$ public static void popMatrix() { glPopMatrix(); }
//$$ public static void clear(int mask) { glClear(mask); }
//$$ public static void translate(double x, double y, double z) { glTranslated(x, y, z); }
//$$ public static void rotate(float angle, float x, float y, float z) { glRotatef(angle, x, y, z); }
//$$ }
//#endif |
<<<<<<<
listView.addFooterView(footer, null, false);
=======
footer.findViewById(R.id.gap_to_list).setVisibility(View.GONE);
listView.addFooterView(footer);
>>>>>>>
footer.findViewById(R.id.gap_to_list).setVisibility(View.GONE);
listView.addFooterView(footer, null, false); |
<<<<<<<
if(method.getParameterTypes().length == 0){
=======
if(method.getParameterCount() == 0){
origAccessible = new Boolean(method.isAccessible());
method.setAccessible(true);
>>>>>>>
if(method.getParameterTypes().length == 0){
origAccessible = new Boolean(method.isAccessible());
method.setAccessible(true);
<<<<<<<
if(method.getParameterTypes().length == 0){
=======
origAccessible = new Boolean(method.isAccessible());
method.setAccessible(true);
if(method.getParameterCount() == 0){
>>>>>>>
origAccessible = new Boolean(method.isAccessible());
method.setAccessible(true);
if(method.getParameterTypes().length == 0){ |
<<<<<<<
RawResponse rawResponse = rawClient.makePutRequest("/v1/agent/check/deregister/" + checkId, "");
=======
return agentCheckDeregister(checkId, null);
}
@Override
public Response<Void> agentCheckDeregister(String checkId, String token) {
UrlParameters tokenParameter = token != null ? new SingleUrlParameters("token", token) : null;
RawResponse rawResponse = rawClient.makeGetRequest("/v1/agent/check/deregister/" + checkId, tokenParameter);
>>>>>>>
return agentCheckDeregister(checkId, null);
}
@Override
public Response<Void> agentCheckDeregister(String checkId, String token) {
UrlParameters tokenParameter = token != null ? new SingleUrlParameters("token", token) : null;
RawResponse rawResponse = rawClient.makePutRequest("/v1/agent/check/deregister/" + checkId, "", tokenParameter);
<<<<<<<
UrlParameters noteParams = note != null ? new SingleUrlParameters("note", note) : null;
RawResponse rawResponse = rawClient.makePutRequest("/v1/agent/check/pass/" + checkId, "", noteParams);
=======
return agentCheckPass(checkId, note, null);
}
@Override
public Response<Void> agentCheckPass(String checkId, String note, String token) {
UrlParameters noteParameter = note != null ? new SingleUrlParameters("note", note) : null;
UrlParameters tokenParameter = token != null ? new SingleUrlParameters("token", token) : null;
RawResponse rawResponse = rawClient.makeGetRequest("/v1/agent/check/pass/" + checkId, noteParameter, tokenParameter);
>>>>>>>
return agentCheckPass(checkId, note, null);
}
@Override
public Response<Void> agentCheckPass(String checkId, String note, String token) {
UrlParameters noteParameter = note != null ? new SingleUrlParameters("note", note) : null;
UrlParameters tokenParameter = token != null ? new SingleUrlParameters("token", token) : null;
RawResponse rawResponse = rawClient.makePutRequest("/v1/agent/check/pass/" + checkId, "", noteParams);
<<<<<<<
UrlParameters noteParams = note != null ? new SingleUrlParameters("note", note) : null;
RawResponse rawResponse = rawClient.makePutRequest("/v1/agent/check/warn/" + checkId, "", noteParams);
=======
return agentCheckWarn(checkId, note, null);
}
@Override
public Response<Void> agentCheckWarn(String checkId, String note, String token) {
UrlParameters noteParameter = note != null ? new SingleUrlParameters("note", note) : null;
UrlParameters tokenParameter = token != null ? new SingleUrlParameters("token", token) : null;
RawResponse rawResponse = rawClient.makeGetRequest("/v1/agent/check/warn/" + checkId, noteParameter, tokenParameter);
>>>>>>>
return agentCheckWarn(checkId, note, null);
}
@Override
public Response<Void> agentCheckWarn(String checkId, String note, String token) {
UrlParameters noteParameter = note != null ? new SingleUrlParameters("note", note) : null;
UrlParameters tokenParameter = token != null ? new SingleUrlParameters("token", token) : null;
RawResponse rawResponse = rawClient.makePutRequest("/v1/agent/check/warn/" + checkId, "", noteParams);
<<<<<<<
UrlParameters noteParams = note != null ? new SingleUrlParameters("note", note) : null;
RawResponse rawResponse = rawClient.makePutRequest("/v1/agent/check/fail/" + checkId, "", noteParams);
=======
return agentCheckFail(checkId, note, null);
}
@Override
public Response<Void> agentCheckFail(String checkId, String note, String token) {
UrlParameters noteParameter = note != null ? new SingleUrlParameters("note", note) : null;
UrlParameters tokenParameter = token != null ? new SingleUrlParameters("token", token) : null;
RawResponse rawResponse = rawClient.makeGetRequest("/v1/agent/check/fail/" + checkId, noteParameter, tokenParameter);
>>>>>>>
return agentCheckFail(checkId, note, null);
}
@Override
public Response<Void> agentCheckFail(String checkId, String note, String token) {
UrlParameters noteParameter = note != null ? new SingleUrlParameters("note", note) : null;
UrlParameters tokenParameter = token != null ? new SingleUrlParameters("token", token) : null;
RawResponse rawResponse = rawClient.makePutRequest("/v1/agent/check/fail/" + checkId, "", noteParams); |
<<<<<<<
import com.tcdi.zombodb.query_parser.rewriters.QueryRewriter;
import com.tcdi.zombodb.query_parser.utils.Utils;
=======
import com.tcdi.zombodb.query_parser.metadata.IndexMetadataManager;
import com.tcdi.zombodb.query_parser.rewriters.QueryRewriter;
import com.tcdi.zombodb.query_parser.utils.Utils;
>>>>>>>
import com.tcdi.zombodb.query_parser.metadata.IndexMetadataManager;
import com.tcdi.zombodb.query_parser.rewriters.QueryRewriter;
import com.tcdi.zombodb.query_parser.utils.Utils;
<<<<<<<
@Test
public void testComplexTokenPulloutWithAND() throws Exception {
assertAST("english_field:(\"I''ll see you later\" and darling)",
"QueryTree\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" And\n" +
" Phrase (fieldname=english_field, operator=CONTAINS, value=I''ll see you later, index=db.schema.table.index)\n" +
" Array (fieldname=english_field, operator=CONTAINS, index=db.schema.table.index) (AND)\n" +
" Word (fieldname=english_field, operator=CONTAINS, value=darl, index=db.schema.table.index)");
}
@Test
public void testIssue35() throws Exception {
QueryRewriter qr;
qr = qr("#tally(field, \"^.*\", 5000, \"term\", 50)");
assertEquals(
"\"field\"{\"terms\":{\"field\":\"field\",\"size\":5000,\"shard_size\":50,\"order\":{\"_term\":\"asc\"}}}",
qr.rewriteAggregations().toXContent(JsonXContent.contentBuilder(), null).string()
);
qr = qr("#tally(field, \"^.*\", 5000, \"term\", 50, #tally(field, \"^.*\", 5000, \"term\"))");
assertEquals(
"\"field\"{\"terms\":{\"field\":\"field\",\"size\":5000,\"shard_size\":50,\"order\":{\"_term\":\"asc\"}},\"aggregations\":{\"field\":{\"terms\":{\"field\":\"field\",\"size\":5000,\"shard_size\":0,\"order\":{\"_term\":\"asc\"}}}}}",
qr.rewriteAggregations().toXContent(JsonXContent.contentBuilder(), null).string()
);
}
=======
@Test
public void testComplexTokenPulloutWithAND() throws Exception {
assertAST("english_field:(\"I''ll see you later\" and darling)",
"QueryTree\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" And\n" +
" Phrase (fieldname=english_field, operator=CONTAINS, value=I''ll see you later, index=db.schema.table.index)\n" +
" Array (fieldname=english_field, operator=CONTAINS, index=db.schema.table.index) (AND)\n" +
" Word (fieldname=english_field, operator=CONTAINS, value=darl, index=db.schema.table.index)");
}
@Test
public void testIssue132() throws Exception {
assertAST("#expand<group_id=<this.index>group_id>(#expand<group_id=<this.index>group_id>(pk_id:3 OR pk_id:5))",
"QueryTree\n" +
" Or\n" +
" Expansion\n" +
" group_id=<db.schema.table.index>group_id\n" +
" Or\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" Or\n" +
" Array (fieldname=pk_id, operator=CONTAINS, index=db.schema.table.index) (OR)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=3, index=db.schema.table.index)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=5, index=db.schema.table.index)\n" +
" Array (fieldname=pk_id, operator=CONTAINS, index=db.schema.table.index) (OR)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=3, index=db.schema.table.index)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=5, index=db.schema.table.index)\n" +
" Expansion\n" +
" group_id=<db.schema.table.index>group_id\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" Or\n" +
" Array (fieldname=pk_id, operator=CONTAINS, index=db.schema.table.index) (OR)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=3, index=db.schema.table.index)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=5, index=db.schema.table.index)\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" Array (fieldname=pk_id, operator=CONTAINS, index=db.schema.table.index) (OR)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=3, index=db.schema.table.index)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=5, index=db.schema.table.index)");
}
>>>>>>>
@Test
public void testComplexTokenPulloutWithAND() throws Exception {
assertAST("english_field:(\"I''ll see you later\" and darling)",
"QueryTree\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" And\n" +
" Phrase (fieldname=english_field, operator=CONTAINS, value=I''ll see you later, index=db.schema.table.index)\n" +
" Array (fieldname=english_field, operator=CONTAINS, index=db.schema.table.index) (AND)\n" +
" Word (fieldname=english_field, operator=CONTAINS, value=darl, index=db.schema.table.index)");
}
@Test
public void testIssue35() throws Exception {
QueryRewriter qr;
qr = qr("#tally(field, \"^.*\", 5000, \"term\", 50)");
assertEquals(
"\"field\"{\"terms\":{\"field\":\"field\",\"size\":5000,\"shard_size\":50,\"order\":{\"_term\":\"asc\"}}}",
qr.rewriteAggregations().toXContent(JsonXContent.contentBuilder(), null).string()
);
qr = qr("#tally(field, \"^.*\", 5000, \"term\", 50, #tally(field, \"^.*\", 5000, \"term\"))");
assertEquals(
"\"field\"{\"terms\":{\"field\":\"field\",\"size\":5000,\"shard_size\":50,\"order\":{\"_term\":\"asc\"}},\"aggregations\":{\"field\":{\"terms\":{\"field\":\"field\",\"size\":5000,\"shard_size\":0,\"order\":{\"_term\":\"asc\"}}}}}",
qr.rewriteAggregations().toXContent(JsonXContent.contentBuilder(), null).string()
);
}
public void testIssue132() throws Exception {
assertAST("#expand<group_id=<this.index>group_id>(#expand<group_id=<this.index>group_id>(pk_id:3 OR pk_id:5))",
"QueryTree\n" +
" Or\n" +
" Expansion\n" +
" group_id=<db.schema.table.index>group_id\n" +
" Or\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" Or\n" +
" Array (fieldname=pk_id, operator=CONTAINS, index=db.schema.table.index) (OR)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=3, index=db.schema.table.index)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=5, index=db.schema.table.index)\n" +
" Array (fieldname=pk_id, operator=CONTAINS, index=db.schema.table.index) (OR)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=3, index=db.schema.table.index)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=5, index=db.schema.table.index)\n" +
" Expansion\n" +
" group_id=<db.schema.table.index>group_id\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" Or\n" +
" Array (fieldname=pk_id, operator=CONTAINS, index=db.schema.table.index) (OR)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=3, index=db.schema.table.index)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=5, index=db.schema.table.index)\n" +
" Expansion\n" +
" id=<db.schema.table.index>id\n" +
" Array (fieldname=pk_id, operator=CONTAINS, index=db.schema.table.index) (OR)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=3, index=db.schema.table.index)\n" +
" Number (fieldname=pk_id, operator=CONTAINS, value=5, index=db.schema.table.index)");
} |
<<<<<<<
@Test
public void testSendCommandNoTransmissionConstraint() throws Exception {
// first subscribe to command history
WebSocketRequest wsr = new WebSocketRequest("cmdhistory", "subscribe");
wsClient.sendRequest(wsr).get(2, TimeUnit.SECONDS);
wsListener.cmdHistoryDataList.clear();
IssueCommandRequest cmdreq = getCommand(5, "uint32_arg", "1000");
byte[] resp = doRealtimeRequest("/commands/REFMDB/SUBSYS1/ONE_INT_ARG_TC", HttpMethod.POST, cmdreq);
IssueCommandResponse commandResponse = IssueCommandResponse.parseFrom(resp);
assertTrue(commandResponse.hasBinary());
CommandHistoryEntry cmdhist = wsListener.cmdHistoryDataList.poll(3, TimeUnit.SECONDS);
assertNotNull(cmdhist);
CommandId cmdid = cmdhist.getCommandId();
assertEquals("/REFMDB/SUBSYS1/ONE_INT_ARG_TC", cmdid.getCommandName());
assertEquals(5, cmdid.getSequenceNumber());
assertEquals("IntegrationTest", cmdid.getOrigin());
}
=======
>>>>>>>
@Test
public void testSendCommandNoTransmissionConstraint() throws Exception {
// first subscribe to command history
WebSocketRequest wsr = new WebSocketRequest("cmdhistory", "subscribe");
wsClient.sendRequest(wsr).get(2, TimeUnit.SECONDS);
wsListener.cmdHistoryDataList.clear();
IssueCommandRequest cmdreq = getCommand(5, "uint32_arg", "1000");
byte[] resp = doRealtimeRequest("/commands/REFMDB/SUBSYS1/ONE_INT_ARG_TC", HttpMethod.POST, cmdreq);
IssueCommandResponse commandResponse = IssueCommandResponse.parseFrom(resp);
assertTrue(commandResponse.hasBinary());
CommandHistoryEntry cmdhist = wsListener.cmdHistoryDataList.poll(3, TimeUnit.SECONDS);
assertNotNull(cmdhist);
CommandId cmdid = cmdhist.getCommandId();
assertEquals("/REFMDB/SUBSYS1/ONE_INT_ARG_TC", cmdid.getCommandName());
assertEquals(5, cmdid.getSequenceNumber());
assertEquals("IntegrationTest", cmdid.getOrigin());
}
<<<<<<<
@Test
public void testSendCommandFailedTransmissionConstraint() throws Exception {
WebSocketRequest wsr = new WebSocketRequest("cmdhistory", "subscribe");
wsClient.sendRequest(wsr).get(2, TimeUnit.SECONDS);
IssueCommandRequest cmdreq = getCommand(6, "p1", "2");
byte[] resp = doRealtimeRequest("/commands/REFMDB/SUBSYS1/CRITICAL_TC1", HttpMethod.POST, cmdreq);
IssueCommandResponse commandResponse = IssueCommandResponse.parseFrom(resp);
assertTrue(commandResponse.hasBinary());
CommandHistoryEntry cmdhist = wsListener.cmdHistoryDataList.poll(3, TimeUnit.SECONDS);
assertNotNull(cmdhist);
CommandId cmdid = cmdhist.getCommandId();
assertEquals("/REFMDB/SUBSYS1/CRITICAL_TC1", cmdid.getCommandName());
assertEquals(6, cmdid.getSequenceNumber());
assertEquals("IntegrationTest", cmdid.getOrigin());
checkNextCmdHistoryAttr(CommandHistoryPublisher.Queue_KEY, "default");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeQueued_KEY, "OK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.TransmissionContraints_KEY, "NOK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeReleased_KEY, "NOK");
checkNextCmdHistoryAttr(CommandHistoryPublisher.AcknowledgeReleased_KEY + "_Message",
"Transmission constraints check failed");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.CommandComplete_KEY, "NOK");
checkNextCmdHistoryAttr(CommandHistoryPublisher.CommandComplete_KEY + "_Message",
"Transmission constraints check failed");
}
@Test
public void testSendCommandDisableTransmissionConstraint() throws Exception {
WebSocketRequest wsr = new WebSocketRequest("cmdhistory", "subscribe");
wsClient.sendRequest(wsr).get(2, TimeUnit.SECONDS);
CommandOptions co = CommandOptions.newBuilder().setDisableTransmissionConstraints(true).build();
IssueCommandRequest cmdreq = getCommand(6, "p1", "2").toBuilder().setCommandOptions(co).build();
byte[] resp = doRealtimeRequest("/commands/REFMDB/SUBSYS1/CRITICAL_TC1", HttpMethod.POST, cmdreq);
IssueCommandResponse commandResponse = IssueCommandResponse.parseFrom(resp);
assertTrue(commandResponse.hasBinary());
CommandHistoryEntry cmdhist = wsListener.cmdHistoryDataList.poll(3, TimeUnit.SECONDS);
assertNotNull(cmdhist);
CommandId cmdid = cmdhist.getCommandId();
assertEquals("/REFMDB/SUBSYS1/CRITICAL_TC1", cmdid.getCommandName());
assertEquals(6, cmdid.getSequenceNumber());
assertEquals("IntegrationTest", cmdid.getOrigin());
checkNextCmdHistoryAttr(CommandHistoryPublisher.Queue_KEY, "default");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeQueued_KEY, "OK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.TransmissionContraints_KEY, "NA");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeReleased_KEY, "OK");
}
@Test
public void testSendCommandSucceedTransmissionConstraint() throws Exception {
WebSocketRequest wsr = new WebSocketRequest("cmdhistory", "subscribe");
wsClient.sendRequest(wsr).get(2, TimeUnit.SECONDS);
IssueCommandRequest cmdreq = getCommand(6, "p1", "2");
byte[] resp = doRealtimeRequest("/commands/REFMDB/SUBSYS1/CRITICAL_TC2", HttpMethod.POST, cmdreq);
IssueCommandResponse commandResponse = IssueCommandResponse.parseFrom(resp);
assertTrue(commandResponse.hasBinary());
CommandHistoryEntry cmdhist = wsListener.cmdHistoryDataList.poll(3, TimeUnit.SECONDS);
assertNotNull(cmdhist);
CommandId cmdid = cmdhist.getCommandId();
assertEquals("/REFMDB/SUBSYS1/CRITICAL_TC2", cmdid.getCommandName());
assertEquals(6, cmdid.getSequenceNumber());
assertEquals("IntegrationTest", cmdid.getOrigin());
checkNextCmdHistoryAttr(CommandHistoryPublisher.Queue_KEY, "default");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeQueued_KEY, "OK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.TransmissionContraints_KEY, "PENDING");
cmdhist = wsListener.cmdHistoryDataList.poll(2, TimeUnit.SECONDS);
assertNull(cmdhist);
Value v = ValueHelper.newValue(true);
restClient.doRequest("/processors/IntegrationTest/realtime/parameters/REFMDB/SUBSYS1/AllowCriticalTC2",
HttpMethod.POST, v).get();
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.TransmissionContraints_KEY, "OK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeReleased_KEY, "OK");
}
=======
>>>>>>>
@Test
public void testSendCommandFailedTransmissionConstraint() throws Exception {
WebSocketRequest wsr = new WebSocketRequest("cmdhistory", "subscribe");
wsClient.sendRequest(wsr).get(2, TimeUnit.SECONDS);
IssueCommandRequest cmdreq = getCommand(6, "p1", "2");
byte[] resp = doRealtimeRequest("/commands/REFMDB/SUBSYS1/CRITICAL_TC1", HttpMethod.POST, cmdreq);
IssueCommandResponse commandResponse = IssueCommandResponse.parseFrom(resp);
assertTrue(commandResponse.hasBinary());
CommandHistoryEntry cmdhist = wsListener.cmdHistoryDataList.poll(3, TimeUnit.SECONDS);
assertNotNull(cmdhist);
CommandId cmdid = cmdhist.getCommandId();
assertEquals("/REFMDB/SUBSYS1/CRITICAL_TC1", cmdid.getCommandName());
assertEquals(6, cmdid.getSequenceNumber());
assertEquals("IntegrationTest", cmdid.getOrigin());
checkNextCmdHistoryAttr(CommandHistoryPublisher.Queue_KEY, "default");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeQueued_KEY, "OK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.TransmissionContraints_KEY, "NOK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeReleased_KEY, "NOK");
checkNextCmdHistoryAttr(CommandHistoryPublisher.AcknowledgeReleased_KEY + "_Message",
"Transmission constraints check failed");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.CommandComplete_KEY, "NOK");
checkNextCmdHistoryAttr(CommandHistoryPublisher.CommandComplete_KEY + "_Message",
"Transmission constraints check failed");
}
@Test
public void testSendCommandDisableTransmissionConstraint() throws Exception {
WebSocketRequest wsr = new WebSocketRequest("cmdhistory", "subscribe");
wsClient.sendRequest(wsr).get(2, TimeUnit.SECONDS);
CommandOptions co = CommandOptions.newBuilder().setDisableTransmissionConstraints(true).build();
IssueCommandRequest cmdreq = getCommand(6, "p1", "2").toBuilder().setCommandOptions(co).build();
byte[] resp = doRealtimeRequest("/commands/REFMDB/SUBSYS1/CRITICAL_TC1", HttpMethod.POST, cmdreq);
IssueCommandResponse commandResponse = IssueCommandResponse.parseFrom(resp);
assertTrue(commandResponse.hasBinary());
CommandHistoryEntry cmdhist = wsListener.cmdHistoryDataList.poll(3, TimeUnit.SECONDS);
assertNotNull(cmdhist);
CommandId cmdid = cmdhist.getCommandId();
assertEquals("/REFMDB/SUBSYS1/CRITICAL_TC1", cmdid.getCommandName());
assertEquals(6, cmdid.getSequenceNumber());
assertEquals("IntegrationTest", cmdid.getOrigin());
checkNextCmdHistoryAttr(CommandHistoryPublisher.Queue_KEY, "default");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeQueued_KEY, "OK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.TransmissionContraints_KEY, "NA");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeReleased_KEY, "OK");
}
@Test
public void testSendCommandSucceedTransmissionConstraint() throws Exception {
WebSocketRequest wsr = new WebSocketRequest("cmdhistory", "subscribe");
wsClient.sendRequest(wsr).get(2, TimeUnit.SECONDS);
IssueCommandRequest cmdreq = getCommand(6, "p1", "2");
byte[] resp = doRealtimeRequest("/commands/REFMDB/SUBSYS1/CRITICAL_TC2", HttpMethod.POST, cmdreq);
IssueCommandResponse commandResponse = IssueCommandResponse.parseFrom(resp);
assertTrue(commandResponse.hasBinary());
CommandHistoryEntry cmdhist = wsListener.cmdHistoryDataList.poll(3, TimeUnit.SECONDS);
assertNotNull(cmdhist);
CommandId cmdid = cmdhist.getCommandId();
assertEquals("/REFMDB/SUBSYS1/CRITICAL_TC2", cmdid.getCommandName());
assertEquals(6, cmdid.getSequenceNumber());
assertEquals("IntegrationTest", cmdid.getOrigin());
checkNextCmdHistoryAttr(CommandHistoryPublisher.Queue_KEY, "default");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeQueued_KEY, "OK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.TransmissionContraints_KEY, "PENDING");
cmdhist = wsListener.cmdHistoryDataList.poll(2, TimeUnit.SECONDS);
assertNull(cmdhist);
Value v = ValueHelper.newValue(true);
restClient.doRequest("/processors/IntegrationTest/realtime/parameters/REFMDB/SUBSYS1/AllowCriticalTC2",
HttpMethod.POST, v).get();
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.TransmissionContraints_KEY, "OK");
checkNextCmdHistoryAttrStatusTime(CommandHistoryPublisher.AcknowledgeReleased_KEY, "OK");
} |
<<<<<<<
public List<GpbExtension> getGpbExtensions() {
return gpbExtensions;
}
static class GpbExtension {
String clazz;
String field;
}
=======
public int getWebSocketMaxFrameLength() {
return maxWsFrameLength;
}
>>>>>>>
public List<GpbExtension> getGpbExtensions() {
return gpbExtensions;
}
public int getWebSocketMaxFrameLength() {
return maxWsFrameLength;
}
static class GpbExtension {
String clazz;
String field;
} |
<<<<<<<
=======
public static final int CONTEXTCALIBRATOR_FIELD_NUMBER = 7;
private java.util.List<org.yamcs.protobuf.Mdb.ContextCalibratorInfo> contextCalibrator_;
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public java.util.List<org.yamcs.protobuf.Mdb.ContextCalibratorInfo> getContextCalibratorList() {
return contextCalibrator_;
}
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public java.util.List<? extends org.yamcs.protobuf.Mdb.ContextCalibratorInfoOrBuilder>
getContextCalibratorOrBuilderList() {
return contextCalibrator_;
}
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public int getContextCalibratorCount() {
return contextCalibrator_.size();
}
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public org.yamcs.protobuf.Mdb.ContextCalibratorInfo getContextCalibrator(int index) {
return contextCalibrator_.get(index);
}
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public org.yamcs.protobuf.Mdb.ContextCalibratorInfoOrBuilder getContextCalibratorOrBuilder(
int index) {
return contextCalibrator_.get(index);
}
private void initFields() {
type_ = org.yamcs.protobuf.Mdb.DataEncodingInfo.Type.BINARY;
littleEndian_ = false;
sizeInBits_ = 0;
encoding_ = "";
defaultCalibrator_ = org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance();
contextCalibrator_ = java.util.Collections.emptyList();
}
>>>>>>>
public static final int CONTEXTCALIBRATOR_FIELD_NUMBER = 7;
private java.util.List<org.yamcs.protobuf.Mdb.ContextCalibratorInfo> contextCalibrator_;
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public java.util.List<org.yamcs.protobuf.Mdb.ContextCalibratorInfo> getContextCalibratorList() {
return contextCalibrator_;
}
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public java.util.List<? extends org.yamcs.protobuf.Mdb.ContextCalibratorInfoOrBuilder>
getContextCalibratorOrBuilderList() {
return contextCalibrator_;
}
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public int getContextCalibratorCount() {
return contextCalibrator_.size();
}
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public org.yamcs.protobuf.Mdb.ContextCalibratorInfo getContextCalibrator(int index) {
return contextCalibrator_.get(index);
}
/**
* <code>repeated .mdb.ContextCalibratorInfo contextCalibrator = 7;</code>
*/
public org.yamcs.protobuf.Mdb.ContextCalibratorInfoOrBuilder getContextCalibratorOrBuilder(
int index) {
return contextCalibrator_.get(index);
}
<<<<<<<
unknownFields.writeTo(output);
=======
for (int i = 0; i < contextCalibrator_.size(); i++) {
output.writeMessage(7, contextCalibrator_.get(i));
}
getUnknownFields().writeTo(output);
>>>>>>>
for (int i = 0; i < contextCalibrator_.size(); i++) {
output.writeMessage(7, contextCalibrator_.get(i));
}
unknownFields.writeTo(output);
<<<<<<<
size += unknownFields.getSerializedSize();
memoizedSize = size;
=======
for (int i = 0; i < contextCalibrator_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, contextCalibrator_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
>>>>>>>
for (int i = 0; i < contextCalibrator_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, contextCalibrator_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
<<<<<<<
this.mergeUnknownFields(other.unknownFields);
onChanged();
=======
if (contextCalibratorBuilder_ == null) {
if (!other.contextCalibrator_.isEmpty()) {
if (contextCalibrator_.isEmpty()) {
contextCalibrator_ = other.contextCalibrator_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureContextCalibratorIsMutable();
contextCalibrator_.addAll(other.contextCalibrator_);
}
onChanged();
}
} else {
if (!other.contextCalibrator_.isEmpty()) {
if (contextCalibratorBuilder_.isEmpty()) {
contextCalibratorBuilder_.dispose();
contextCalibratorBuilder_ = null;
contextCalibrator_ = other.contextCalibrator_;
bitField0_ = (bitField0_ & ~0x00000020);
contextCalibratorBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getContextCalibratorFieldBuilder() : null;
} else {
contextCalibratorBuilder_.addAllMessages(other.contextCalibrator_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
>>>>>>>
if (contextCalibratorBuilder_ == null) {
if (!other.contextCalibrator_.isEmpty()) {
if (contextCalibrator_.isEmpty()) {
contextCalibrator_ = other.contextCalibrator_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureContextCalibratorIsMutable();
contextCalibrator_.addAll(other.contextCalibrator_);
}
onChanged();
}
} else {
if (!other.contextCalibrator_.isEmpty()) {
if (contextCalibratorBuilder_.isEmpty()) {
contextCalibratorBuilder_.dispose();
contextCalibratorBuilder_ = null;
contextCalibrator_ = other.contextCalibrator_;
bitField0_ = (bitField0_ & ~0x00000020);
contextCalibratorBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getContextCalibratorFieldBuilder() : null;
} else {
contextCalibratorBuilder_.addAllMessages(other.contextCalibrator_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
<<<<<<<
public org.yamcs.protobuf.Mdb.CalibratorInfo getDefaultCalibrator() {
if (defaultCalibratorBuilder_ == null) {
return defaultCalibrator_ == null ? org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance() : defaultCalibrator_;
=======
public org.yamcs.protobuf.Mdb.CalibratorInfo getCalibrator() {
if (calibratorBuilder_ == null) {
return calibrator_;
>>>>>>>
public org.yamcs.protobuf.Mdb.CalibratorInfo getCalibrator() {
if (calibratorBuilder_ == null) {
return calibrator_ == null ? org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance() : calibrator_;
<<<<<<<
public Builder mergeDefaultCalibrator(org.yamcs.protobuf.Mdb.CalibratorInfo value) {
if (defaultCalibratorBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010) &&
defaultCalibrator_ != null &&
defaultCalibrator_ != org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance()) {
defaultCalibrator_ =
org.yamcs.protobuf.Mdb.CalibratorInfo.newBuilder(defaultCalibrator_).mergeFrom(value).buildPartial();
=======
public Builder mergeCalibrator(org.yamcs.protobuf.Mdb.CalibratorInfo value) {
if (calibratorBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
calibrator_ != org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance()) {
calibrator_ =
org.yamcs.protobuf.Mdb.CalibratorInfo.newBuilder(calibrator_).mergeFrom(value).buildPartial();
>>>>>>>
public Builder mergeCalibrator(org.yamcs.protobuf.Mdb.CalibratorInfo value) {
if (calibratorBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
calibrator_ != null &&
calibrator_ != org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance()) {
calibrator_ =
org.yamcs.protobuf.Mdb.CalibratorInfo.newBuilder(calibrator_).mergeFrom(value).buildPartial();
<<<<<<<
public Builder clearDefaultCalibrator() {
if (defaultCalibratorBuilder_ == null) {
defaultCalibrator_ = null;
=======
public Builder clearCalibrator() {
if (calibratorBuilder_ == null) {
calibrator_ = org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance();
>>>>>>>
public Builder clearCalibrator() {
if (calibratorBuilder_ == null) {
calibrator_ = null;
<<<<<<<
return defaultCalibrator_ == null ?
org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance() : defaultCalibrator_;
=======
return calibrator_;
>>>>>>>
return calibrator_ == null ?
org.yamcs.protobuf.Mdb.CalibratorInfo.getDefaultInstance() : calibrator_;
<<<<<<<
getDefaultCalibratorFieldBuilder() {
if (defaultCalibratorBuilder_ == null) {
defaultCalibratorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
=======
getCalibratorFieldBuilder() {
if (calibratorBuilder_ == null) {
calibratorBuilder_ = new com.google.protobuf.SingleFieldBuilder<
>>>>>>>
getCalibratorFieldBuilder() {
if (calibratorBuilder_ == null) {
calibratorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.