迁移仓库
This commit is contained in:
@@ -11,6 +11,7 @@ import retrofit2.http.GET;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.PUT;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface ApiService {
|
||||
@@ -24,6 +25,8 @@ public interface ApiService {
|
||||
@GET("api/system/applicationConf")
|
||||
Observable<Result<DataInfo>> geUrlNew(@Query("userId") int userId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 上传通讯录
|
||||
*/
|
||||
|
||||
@@ -58,7 +58,10 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
@@ -638,8 +641,10 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.isEmpty(dataInfo.getUrl())) {
|
||||
|
||||
MainActivity.saveString(MainActivity2.this, "base_url", dataInfo.getUrl());
|
||||
webView.loadUrl(dataInfo.getUrl());
|
||||
|
||||
}
|
||||
shareUrl = dataInfo.getDownloadUrl();
|
||||
String link = dataInfo.getLinkConfig();
|
||||
@@ -718,6 +723,7 @@ public class MainActivity2 extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void checkUpdate(String url) {
|
||||
new AppUpdater(this, url).start();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -50,6 +51,11 @@ public class NotifyListActivity extends AppCompatActivity {
|
||||
setContentView(R.layout.activity_notifylist);
|
||||
messageInfoItem = (MessageInfo) getIntent().getSerializableExtra("message");
|
||||
findViewById(R.id.back_iv).setOnClickListener(view -> finish());
|
||||
|
||||
findViewById(R.id.title_tvs).setOnClickListener(view -> {
|
||||
Toast.makeText(NotifyListActivity.this,MainActivity.getString(NotifyListActivity.this,"version_name",""),Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
|
||||
recyclerView = findViewById(R.id.recycler_nofity);
|
||||
manager = new LinearLayoutManager(this);
|
||||
recyclerView.setLayoutManager(manager);
|
||||
|
||||
39
base/src/main/java/com/web/base/PingUtils.java
Normal file
39
base/src/main/java/com/web/base/PingUtils.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package com.web.base;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2026/1/16 15:30
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class PingUtils {
|
||||
|
||||
/**
|
||||
* 执行 ping 命令
|
||||
* @param address 域名或IP
|
||||
* @return 返回执行结果
|
||||
*/
|
||||
public static String ping(String address) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
try {
|
||||
// -c 4 表示执行4次
|
||||
Process process = Runtime.getRuntime().exec("ping -c 4 " + address);
|
||||
BufferedReader reader = new BufferedReader(
|
||||
new InputStreamReader(process.getInputStream()));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
result.append(line).append("\n");
|
||||
}
|
||||
reader.close();
|
||||
process.destroy();
|
||||
} catch (Exception e) {
|
||||
result.append("Ping失败: ").append(e.getMessage());
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/top_vvvv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:background="@color/white"
|
||||
android:visibility="visible">
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
android:id="@+id/back_iv"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_action_back" />
|
||||
|
||||
@@ -27,6 +28,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:id="@+id/title_tvs"
|
||||
android:text="@string/app_notify_title"
|
||||
android:textColor="@color/dialog_bg"
|
||||
android:textSize="16sp" />
|
||||
@@ -36,7 +38,8 @@
|
||||
android:id="@+id/recycler_nofity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/top_vvvv" />
|
||||
android:layout_below="@+id/top_vvvv"
|
||||
android:layout_marginTop="1dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user