Indonesia is always Independent in its foreign policy. We treat China as friend as well and not targeting China. Actually Iran depends on China and this is why your government dont criticize Uigyur treatment there while Indonesia do make action over the issue directly into China foreign minister, right in front of his nose, direct contact. We also summon their Ambassador to bring explanation about the situation in Xin Jiang.
The reason we are close to USA is because our partnership to fight communism in the past ( where for this case we bring soldiers to invade East Timor and also to Malaysia to fight their communism insurgency together with Malaysian armed force) and also due to SCS issue as we know China stated that 9 dash line is their territory. Not only it is related to our direct interest since their 9 dash line enroching our Natuna Sea EEZ, but also as defacto ASEAN leader and regional power in SEA since several ASEAN countries get effected by China nine dash line.
Indonesia can be against USA interest in many issues, particularly Palestine. Indonesia also refuse to give USA the permanent refueling base for their Navy while Singapore and Malaysia give it to USA.
Indonesia opposes US military base in Subic and Clark, Philippine during 1990's, where US finally leave and during SBY leadership we are also opposing their military base in Darwin, Australia.
This is just one example where are against US interest in relation with Palestinian issues
----------------------------------------------------
Indonesia also get attack financially by Jew Soros in 1997 and we were under US and British defense military equipment embargo since 1995-2005.
The period of 1998-2004 is actually a financial and political transformation of Indonesia if you see the history. The period is very critical and make Indonesia get much stronger than before in term of economy, internal politics, and unity among our ethnics and political powers ( Nasionalist, Nationalist religious, Islamist ).