Merge branch 'master' into 'master'
UI bug fixes This fixes a couple of crasher issues with the UI. And also a small change to allow Eclipse to find the reference files for Android Support.
This commit is contained in:
commit
a8f9483684
8
libs/android-support-v4.jar.properties
Normal file
8
libs/android-support-v4.jar.properties
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
src=android-support-v4.jar
|
||||||
|
doc=/opt/android-sdk/docs/reference
|
||||||
|
# The String value of 'doc' is handed straight to `new java.io.File()` so it
|
||||||
|
# is not possible to use variables. Therefore, change "/opt/android-sdk" to
|
||||||
|
# the path to your Android SDK, i.e. the value of $ANDROID_HOME or ${sdk.dir}
|
||||||
|
#
|
||||||
|
# Here's the relevant source:
|
||||||
|
# https://android-review.googlesource.com/#/c/35702/3/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/project/LibraryClasspathContainerInitializer.java
|
@ -27,8 +27,8 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="48dip"
|
android:layout_width="48dip"
|
||||||
android:layout_height="48dip"
|
android:layout_height="48dip"
|
||||||
android:layout_marginLeft="?android:attr/listPreferredItemPaddingStart"
|
android:layout_marginLeft="?android:attr/listPreferredItemPaddingLeft"
|
||||||
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
|
android:layout_marginStart="?android:attr/listPreferredItemPaddingLeft"
|
||||||
android:layout_marginTop="6dip"
|
android:layout_marginTop="6dip"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
@ -41,8 +41,8 @@
|
|||||||
android:id="@+id/application_label"
|
android:id="@+id/application_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="?android:attr/listPreferredItemPaddingStart"
|
android:layout_marginLeft="?android:attr/listPreferredItemPaddingLeft"
|
||||||
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
|
android:layout_marginStart="?android:attr/listPreferredItemPaddingLeft"
|
||||||
android:layout_marginTop="6dip"
|
android:layout_marginTop="6dip"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||||
|
|
||||||
|
@ -327,4 +327,8 @@ public class FDroidApp extends Application {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isLocalRepoServiceRunnig() {
|
||||||
|
return localRepoServiceIsBound;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ public class LocalRepoActivity extends Activity {
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
resetNetworkInfo();
|
resetNetworkInfo();
|
||||||
|
setRepoSwitchChecked(FDroidApp.isLocalRepoServiceRunnig());
|
||||||
|
|
||||||
LocalBroadcastManager.getInstance(this).registerReceiver(onWifiChange,
|
LocalBroadcastManager.getInstance(this).registerReceiver(onWifiChange,
|
||||||
new IntentFilter(WifiStateChangeService.BROADCAST));
|
new IntentFilter(WifiStateChangeService.BROADCAST));
|
||||||
@ -71,6 +72,9 @@ public class LocalRepoActivity extends Activity {
|
|||||||
|
|
||||||
// start repo by default
|
// start repo by default
|
||||||
FDroidApp.startLocalRepoService(LocalRepoActivity.this);
|
FDroidApp.startLocalRepoService(LocalRepoActivity.this);
|
||||||
|
// reset the timer if viewing this Activity again
|
||||||
|
if (stopTimer != null)
|
||||||
|
stopTimer.cancel();
|
||||||
// automatically turn off after 15 minutes
|
// automatically turn off after 15 minutes
|
||||||
stopTimer = new Timer();
|
stopTimer = new Timer();
|
||||||
stopTimer.schedule(new TimerTask() {
|
stopTimer.schedule(new TimerTask() {
|
||||||
@ -139,7 +143,7 @@ public class LocalRepoActivity extends Activity {
|
|||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
MenuInflater inflater = getMenuInflater();
|
MenuInflater inflater = getMenuInflater();
|
||||||
inflater.inflate(R.menu.local_repo_activity, menu);
|
inflater.inflate(R.menu.local_repo_activity, menu);
|
||||||
if (Build.VERSION.SDK_INT < 11) // TODO remove after including appcompat-v7
|
if (Build.VERSION.SDK_INT < 14) // TODO remove after including appcompat-v7
|
||||||
menu.findItem(R.id.menu_setup_repo).setVisible(false);
|
menu.findItem(R.id.menu_setup_repo).setVisible(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ import java.util.Locale;
|
|||||||
public class RepoListFragment extends ListFragment
|
public class RepoListFragment extends ListFragment
|
||||||
implements LoaderManager.LoaderCallbacks<Cursor>, RepoAdapter.EnabledListener {
|
implements LoaderManager.LoaderCallbacks<Cursor>, RepoAdapter.EnabledListener {
|
||||||
|
|
||||||
|
private AlertDialog addRepoDialog;
|
||||||
private static final String DEFAULT_NEW_REPO_TEXT = "https://";
|
private static final String DEFAULT_NEW_REPO_TEXT = "https://";
|
||||||
private final int ADD_REPO = 1;
|
private final int ADD_REPO = 1;
|
||||||
private final int UPDATE_REPOS = 2;
|
private final int UPDATE_REPOS = 2;
|
||||||
@ -309,7 +310,7 @@ public class RepoListFragment extends ListFragment
|
|||||||
|
|
||||||
private void showAddRepo(String newAddress, String newFingerprint) {
|
private void showAddRepo(String newAddress, String newFingerprint) {
|
||||||
View view = getLayoutInflater(null).inflate(R.layout.addrepo, null);
|
View view = getLayoutInflater(null).inflate(R.layout.addrepo, null);
|
||||||
final AlertDialog alrt = new AlertDialog.Builder(getActivity()).setView(view).create();
|
addRepoDialog = new AlertDialog.Builder(getActivity()).setView(view).create();
|
||||||
final EditText uriEditText = (EditText) view.findViewById(R.id.edit_uri);
|
final EditText uriEditText = (EditText) view.findViewById(R.id.edit_uri);
|
||||||
final EditText fingerprintEditText = (EditText) view.findViewById(R.id.edit_fingerprint);
|
final EditText fingerprintEditText = (EditText) view.findViewById(R.id.edit_fingerprint);
|
||||||
|
|
||||||
@ -322,9 +323,9 @@ public class RepoListFragment extends ListFragment
|
|||||||
? RepoProvider.Helper.findByAddress(getActivity(), newAddress)
|
? RepoProvider.Helper.findByAddress(getActivity(), newAddress)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
alrt.setIcon(android.R.drawable.ic_menu_add);
|
addRepoDialog.setIcon(android.R.drawable.ic_menu_add);
|
||||||
alrt.setTitle(getString(R.string.repo_add_title));
|
addRepoDialog.setTitle(getString(R.string.repo_add_title));
|
||||||
alrt.setButton(DialogInterface.BUTTON_POSITIVE,
|
addRepoDialog.setButton(DialogInterface.BUTTON_POSITIVE,
|
||||||
getString(R.string.repo_add_add),
|
getString(R.string.repo_add_add),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -344,7 +345,7 @@ public class RepoListFragment extends ListFragment
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
alrt.setButton(DialogInterface.BUTTON_NEGATIVE,
|
addRepoDialog.setButton(DialogInterface.BUTTON_NEGATIVE,
|
||||||
getString(R.string.cancel),
|
getString(R.string.cancel),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -352,7 +353,7 @@ public class RepoListFragment extends ListFragment
|
|||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
alrt.show();
|
addRepoDialog.show();
|
||||||
|
|
||||||
final TextView overwriteMessage = (TextView) view.findViewById(R.id.overwrite_message);
|
final TextView overwriteMessage = (TextView) view.findViewById(R.id.overwrite_message);
|
||||||
overwriteMessage.setVisibility(View.GONE);
|
overwriteMessage.setVisibility(View.GONE);
|
||||||
@ -361,8 +362,8 @@ public class RepoListFragment extends ListFragment
|
|||||||
positiveAction = PositiveAction.ADD_NEW;
|
positiveAction = PositiveAction.ADD_NEW;
|
||||||
} else {
|
} else {
|
||||||
// found the address in the DB of existing repos
|
// found the address in the DB of existing repos
|
||||||
final Button addButton = alrt.getButton(DialogInterface.BUTTON_POSITIVE);
|
final Button addButton = addRepoDialog.getButton(DialogInterface.BUTTON_POSITIVE);
|
||||||
alrt.setTitle(R.string.repo_exists);
|
addRepoDialog.setTitle(R.string.repo_exists);
|
||||||
overwriteMessage.setVisibility(View.VISIBLE);
|
overwriteMessage.setVisibility(View.VISIBLE);
|
||||||
if (newFingerprint != null)
|
if (newFingerprint != null)
|
||||||
newFingerprint = newFingerprint.toUpperCase(Locale.ENGLISH);
|
newFingerprint = newFingerprint.toUpperCase(Locale.ENGLISH);
|
||||||
@ -375,7 +376,7 @@ public class RepoListFragment extends ListFragment
|
|||||||
// this entry already exists and is not enabled, offer to enable
|
// this entry already exists and is not enabled, offer to enable
|
||||||
// it
|
// it
|
||||||
if (repo.inuse) {
|
if (repo.inuse) {
|
||||||
alrt.dismiss();
|
addRepoDialog.dismiss();
|
||||||
Toast.makeText(getActivity(), R.string.repo_exists_and_enabled,
|
Toast.makeText(getActivity(), R.string.repo_exists_and_enabled,
|
||||||
Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
@ -439,6 +440,7 @@ public class RepoListFragment extends ListFragment
|
|||||||
*/
|
*/
|
||||||
private void finishedAddingRepo() {
|
private void finishedAddingRepo() {
|
||||||
changed = true;
|
changed = true;
|
||||||
|
addRepoDialog = null;
|
||||||
if (isImportingRepo) {
|
if (isImportingRepo) {
|
||||||
getActivity().setResult(Activity.RESULT_OK);
|
getActivity().setResult(Activity.RESULT_OK);
|
||||||
getActivity().finish();
|
getActivity().finish();
|
||||||
|
@ -86,7 +86,6 @@ public class SelectLocalAppsFragment extends ListFragment
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
|
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
|
||||||
Log.i("SelectLocalAppsFragment", "ViewBinder " + columnIndex);
|
|
||||||
if (columnIndex == cursor.getColumnIndex(InstalledAppProvider.DataColumns.APP_ID)) {
|
if (columnIndex == cursor.getColumnIndex(InstalledAppProvider.DataColumns.APP_ID)) {
|
||||||
String packageName = cursor.getString(columnIndex);
|
String packageName = cursor.getString(columnIndex);
|
||||||
TextView textView = (TextView) view.findViewById(R.id.package_name);
|
TextView textView = (TextView) view.findViewById(R.id.package_name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user