Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

cleanup

  • Loading branch information...
commit e38a8037d9dc427ecbfcd31e0a943b88299067b1 1 parent fe9ff7b
Roman Birg authored
7 src/com/aokp/swagpapers/Preview.java
@@ -93,9 +93,7 @@ public void onLoaded(ImageView imageView, Drawable loadedDrawable, String url,
93 93 File f = new File(WallpaperActivity.getSvDir(getApplicationContext()));
94 94 Log.i(TAG, "Check for external SD: " + f.getAbsolutePath());
95 95 if (f.isDirectory() && f.exists()) {
96   - Log.i(TAG, "FNV folder exists");
97 96 } else {
98   - Log.i(TAG, "FNV folder does not exist. Creating...");
99 97 f.mkdirs();
100 98 }
101 99
@@ -107,7 +105,6 @@ public void onClick(View v) {
107 105 s.setOnClickListener(new View.OnClickListener() {
108 106
109 107 public void onClick(View v) {
110   - // TODO Auto-generated method stub
111 108 new StoreFileAsync().execute(link);
112 109 }
113 110 });
@@ -179,8 +176,6 @@ protected Dialog onCreateDialog(int id) {
179 176 }
180 177 }
181 178
182   - // Downloads the wallpaper in Async with a dialog
183   - // This one just sets the wallpaper
184 179 class DownloadFileAsync extends AsyncTask<String, String, String> {
185 180
186 181 @SuppressWarnings("deprecation")
@@ -219,8 +214,6 @@ protected void onProgressUpdate(String... progress) {
219 214
220 215 }
221 216
222   - // Downloads the wallpaper in Async with a dialog
223   - // This one saves the wallpaper
224 217 class StoreFileAsync extends AsyncTask<String, String, String> {
225 218
226 219 @SuppressWarnings("deprecation")
77 src/com/aokp/swagpapers/Vote.java
... ... @@ -1,77 +0,0 @@
1   -package com.aokp.swagpapers;
2   -
3   -import android.app.ActionBar;
4   -import android.app.AlertDialog;
5   -import android.content.DialogInterface;
6   -import android.content.SharedPreferences;
7   -import android.os.Bundle;
8   -import android.view.KeyEvent;
9   -import android.view.Menu;
10   -import android.view.MenuItem;
11   -
12   -public class Vote extends WallpaperActivity {
13   -
14   - @Override
15   - public void onCreate(Bundle savedInstanceState) {
16   - super.onCreate(savedInstanceState);
17   - setContentView(R.layout.activity_vote);
18   -
19   - ActionBar bar = getActionBar();
20   - bar.setTitle(R.string.wars);
21   - bar.setDisplayHomeAsUpEnabled(true);
22   -
23   - SharedPreferences s = getPreferences(MODE_PRIVATE);
24   - SharedPreferences.Editor e = s.edit();
25   - Boolean run = s.getBoolean("firstRun", false);
26   - if (run != true) {
27   - aboutDialog();
28   - e.putBoolean("firstRun", true);
29   - e.commit();
30   - }
31   - }
32   -
33   - public void aboutDialog() {
34   - AlertDialog.Builder b = new AlertDialog.Builder(this);
35   - b.setTitle(R.string.wars);
36   - b.setMessage("Choose the next wallpaper to be added to FNV Wallpapers.\n\n" +
37   - "Every week, two wallpapers will be selected. All you have to do is choose which one you want to see in FNV Wallpapers!\n\n" +
38   - "After four new wallpapers have been choosen, they will appear in the app.");
39   - b.setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {
40   -
41   - public void onClick(DialogInterface dialog, int which) {
42   - // TODO Auto-generated method stub
43   - dialog.cancel();
44   - }
45   - });
46   - b.create();
47   - b.show();
48   - }
49   - @Override
50   - public boolean onCreateOptionsMenu(Menu menu) {
51   - getMenuInflater().inflate(R.menu.activity_vote, menu);
52   - return true;
53   - }
54   -
55   - @Override
56   - public boolean onOptionsItemSelected(MenuItem item) {
57   - // Handle item selection
58   - switch (item.getItemId()) {
59   - case android.R.id.home:
60   - finish();
61   - return true;
62   - case R.id.about:
63   - aboutDialog();
64   - return true;
65   - default:
66   - return super.onOptionsItemSelected(item);
67   - }
68   - }
69   -
70   - @Override
71   - public boolean onKeyDown (int keyCode, KeyEvent event) {
72   - if (keyCode == KeyEvent.KEYCODE_BACK) {
73   - finish();
74   - }
75   - return super.onKeyDown(keyCode, event);
76   - }
77   -}
5 src/com/aokp/swagpapers/WallpaperActivity.java
@@ -249,19 +249,14 @@ protected Button getPreviousButton() {
249 249
250 250 @Override
251 251 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
252   - inflater.inflate(R.menu.activity_wallpaper, menu);
253 252 super.onCreateOptionsMenu(menu, inflater);
254 253 }
255 254
256 255 public boolean onOptionsItemSelected(MenuItem item) {
257   - // Handle item selection
258 256 switch (item.getItemId()) {
259 257 case R.id.jump:
260 258 jumpTo();
261 259 return true;
262   - case R.id.vote:
263   - Intent v = new Intent(mActivity, Vote.class);
264   - startActivity(v);
265 260 default:
266 261 return super.onOptionsItemSelected(item);
267 262 }

0 comments on commit e38a803

Please sign in to comment.
Something went wrong with that request. Please try again.