Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android/src/org/adblockplus/android/Utils.java

Issue 29351744: Issue 4399 - Add WebView inheritor with ad blocking (Closed)
Patch Set: changed packages, now using AdblockEngine (original ABPEngine), improved demo app Created Oct. 25, 2016, 11:20 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: libadblockplus-android/src/org/adblockplus/android/Utils.java
diff --git a/libadblockplus-android/src/org/adblockplus/android/Utils.java b/libadblockplus-android/src/org/adblockplus/android/Utils.java
deleted file mode 100644
index 47b7c663c5adb7458de98766d84eacf463d4af0e..0000000000000000000000000000000000000000
--- a/libadblockplus-android/src/org/adblockplus/android/Utils.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2016 Eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package org.adblockplus.android;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-import org.adblockplus.libadblockplus.JsValue;
-import org.adblockplus.libadblockplus.Subscription;
-import org.apache.commons.lang.StringUtils;
-
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.Intent;
-
-public final class Utils
-{
- private Utils()
- {
- //
- }
-
- public static String getTag(final Class<?> clazz)
- {
- return clazz.getSimpleName();
- }
-
- public static String capitalizeString(final String s)
- {
- if (s == null || s.length() == 0)
- {
- return "";
- }
-
- final char first = s.charAt(0);
-
- return Character.isUpperCase(first) ? s : Character.toUpperCase(first) + s.substring(1);
- }
-
- public static void appendRawTextFile(final Context context, final StringBuilder text, final int id)
- {
- try
- {
- final BufferedReader buf = new BufferedReader(new InputStreamReader(context.getResources().openRawResource(id)));
-
- try
- {
- String line;
- while ((line = buf.readLine()) != null)
- {
- text.append(line);
- text.append('\n');
- }
- }
- finally
- {
- buf.close();
- }
-
- }
- catch (final Exception e)
- {
- // Ignored for now
- }
- }
-}

Powered by Google App Engine
This is Rietveld