Home: remove notice_main
This commit is contained in:
parent
37fa796303
commit
b5d1942368
@ -56,7 +56,7 @@ dependencies {
|
|||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'androidx.percentlayout:percentlayout:1.0.0'
|
implementation 'androidx.percentlayout:percentlayout:1.0.0'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.1.0-beta01'
|
implementation 'com.google.android.material:material:1.2.0-alpha01'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05'
|
||||||
implementation "androidx.preference:preference:1.1.0"
|
implementation "androidx.preference:preference:1.1.0"
|
||||||
//DNS
|
//DNS
|
||||||
@ -65,7 +65,6 @@ dependencies {
|
|||||||
implementation 'org.minidns:minidns-client:0.3.4'
|
implementation 'org.minidns:minidns-client:0.3.4'
|
||||||
implementation 'com.google.code.gson:gson:2.8.5'
|
implementation 'com.google.code.gson:gson:2.8.5'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.2.0'
|
implementation 'com.squareup.okhttp3:okhttp:4.2.0'
|
||||||
|
|
||||||
//Analytics
|
//Analytics
|
||||||
googleReleaseImplementation 'com.google.firebase:firebase-core:17.2.0'
|
googleReleaseImplementation 'com.google.firebase:firebase-core:17.2.0'
|
||||||
googleReleaseImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
googleReleaseImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||||
|
@ -175,7 +175,6 @@ public class Daedalus extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTerminate() {
|
public void onTerminate() {
|
||||||
Log.d("Daedalus", "onTerminate");
|
|
||||||
super.onTerminate();
|
super.onTerminate();
|
||||||
|
|
||||||
instance = null;
|
instance = null;
|
||||||
@ -242,7 +241,7 @@ public class Daedalus extends Application {
|
|||||||
|
|
||||||
public static void updateShortcut(Context context) {
|
public static void updateShortcut(Context context) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
|
||||||
Log.d("Daedalus", "Updating shortcut");
|
Logger.info("Updating shortcut");
|
||||||
boolean activate = DaedalusVpnService.isActivated();
|
boolean activate = DaedalusVpnService.isActivated();
|
||||||
String notice = activate ? context.getString(R.string.button_text_deactivate) : context.getString(R.string.button_text_activate);
|
String notice = activate ? context.getString(R.string.button_text_deactivate) : context.getString(R.string.button_text_activate);
|
||||||
ShortcutInfo info = new ShortcutInfo.Builder(context, Daedalus.SHORTCUT_ID_ACTIVATE)
|
ShortcutInfo info = new ShortcutInfo.Builder(context, Daedalus.SHORTCUT_ID_ACTIVATE)
|
||||||
|
@ -182,7 +182,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
|||||||
|
|
||||||
private void updateUserInterface(Intent intent) {
|
private void updateUserInterface(Intent intent) {
|
||||||
int launchAction = intent.getIntExtra(LAUNCH_ACTION, LAUNCH_ACTION_NONE);
|
int launchAction = intent.getIntExtra(LAUNCH_ACTION, LAUNCH_ACTION_NONE);
|
||||||
Log.d(TAG, "Updating user interface with Launch Action " + String.valueOf(launchAction));
|
Log.d(TAG, "Updating user interface with Launch Action " + launchAction);
|
||||||
if (launchAction == LAUNCH_ACTION_ACTIVATE) {
|
if (launchAction == LAUNCH_ACTION_ACTIVATE) {
|
||||||
this.activateService();
|
this.activateService();
|
||||||
} else if (launchAction == LAUNCH_ACTION_DEACTIVATE) {
|
} else if (launchAction == LAUNCH_ACTION_DEACTIVATE) {
|
||||||
@ -240,7 +240,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||||
// Handle navigation view item clicks here.
|
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
|
@ -181,7 +181,7 @@ public class DNSTestFragment extends ToolbarFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
testText.append("\n").append(getString(R.string.test_time_used)).append(" ").
|
testText.append("\n").append(getString(R.string.test_time_used)).append(" ").
|
||||||
append(String.valueOf(endTime - startTime)).append(" ms");
|
append(endTime - startTime).append(" ms");
|
||||||
succ = true;
|
succ = true;
|
||||||
}
|
}
|
||||||
} catch (SocketTimeoutException ignored) {
|
} catch (SocketTimeoutException ignored) {
|
||||||
|
@ -49,14 +49,6 @@ public class HomeFragment extends ToolbarFragment {
|
|||||||
updateUserInterface();
|
updateUserInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setUserVisibleHint(boolean isVisibleToUser) {
|
|
||||||
super.setUserVisibleHint(isVisibleToUser);
|
|
||||||
if (isVisibleToUser) {
|
|
||||||
updateUserInterface();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateUserInterface() {
|
private void updateUserInterface() {
|
||||||
Log.d("DMainFragment", "updateInterface");
|
Log.d("DMainFragment", "updateInterface");
|
||||||
Button but = getView().findViewById(R.id.button_activate);
|
Button but = getView().findViewById(R.id.button_activate);
|
||||||
|
@ -44,7 +44,7 @@ public class LogFragment extends ToolbarFragment implements Toolbar.OnMenuItemCl
|
|||||||
|
|
||||||
private void export() {
|
private void export() {
|
||||||
try {
|
try {
|
||||||
String file = Daedalus.logPath + String.valueOf(System.currentTimeMillis()) + ".log";
|
String file = Daedalus.logPath + System.currentTimeMillis() + ".log";
|
||||||
FileWriter fileWriter = new FileWriter(file);
|
FileWriter fileWriter = new FileWriter(file);
|
||||||
fileWriter.write(Logger.getLog());
|
fileWriter.write(Logger.getLog());
|
||||||
fileWriter.close();
|
fileWriter.close();
|
||||||
|
@ -161,7 +161,7 @@ public class TcpProvider extends UdpProvider {
|
|||||||
try {
|
try {
|
||||||
DataInputStream stream = new DataInputStream(dnsSocket.getInputStream());
|
DataInputStream stream = new DataInputStream(dnsSocket.getInputStream());
|
||||||
int length = stream.readUnsignedShort();
|
int length = stream.readUnsignedShort();
|
||||||
Log.d(TAG, "Reading length: " + String.valueOf(length));
|
Log.d(TAG, "Reading length: " + length);
|
||||||
byte[] data = new byte[length];
|
byte[] data = new byte[length];
|
||||||
stream.read(data);
|
stream.read(data);
|
||||||
dnsSocket.close();
|
dnsSocket.close();
|
||||||
|
@ -129,7 +129,7 @@ public class RuleResolver implements Runnable {
|
|||||||
dataIO.close();
|
dataIO.close();
|
||||||
stream.close();
|
stream.close();
|
||||||
|
|
||||||
Logger.info("Loaded " + String.valueOf(count) + " rules");
|
Logger.info("Loaded " + count + " rules");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (mode == MODE_DNSMASQ) {
|
} else if (mode == MODE_DNSMASQ) {
|
||||||
@ -162,7 +162,7 @@ public class RuleResolver implements Runnable {
|
|||||||
dataIO.close();
|
dataIO.close();
|
||||||
stream.close();
|
stream.close();
|
||||||
|
|
||||||
Logger.info("Loaded " + String.valueOf(count) + " rules");
|
Logger.info("Loaded " + count + " rules");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public class DNSServer extends AbstractDNSServer {
|
|||||||
private static int totalId = 0;
|
private static int totalId = 0;
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
private int description = 0;
|
private int description;
|
||||||
|
|
||||||
public DNSServer(String address, int description, int port) {
|
public DNSServer(String address, int description, int port) {
|
||||||
super(address, port);
|
super(address, port);
|
||||||
|
@ -33,15 +33,6 @@
|
|||||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
||||||
android:fontFamily="sans-serif"
|
android:fontFamily="sans-serif"
|
||||||
android:layout_centerHorizontal="true" android:id="@+id/textView_app_name"/>
|
android:layout_centerHorizontal="true" android:id="@+id/textView_app_name"/>
|
||||||
<TextView
|
|
||||||
android:text="@string/notice_main"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/textView_notice"
|
|
||||||
app:layout_marginTopPercent="5%"
|
|
||||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault"
|
|
||||||
android:fontFamily="sans-serif"
|
|
||||||
android:layout_below="@+id/textView_app_name" android:layout_centerHorizontal="true"/>
|
|
||||||
<Button
|
<Button
|
||||||
android:text="@string/button_text_activate"
|
android:text="@string/button_text_activate"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<string name="app_name">Daedalus</string>
|
<string name="app_name">Daedalus</string>
|
||||||
<string name="quick_toggle">开关</string>
|
<string name="quick_toggle">开关</string>
|
||||||
|
|
||||||
<string name="notice_main">世界很大,我要去看看。</string>
|
|
||||||
<string name="notice_activated">已启用 iTXTech Daedalus。</string>
|
<string name="notice_activated">已启用 iTXTech Daedalus。</string>
|
||||||
<string name="notice_start_test">正在测试指定的 DNS 服务器……</string>
|
<string name="notice_start_test">正在测试指定的 DNS 服务器……</string>
|
||||||
<string name="notice_queries">DNS 查询次数:</string>
|
<string name="notice_queries">DNS 查询次数:</string>
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<string name="app_name">Daedalus</string>
|
<string name="app_name">Daedalus</string>
|
||||||
<string name="quick_toggle">开关</string>
|
<string name="quick_toggle">开关</string>
|
||||||
|
|
||||||
<string name="notice_main">世界很大,我要去看看。</string>
|
|
||||||
<string name="notice_activated">已啟動 iTXTech Daedalus。</string>
|
<string name="notice_activated">已啟動 iTXTech Daedalus。</string>
|
||||||
<string name="notice_start_test">正在測試指定的 DNS 伺服器……</string>
|
<string name="notice_start_test">正在測試指定的 DNS 伺服器……</string>
|
||||||
<string name="notice_queries">DNS 查詢次數:</string>
|
<string name="notice_queries">DNS 查詢次數:</string>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<string name="app_name">Daedalus</string>
|
<string name="app_name">Daedalus</string>
|
||||||
<string name="quick_toggle">Toggle</string>
|
<string name="quick_toggle">Toggle</string>
|
||||||
|
|
||||||
<string name="notice_main">See the world outside.</string>
|
|
||||||
<string name="notice_activated">iTXTech Daedalus is activated.</string>
|
<string name="notice_activated">iTXTech Daedalus is activated.</string>
|
||||||
<string name="notice_start_test">Testing specified DNS server…</string>
|
<string name="notice_start_test">Testing specified DNS server…</string>
|
||||||
<string name="notice_queries">DNS query times:</string>
|
<string name="notice_queries">DNS query times:</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user