Loading AndroidManifest.xml +1 −2 Original line number Diff line number Diff line Loading @@ -1981,8 +1981,7 @@ </activity> <activity android:name=".development.AppPicker" android:label="@string/select_application" android:theme="@android:style/Theme.DeviceDefault.Light.Dialog" /> android:label="@string/select_application" /> <activity android:name=".development.DSULoader" android:label="Select DSU Package" Loading src/com/android/settings/development/AppPicker.java +21 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.os.Build; import android.os.Bundle; import android.os.Process; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; Loading Loading @@ -54,6 +55,7 @@ public class AppPicker extends ListActivity { @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); getActionBar().setDisplayHomeAsUpEnabled(true); mPermissionName = getIntent().getStringExtra(EXTRA_REQUESTIING_PERMISSION); mDebuggableOnly = getIntent().getBooleanExtra(EXTRA_DEBUGGABLE, false); Loading @@ -67,6 +69,15 @@ public class AppPicker extends ListActivity { } } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { handleBackPressed(); return true; } return super.onOptionsItemSelected(item); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { MyApplicationInfo app = mAdapter.getItem(position); Loading @@ -76,6 +87,15 @@ public class AppPicker extends ListActivity { finish(); } private void handleBackPressed() { if (getFragmentManager().getBackStackEntryCount() > 1) { super.onBackPressed(); } else { setResult(RESULT_CANCELED); finish(); } } class MyApplicationInfo { ApplicationInfo info; CharSequence label; Loading Loading @@ -162,6 +182,7 @@ public class AppPicker extends ListActivity { holder.summary.setText(""); } holder.disabled.setVisibility(View.GONE); holder.widget.setVisibility(View.GONE); return convertView; } } Loading src/com/android/settings/development/AppViewHolder.java +2 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ public class AppViewHolder { public ImageView appIcon; public TextView summary; public TextView disabled; public View widget; static public AppViewHolder createOrRecycle(LayoutInflater inflater, View convertView) { if (convertView == null) { Loading @@ -45,6 +46,7 @@ public class AppViewHolder { holder.appIcon = convertView.findViewById(android.R.id.icon); holder.summary = convertView.findViewById(android.R.id.summary); holder.disabled = convertView.findViewById(R.id.appendix); holder.widget = convertView.findViewById(android.R.id.widget_frame); convertView.setTag(holder); return holder; } else { Loading Loading
AndroidManifest.xml +1 −2 Original line number Diff line number Diff line Loading @@ -1981,8 +1981,7 @@ </activity> <activity android:name=".development.AppPicker" android:label="@string/select_application" android:theme="@android:style/Theme.DeviceDefault.Light.Dialog" /> android:label="@string/select_application" /> <activity android:name=".development.DSULoader" android:label="Select DSU Package" Loading
src/com/android/settings/development/AppPicker.java +21 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.os.Build; import android.os.Bundle; import android.os.Process; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; Loading Loading @@ -54,6 +55,7 @@ public class AppPicker extends ListActivity { @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); getActionBar().setDisplayHomeAsUpEnabled(true); mPermissionName = getIntent().getStringExtra(EXTRA_REQUESTIING_PERMISSION); mDebuggableOnly = getIntent().getBooleanExtra(EXTRA_DEBUGGABLE, false); Loading @@ -67,6 +69,15 @@ public class AppPicker extends ListActivity { } } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { handleBackPressed(); return true; } return super.onOptionsItemSelected(item); } @Override protected void onListItemClick(ListView l, View v, int position, long id) { MyApplicationInfo app = mAdapter.getItem(position); Loading @@ -76,6 +87,15 @@ public class AppPicker extends ListActivity { finish(); } private void handleBackPressed() { if (getFragmentManager().getBackStackEntryCount() > 1) { super.onBackPressed(); } else { setResult(RESULT_CANCELED); finish(); } } class MyApplicationInfo { ApplicationInfo info; CharSequence label; Loading Loading @@ -162,6 +182,7 @@ public class AppPicker extends ListActivity { holder.summary.setText(""); } holder.disabled.setVisibility(View.GONE); holder.widget.setVisibility(View.GONE); return convertView; } } Loading
src/com/android/settings/development/AppViewHolder.java +2 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ public class AppViewHolder { public ImageView appIcon; public TextView summary; public TextView disabled; public View widget; static public AppViewHolder createOrRecycle(LayoutInflater inflater, View convertView) { if (convertView == null) { Loading @@ -45,6 +46,7 @@ public class AppViewHolder { holder.appIcon = convertView.findViewById(android.R.id.icon); holder.summary = convertView.findViewById(android.R.id.summary); holder.disabled = convertView.findViewById(R.id.appendix); holder.widget = convertView.findViewById(android.R.id.widget_frame); convertView.setTag(holder); return holder; } else { Loading