Skip to content

Commit

Permalink
Merge pull request #27 from one-signal/class_name_conflict_fix_and_ta…
Browse files Browse the repository at this point in the history
…rget_manifest_entry

Fixed class name conflict with RootTools and target manifest entry.
  • Loading branch information
jkasten2 committed Mar 2, 2016
2 parents b7a4401 + 1ef27f0 commit 24517ca
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 28 deletions.
Binary file modified OneSignalSDK.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions OneSignalSDK/onesignal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ android {
buildToolsVersion "23.0.2"

defaultConfig {
minSdkVersion 10
targetSdkVersion 23
minSdkVersion 9
consumerProguardFiles 'consumer-proguard-rules.pro'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@
import android.os.SystemClock;
import android.util.Log;

import com.stericson.RootTools.internal.RootToolsInternalMethods;

import com.onesignal.OneSignalDbContract.NotificationTable;

public class OneSignal {
Expand Down Expand Up @@ -155,7 +153,7 @@ public void init() {
private static TrackGooglePurchase trackGooglePurchase;
private static TrackAmazonPurchase trackAmazonPurchase;

public static final String VERSION = "020102";
public static final String VERSION = "020103";

private static AdvertisingIdentifierProvider mainAdIdProvider = new AdvertisingIdProviderGPS();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
/**
* This file is part of the RootTools Project: http://code.google.com/p/roottools/
*
*
* Copyright (c) 2012 Stephen Erickson, Chris Ravenscroft, Dominik Schuermann, Adam Shanks
*
*
* This code is dual-licensed under the terms of the Apache License Version 2.0 and
* the terms of the General Public License (GPL) Version 2.
* You may use this code according to either of these licenses as is most appropriate
* for your project on a case-by-case basis.
*
*
* The terms of each license can be found at:
*
*
* * http://www.apache.org/licenses/LICENSE-2.0
* * http://www.gnu.org/licenses/gpl-2.0.txt
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under these Licenses is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See each License for the specific language governing permissions and
* limitations under that License.
*/

package com.stericson.RootTools.internal;
// Namespaced in com.onesignal to prevent class name conflicts if app developer includes the full RootTools library.
package com.onesignal;

public class RootToolsInternalMethods {
public static boolean isRooted() {
boolean found = false;
if (!found) {
String[] places = { "/sbin/", "/system/bin/", "/system/xbin/",
"/data/local/xbin/", "/data/local/bin/",
"/system/sd/xbin/", "/system/bin/failsafe/", "/data/local/" };
for (String where : places) {
if (new java.io.File(where + "su").exists()) {
found = true;
break;
}
}
}

return found;
}
class RootToolsInternalMethods {
static boolean isRooted() {
String[] places = {"/sbin/", "/system/bin/", "/system/xbin/",
"/data/local/xbin/", "/data/local/bin/",
"/system/sd/xbin/", "/system/bin/failsafe/",
"/data/local/"};

for (String where : places) {
if (new java.io.File(where + "su").exists())
return true;
}

return false;
}
}

0 comments on commit 24517ca

Please sign in to comment.