diff options
author | Alan Viverette <alanv@google.com> | 2017-04-05 10:00:01 -0400 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2017-04-14 11:15:50 -0400 |
commit | 51efddbd3bb304de2dd47fa8cd1114ac555958bb (patch) | |
tree | 0c9fe7e2f2263b7757ec8e96084d1f2701119c47 /tests/RenderThreadTest | |
parent | 5879aa4b03f17753eca3419a13db0ecbf2075e62 (diff) |
Remove unnecessary casts on calls to findViewById
Just frameworks/ this time. More paths to come.
Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
Diffstat (limited to 'tests/RenderThreadTest')
-rw-r--r-- | tests/RenderThreadTest/src/com/example/renderthread/MainActivity.java | 4 | ||||
-rw-r--r-- | tests/RenderThreadTest/src/com/example/renderthread/SubActivity.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/RenderThreadTest/src/com/example/renderthread/MainActivity.java b/tests/RenderThreadTest/src/com/example/renderthread/MainActivity.java index ee4c8343d9e9..241206d8919b 100644 --- a/tests/RenderThreadTest/src/com/example/renderthread/MainActivity.java +++ b/tests/RenderThreadTest/src/com/example/renderthread/MainActivity.java @@ -43,7 +43,7 @@ public class MainActivity extends Activity implements OnItemClickListener { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - ListView lv = (ListView) findViewById(android.R.id.list); + ListView lv = findViewById(android.R.id.list); lv.setDrawSelectorOnTop(true); lv.setAdapter(new SimpleAdapter(this, SAMPLES, R.layout.item_layout, new String[] { KEY_NAME }, @@ -55,7 +55,7 @@ public class MainActivity extends Activity implements OnItemClickListener { @Override protected void onResume() { super.onResume(); - ListView lv = (ListView) findViewById(android.R.id.list); + ListView lv = findViewById(android.R.id.list); for (int i = 0; i < lv.getChildCount(); i++) { lv.getChildAt(i).animate().translationY(0).setDuration(DURATION); } diff --git a/tests/RenderThreadTest/src/com/example/renderthread/SubActivity.java b/tests/RenderThreadTest/src/com/example/renderthread/SubActivity.java index 892cbae50560..22fc6911f7df 100644 --- a/tests/RenderThreadTest/src/com/example/renderthread/SubActivity.java +++ b/tests/RenderThreadTest/src/com/example/renderthread/SubActivity.java @@ -39,7 +39,7 @@ public class SubActivity extends Activity { @Override protected void onResume() { super.onResume(); - ViewGroup container = (ViewGroup) findViewById(R.id.my_container); + ViewGroup container = findViewById(R.id.my_container); int dx = getWindowManager().getDefaultDisplay().getWidth(); for (int i = 0; i < container.getChildCount(); i++) { View child = container.getChildAt(i); |