Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 String version; | 43 String version; |
44 try | 44 try |
45 { | 45 { |
46 final PackageInfo info = context.getPackageManager().getPackageInfo(contex t.getPackageName(), 0); | 46 final PackageInfo info = context.getPackageManager().getPackageInfo(contex t.getPackageName(), 0); |
47 version = info.versionName + "." + info.versionCode; | 47 version = info.versionName + "." + info.versionCode; |
48 } catch (NameNotFoundException e) | 48 } catch (NameNotFoundException e) |
49 { | 49 { |
50 Log.e(TAG, "Failed to get the application version number", e); | 50 Log.e(TAG, "Failed to get the application version number", e); |
51 version = "0"; | 51 version = "0"; |
52 } | 52 } |
53 final String applicationVersion = String.valueOf(VERSION.SDK_INT); | 53 final String sdkVersion = String.valueOf(VERSION.SDK_INT); |
Wladimir Palant
2013/11/17 06:31:06
Shouldn't this be called sdkVersion?
Felix Dahlke
2013/11/18 15:42:35
Done.
| |
54 final String locale = context.getResources().getConfiguration().locale.toStr ing(); | 54 final String locale = context.getResources().getConfiguration().locale.toStr ing(); |
55 final boolean developmentBuild = !context.getResources().getBoolean(R.bool.d ef_release); | 55 final boolean developmentBuild = !context.getResources().getBoolean(R.bool.d ef_release); |
56 initialize(basePath, version, applicationVersion, locale, developmentBuild); | 56 initialize(basePath, version, sdkVersion, locale, developmentBuild); |
57 } | 57 } |
58 | 58 |
59 public void onFilterChanged(String url, String status, long time) | 59 public void onFilterChanged(String url, String status, long time) |
60 { | 60 { |
61 context.sendBroadcast(new Intent(AdblockPlus.BROADCAST_SUBSCRIPTION_STATUS). putExtra("url", url).putExtra("status", status).putExtra("time", time)); | 61 context.sendBroadcast(new Intent(AdblockPlus.BROADCAST_SUBSCRIPTION_STATUS). putExtra("url", url).putExtra("status", status).putExtra("time", time)); |
62 } | 62 } |
63 | 63 |
64 /** | 64 /** |
65 * Called when update event occurred. | 65 * Called when update event occurred. |
66 * @param url Update download address | 66 * @param url Update download address |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 | 132 |
133 Notification notification = builder.getNotification(); | 133 Notification notification = builder.getNotification(); |
134 return notification; | 134 return notification; |
135 } | 135 } |
136 | 136 |
137 static | 137 static |
138 { | 138 { |
139 System.loadLibrary("abpEngine"); | 139 System.loadLibrary("abpEngine"); |
140 } | 140 } |
141 } | 141 } |
LEFT | RIGHT |