1
1
/**
2
2
* This file is part of the RootTools Project: http://code.google.com/p/roottools/
3
- *
3
+ *
4
4
* Copyright (c) 2012 Stephen Erickson, Chris Ravenscroft, Dominik Schuermann, Adam Shanks
5
- *
5
+ *
6
6
* This code is dual-licensed under the terms of the Apache License Version 2.0 and
7
7
* the terms of the General Public License (GPL) Version 2.
8
8
* You may use this code according to either of these licenses as is most appropriate
9
9
* for your project on a case-by-case basis.
10
- *
10
+ *
11
11
* The terms of each license can be found at:
12
- *
12
+ *
13
13
* * http://www.apache.org/licenses/LICENSE-2.0
14
14
* * http://www.gnu.org/licenses/gpl-2.0.txt
15
- *
15
+ *
16
16
* Unless required by applicable law or agreed to in writing, software
17
17
* distributed under these Licenses is distributed on an "AS IS" BASIS,
18
18
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
19
* See each License for the specific language governing permissions and
20
20
* limitations under that License.
21
21
*/
22
22
23
- package com .stericson .RootTools .internal ;
23
+ // Namespaced in com.onesignal to prevent class name conflicts if app developer includes the full RootTools library.
24
+ package com .onesignal ;
24
25
25
- public class RootToolsInternalMethods {
26
- public static boolean isRooted () {
27
- boolean found = false ;
28
- if (!found ) {
29
- String [] places = { "/sbin/" , "/system/bin/" , "/system/xbin/" ,
30
- "/data/local/xbin/" , "/data/local/bin/" ,
31
- "/system/sd/xbin/" , "/system/bin/failsafe/" , "/data/local/" };
32
- for (String where : places ) {
33
- if (new java .io .File (where + "su" ).exists ()) {
34
- found = true ;
35
- break ;
36
- }
37
- }
38
- }
39
-
40
- return found ;
41
- }
26
+ class RootToolsInternalMethods {
27
+ static boolean isRooted () {
28
+ String [] places = {"/sbin/" , "/system/bin/" , "/system/xbin/" ,
29
+ "/data/local/xbin/" , "/data/local/bin/" ,
30
+ "/system/sd/xbin/" , "/system/bin/failsafe/" ,
31
+ "/data/local/" };
32
+
33
+ for (String where : places ) {
34
+ if (new java .io .File (where + "su" ).exists ())
35
+ return true ;
36
+ }
37
+
38
+ return false ;
39
+ }
42
40
}
0 commit comments