Having air travelled with my eldest on a regular basis since he was 5 weeks old I can honestly say that the worst time on a plane with a child of c.22months is just after boarding. My best advice is don't board the plane until you absolutely have to because then you have less time actually confined, seat belt on, in your seat with a stroppy little toddler who wants to get off your lap and walk and explore!
Check with your airline to see if you can pre-book bulkhead seats. These have a little bit more leg space because it's where the sky cots for babies usually go. This means that after take off you set toddler down on the floor with crayons, paper and a few toys and let them get on with it and give your lap a rest.
I wouldn't advise sweets or chocolates because a) they make a horrible mess...usually down you and b) sickness!! I used to take lots of sticks of carrots, breadsticks, plain biscuits, small pieces of fruit and currants and then place them in one of those tupperware type containers with lots of separate compartments. This used to go down a treat. I would advise plain water too for obvious reasons.
If you're toddler is still in nappies you will have a problem with any 'dirty' change because the nappy change thingies in the loos are not big enough for a child of that age. Your fellow passengers will not appreciate your bundle of joy if a 'dirty' change has to be done in the cabin so take a pill of 'devil may care and I don't give a wotsit' before you leave!
If they do have problems on take off and landing with the ears then if they still have a dummy/soother, let them suck on it. Alternatively give them water in one of those bottles that has a cyclist type top, so that they can suck on that like a bottle or teat. Sucking alleviates the pressure build up and therefore the pain.
If you were not able to get a bulkhead seat then get to check in early and see if you can get one then or ask if there are any spare seats on the flight. If there are then ask to have an empty seat to be assigned next to you. You will have to keep junior on your lap for take off and landing but in flight, they can have their own seat.
Let junior run a round and wear themselves out whilst still in the terminal building. You never know, they might just sleep all the way through the flight and then you can watch those pigs flying past :-)