Skip to content

Commit b5d1942

Browse files
committed
Home: remove notice_main
1 parent 37fa796 commit b5d1942

File tree

13 files changed

+9
-32
lines changed

13 files changed

+9
-32
lines changed

app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dependencies {
5656
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
5757
implementation 'androidx.percentlayout:percentlayout:1.0.0'
5858
implementation 'androidx.cardview:cardview:1.0.0'
59-
implementation 'com.google.android.material:material:1.1.0-beta01'
59+
implementation 'com.google.android.material:material:1.2.0-alpha01'
6060
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05'
6161
implementation "androidx.preference:preference:1.1.0"
6262
//DNS
@@ -65,7 +65,6 @@ dependencies {
6565
implementation 'org.minidns:minidns-client:0.3.4'
6666
implementation 'com.google.code.gson:gson:2.8.5'
6767
implementation 'com.squareup.okhttp3:okhttp:4.2.0'
68-
6968
//Analytics
7069
googleReleaseImplementation 'com.google.firebase:firebase-core:17.2.0'
7170
googleReleaseImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

app/src/main/java/org/itxtech/daedalus/Daedalus.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ public static boolean isDarkTheme() {
175175

176176
@Override
177177
public void onTerminate() {
178-
Log.d("Daedalus", "onTerminate");
179178
super.onTerminate();
180179

181180
instance = null;
@@ -242,7 +241,7 @@ public static void deactivateService(Context context) {
242241

243242
public static void updateShortcut(Context context) {
244243
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
245-
Log.d("Daedalus", "Updating shortcut");
244+
Logger.info("Updating shortcut");
246245
boolean activate = DaedalusVpnService.isActivated();
247246
String notice = activate ? context.getString(R.string.button_text_deactivate) : context.getString(R.string.button_text_activate);
248247
ShortcutInfo info = new ShortcutInfo.Builder(context, Daedalus.SHORTCUT_ID_ACTIVATE)

app/src/main/java/org/itxtech/daedalus/activity/MainActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private void updateMainButton(int id) {
182182

183183
private void updateUserInterface(Intent intent) {
184184
int launchAction = intent.getIntExtra(LAUNCH_ACTION, LAUNCH_ACTION_NONE);
185-
Log.d(TAG, "Updating user interface with Launch Action " + String.valueOf(launchAction));
185+
Log.d(TAG, "Updating user interface with Launch Action " + launchAction);
186186
if (launchAction == LAUNCH_ACTION_ACTIVATE) {
187187
this.activateService();
188188
} else if (launchAction == LAUNCH_ACTION_DEACTIVATE) {
@@ -240,7 +240,6 @@ private void updateUserInterface(Intent intent) {
240240

241241
@Override
242242
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
243-
// Handle navigation view item clicks here.
244243
int id = item.getItemId();
245244

246245
switch (id) {

app/src/main/java/org/itxtech/daedalus/fragment/DNSTestFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private StringBuilder testServer(DnsQuery dnsQuery, Record.TYPE type, AbstractDN
181181
}
182182
}
183183
testText.append("\n").append(getString(R.string.test_time_used)).append(" ").
184-
append(String.valueOf(endTime - startTime)).append(" ms");
184+
append(endTime - startTime).append(" ms");
185185
succ = true;
186186
}
187187
} catch (SocketTimeoutException ignored) {

app/src/main/java/org/itxtech/daedalus/fragment/HomeFragment.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ public void checkStatus() {
4949
updateUserInterface();
5050
}
5151

52-
@Override
53-
public void setUserVisibleHint(boolean isVisibleToUser) {
54-
super.setUserVisibleHint(isVisibleToUser);
55-
if (isVisibleToUser) {
56-
updateUserInterface();
57-
}
58-
}
59-
6052
private void updateUserInterface() {
6153
Log.d("DMainFragment", "updateInterface");
6254
Button but = getView().findViewById(R.id.button_activate);

app/src/main/java/org/itxtech/daedalus/fragment/LogFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private void refresh() {
4444

4545
private void export() {
4646
try {
47-
String file = Daedalus.logPath + String.valueOf(System.currentTimeMillis()) + ".log";
47+
String file = Daedalus.logPath + System.currentTimeMillis() + ".log";
4848
FileWriter fileWriter = new FileWriter(file);
4949
fileWriter.write(Logger.getLog());
5050
fileWriter.close();

app/src/main/java/org/itxtech/daedalus/provider/TcpProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private void handleRawDnsResponse(IpPacket parsedPacket, Socket dnsSocket) {
161161
try {
162162
DataInputStream stream = new DataInputStream(dnsSocket.getInputStream());
163163
int length = stream.readUnsignedShort();
164-
Log.d(TAG, "Reading length: " + String.valueOf(length));
164+
Log.d(TAG, "Reading length: " + length);
165165
byte[] data = new byte[length];
166166
stream.read(data);
167167
dnsSocket.close();

app/src/main/java/org/itxtech/daedalus/util/RuleResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private void load() {
129129
dataIO.close();
130130
stream.close();
131131

132-
Logger.info("Loaded " + String.valueOf(count) + " rules");
132+
Logger.info("Loaded " + count + " rules");
133133
}
134134
}
135135
} else if (mode == MODE_DNSMASQ) {
@@ -162,7 +162,7 @@ private void load() {
162162
dataIO.close();
163163
stream.close();
164164

165-
Logger.info("Loaded " + String.valueOf(count) + " rules");
165+
Logger.info("Loaded " + count + " rules");
166166
}
167167
}
168168
}

app/src/main/java/org/itxtech/daedalus/util/server/DNSServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class DNSServer extends AbstractDNSServer {
1919
private static int totalId = 0;
2020

2121
private String id;
22-
private int description = 0;
22+
private int description;
2323

2424
public DNSServer(String address, int description, int port) {
2525
super(address, port);

app/src/main/res/layout/fragment_main.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@
3333
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
3434
android:fontFamily="sans-serif"
3535
android:layout_centerHorizontal="true" android:id="@+id/textView_app_name"/>
36-
<TextView
37-
android:text="@string/notice_main"
38-
android:layout_width="wrap_content"
39-
android:layout_height="wrap_content"
40-
android:id="@+id/textView_notice"
41-
app:layout_marginTopPercent="5%"
42-
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
43-
android:fontFamily="sans-serif"
44-
android:layout_below="@+id/textView_app_name" android:layout_centerHorizontal="true"/>
4536
<Button
4637
android:text="@string/button_text_activate"
4738
android:textSize="15sp"

0 commit comments

Comments
 (0)