Strings for error dialog, cleanup
This commit is contained in:
parent
df696ed81e
commit
6419915d5a
@ -270,5 +270,7 @@
|
||||
<string name="root_access_denied_title">Root access denied</string>
|
||||
<string name="root_access_denied_body">Either your Android device is not rooted or you have denied root access for F-Droid.</string>
|
||||
<string name="update_all">Update all</string>
|
||||
|
||||
<string name="installer_error_title">(De-)Installation Error</string>
|
||||
<string name="installer_error_body">The (de-)installation failed. If you are using root access, try disabling this setting!</string>
|
||||
|
||||
</resources>
|
||||
|
@ -981,26 +981,13 @@ public class AppDetails extends ListActivity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* We could probably drop this, and let the PackageReceiver take care of
|
||||
* notifications for us, but I don't think the package receiver
|
||||
* notifications are very instantaneous.
|
||||
*/
|
||||
private void notifyAppChanged(String id) {
|
||||
getContentResolver().notifyChange(AppProvider.getContentUri(id), null);
|
||||
}
|
||||
|
||||
Installer.InstallerCallback myInstallerCallback = new Installer.InstallerCallback() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(final int operation) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.d(TAG, "handling installer onSuccess");
|
||||
|
||||
notifyAppChanged(app.id);
|
||||
|
||||
public void run() {
|
||||
if (operation == Installer.InstallerCallback.OPERATION_INSTALL) {
|
||||
if (downloadHandler != null) {
|
||||
downloadHandler = null;
|
||||
@ -1028,11 +1015,12 @@ public class AppDetails extends ListActivity {
|
||||
@Override
|
||||
public void run() {
|
||||
setProgressBarIndeterminateVisibility(false);
|
||||
|
||||
// TODO
|
||||
|
||||
Log.e(TAG, "Installer aborted with errorCode: " + errorCode);
|
||||
|
||||
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(AppDetails.this);
|
||||
alertBuilder.setTitle("Error");
|
||||
alertBuilder.setMessage("errorCode: " + errorCode);
|
||||
alertBuilder.setTitle(R.string.installer_error_title);
|
||||
alertBuilder.setMessage(R.string.installer_error_title);
|
||||
alertBuilder.setNeutralButton(android.R.string.ok, null);
|
||||
alertBuilder.create().show();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user