Skip to content

Commit 4a62b8e

Browse files
committed
catlog
1 parent e4b0752 commit 4a62b8e

File tree

238 files changed

+8676
-8880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+8676
-8880
lines changed

.idea/modules.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

androidlogcat/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ android {
1717
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1818
}
1919
}
20-
dataBinding.enabled = true
2120
}
2221

2322

@@ -26,7 +25,4 @@ dependencies {
2625
compile "com.android.support:recyclerview-v7:$android_support_version"
2726
compile "com.android.support:support-annotations:$android_support_version"
2827
compile "com.android.support:design:$android_support_version"
29-
compile "com.android.support:support-v13:$android_support_version"
30-
compile 'com.afollestad.material-dialogs:commons:0.9.4.6'
31-
compile project(':materialprogressbar')
3228
}
Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,68 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.pluscubed.logcat">
3+
package="com.nolanlawson.logcat">
44

5-
<uses-permission android:name="android.permission.INTERNET"/>
6-
<uses-permission android:name="android.permission.READ_LOGS"/>
7-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
8-
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
5+
<application>
6+
<activity
7+
android:name=".LogcatActivity"
8+
android:configChanges="keyboard|keyboardHidden|orientation"
9+
android:label="Logcat"
10+
android:windowSoftInputMode="stateHidden">
11+
</activity>
912

10-
<application
11-
android:allowBackup="true">
1213

1314
<activity
14-
android:name=".ui.LogcatActivity"
15-
android:configChanges="screenSize|orientation"
16-
android:launchMode="singleTop">
15+
android:name=".ShowRecordLogDialogActivity"
16+
android:theme="@android:style/Theme.Dialog"/>
17+
18+
<activity android:name=".SettingsActivity"/>
19+
20+
<service android:name=".LogcatRecordingService"/>
21+
22+
<service android:name=".CrazyLoggerService"/>
23+
24+
<receiver android:name=".RecordingWidgetProvider">
25+
26+
<intent-filter>
27+
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
28+
<data android:scheme="catlog_widget"/>
29+
</intent-filter>
30+
31+
<intent-filter>
32+
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
33+
</intent-filter>
34+
35+
<intent-filter>
36+
<action android:name="com.nolanlawson.logcat.action.RECORD_OR_STOP"/>
37+
<data android:scheme="catlog_widget"/>
38+
</intent-filter>
39+
40+
1741
<meta-data
18-
android:name="android.app.shortcuts"
19-
android:resource="@xml/shortcuts"/>
20-
</activity>
42+
android:name="android.appwidget.provider"
43+
android:resource="@xml/recording_widget_info"/>
44+
</receiver>
2145

22-
<activity android:name=".ui.RecordLogDialogActivity"/>
23-
<activity android:name=".ui.SettingsActivity"/>
24-
<service android:name="com.pluscubed.logcat.LogcatRecordingService"/>
25-
<service android:name="com.pluscubed.logcat.CrazyLoggerService"/>
2646

2747
</application>
28-
</manifest>
48+
49+
<uses-sdk
50+
android:minSdkVersion="3"
51+
android:targetSdkVersion="10"/>
52+
53+
<uses-permission android:name="android.permission.READ_LOGS"/>
54+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
55+
56+
<!-- 'Sup Koush: https://plus.google.com/103583939320326217147/posts/T9xnMJEnzf1 -->
57+
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
58+
59+
<supports-screens
60+
android:anyDensity="true"
61+
android:largeScreens="true"
62+
android:normalScreens="true"
63+
android:resizeable="true"
64+
android:smallScreens="true"
65+
android:xlargeScreens="true"/>
66+
67+
68+
</manifest>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
package com.nolanlawson.logcat;
2+
3+
import java.util.Date;
4+
5+
import android.app.IntentService;
6+
import android.content.Intent;
7+
import android.os.IBinder;
8+
9+
import com.nolanlawson.logcat.util.UtilLogger;
10+
11+
/**
12+
* just writes a bunch of logs. to be used during debugging and testing.
13+
* @author nolan
14+
*
15+
*/
16+
public class CrazyLoggerService extends IntentService {
17+
18+
private static final long INTERVAL = 300;
19+
20+
private static UtilLogger log = new UtilLogger(CrazyLoggerService.class);
21+
22+
private boolean kill = false;
23+
24+
public CrazyLoggerService() {
25+
super("CrazyLoggerService");
26+
}
27+
28+
protected void onHandleIntent(Intent intent) {
29+
30+
log.d("onHandleIntent()");
31+
32+
while (!kill) {
33+
34+
try {
35+
Thread.sleep(INTERVAL);
36+
} catch (InterruptedException e) {
37+
log.e(e, "error");
38+
}
39+
Date date = new Date();
40+
log.i("Log message " + date + " " + (date.getTime() % 1000));
41+
42+
}
43+
44+
}
45+
46+
@Override
47+
public void onStart(Intent intent, int startId) {
48+
super.onStart(intent, startId);
49+
}
50+
51+
@Override
52+
public IBinder onBind(Intent intent) {
53+
return null;
54+
}
55+
56+
@Override
57+
public void onDestroy() {
58+
super.onDestroy();
59+
kill = true;
60+
}
61+
62+
}

0 commit comments

Comments
 (0)