From 53738c7b15482e954690ed2ae4a23b75c9835167 Mon Sep 17 00:00:00 2001
From: fanhuitong <981964879@qq.com>
Date: Wed, 29 Jun 2022 19:56:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=BA=9B=E5=A5=A5?=
=?UTF-8?q?=E4=B9=90=E4=BA=91=E6=89=8B=E5=8A=A8=E6=B5=8B=E8=AF=95=E7=9A=84?=
=?UTF-8?q?=E7=AE=A1=E6=8E=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/src/main/AndroidManifest.xml | 142 +++----
.../ttutils/activity/AoleyunTestActivity.java | 189 +++++++++
.../main/res/layout/activity_aoleyun_test.xml | 361 ++++++++++++++++++
3 files changed, 601 insertions(+), 91 deletions(-)
create mode 100644 app/src/main/java/com/tt/ttutils/activity/AoleyunTestActivity.java
create mode 100644 app/src/main/res/layout/activity_aoleyun_test.xml
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 3d725a6..86b475a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -10,31 +10,24 @@
-
-
-
+
-
-
+
-
-
+
-
-
-
+
-
+ android:protectionLevel="signature" />
@@ -43,17 +36,13 @@
-
-
-
+
-
-
+
-
-
+
@@ -67,25 +56,30 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/ImmerseTheme">
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
@@ -137,15 +131,11 @@
-
-
-
+
-
-
+ android:required="false" />
@@ -159,8 +149,7 @@
-
-
+
@@ -179,13 +168,11 @@
-
-
+
-
+ android:process=":xg_vip_service" />
@@ -194,21 +181,17 @@
-
-
+
-
+ android:authorities="com.tt.ttutils.XGVIP_PUSH_AUTH" />
-
+ android:authorities="com.tt.ttutils.TPUSH_PROVIDER" />
-
+ android:exported="true" />
@@ -218,8 +201,7 @@
-
-
+
-
+ android:exported="false" />
-
+ android:value="1500026407" />
-
-
-
+ android:value="AQ6C6W1O19LT" />
-
+ tools:replace="android:exported" />
-
-
+
-
-
+
-
+ android:process=":pushcore" />
-
-
+
-
-
+
-
+ android:exported="true" />
@@ -328,18 +298,14 @@
-
-
+
-
+ android:exported="false" />
-
-
-
+ android:exported="false" />
+
@@ -356,8 +322,7 @@
-
-
+
@@ -365,8 +330,7 @@
-
-
+
-
-
+
-
-
+
-
-
diff --git a/app/src/main/java/com/tt/ttutils/activity/AoleyunTestActivity.java b/app/src/main/java/com/tt/ttutils/activity/AoleyunTestActivity.java
new file mode 100644
index 0000000..5daf1b3
--- /dev/null
+++ b/app/src/main/java/com/tt/ttutils/activity/AoleyunTestActivity.java
@@ -0,0 +1,189 @@
+package com.tt.ttutils.activity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.provider.Settings;
+import android.widget.Button;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.tt.ttutils.R;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+
+public class AoleyunTestActivity extends AppCompatActivity {
+ @BindView(R.id.bt_usb)
+ Button bt_usb;
+ @BindView(R.id.bt_usb_statu)
+ Button bt_usb_statu;
+ @BindView(R.id.bt_usb_charge)
+ Button bt_usb_charge;
+ @BindView(R.id.bt_usb_mtp)
+ Button bt_usb_mtp;
+ @BindView(R.id.bt_usb_midi)
+ Button bt_usb_midi;
+
+ @BindView(R.id.bt_desktop)
+ Button bt_desktop;
+ @BindView(R.id.bt_desktop_statu)
+ Button bt_desktop_statu;
+ @BindView(R.id.bt_desktop_launcher)
+ Button bt_desktop_launcher;
+ @BindView(R.id.bt_desktop_dop2)
+ Button bt_desktop_dop2;
+ @BindView(R.id.bt_desktop_aoleyun)
+ Button bt_desktop_aoleyun;
+
+ @BindView(R.id.bt_sd)
+ Button bt_sd;
+ @BindView(R.id.bt_sd_statu)
+ Button bt_sd_statu;
+ @BindView(R.id.bt_sd_on)
+ Button bt_sd_on;
+ @BindView(R.id.bt_sd_off)
+ Button bt_sd_off;
+
+ @BindView(R.id.bt_developer)
+ Button bt_developer;
+ @BindView(R.id.bt_developer_statu)
+ Button bt_developer_statu;
+ @BindView(R.id.bt_developer_on)
+ Button bt_developer_on;
+ @BindView(R.id.bt_developer_off)
+ Button bt_developer_off;
+
+ @BindView(R.id.bt_navigation)
+ Button bt_navigation;
+ @BindView(R.id.bt_navigation_statu)
+ Button bt_navigation_statu;
+ @BindView(R.id.bt_navigation_on)
+ Button bt_navigation_on;
+ @BindView(R.id.bt_navigation_off)
+ Button bt_navigation_off;
+
+ @BindView(R.id.bt_status)
+ Button bt_status;
+ @BindView(R.id.bt_status_statu)
+ Button bt_status_statu;
+ @BindView(R.id.bt_status_on)
+ Button bt_status_on;
+ @BindView(R.id.bt_status_off)
+ Button bt_status_off;
+
+ @BindView(R.id.bt_hotspot)
+ Button bt_hotspot;
+ @BindView(R.id.bt_hotspot_statu)
+ Button bt_hotspot_statu;
+ @BindView(R.id.bt_hotspot_on)
+ Button bt_hotspot_on;
+ @BindView(R.id.bt_hotspot_off)
+ Button bt_hotspot_off;
+
+ @BindView(R.id.bt_bht)
+ Button bt_bht;
+ @BindView(R.id.bt_bht_statu)
+ Button bt_bht_statu;
+ @BindView(R.id.bt_bht_on)
+ Button bt_bht_on;
+ @BindView(R.id.bt_bht_off)
+ Button bt_bht_off;
+
+ @BindView(R.id.bt_bt_on)
+ Button bt_bt_on;
+ @BindView(R.id.bt_bt_off)
+ Button bt_bt_off;
+ @BindView(R.id.bt_bhtvideo_on)
+ Button bt_bhtvideo_on;
+ @BindView(R.id.bt_bhtvideo_off)
+ Button bt_bhtvideo_off;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_aoleyun_test);
+ ButterKnife.bind(this);
+ init();
+ }
+
+ private void init() {
+ bt_usb_charge.setOnClickListener(view -> {
+ Intent usbIntent = new Intent("aole_action_usb_usb_charge").setPackage("com.android.settings");
+ sendBroadcast(usbIntent);
+ });
+ bt_usb_mtp.setOnClickListener(view -> {
+ Intent usbIntent = new Intent("aole_action_usb_usb_mtp").setPackage("com.android.settings");
+ sendBroadcast(usbIntent);
+ });
+ bt_usb_midi.setOnClickListener(view -> {
+ Intent usbIntent = new Intent("aole_action_usb_usb_midi").setPackage("com.android.settings");
+ sendBroadcast(usbIntent);
+ });
+
+ bt_desktop_launcher.setOnClickListener(view -> {
+ Intent intent = new Intent("setDefaultLauncher");
+ intent.putExtra("package", "com.android.launcher3");
+ intent.putExtra("className", "com.android.launcher3.Launcher");
+ intent.setPackage("com.android.settings");
+ sendBroadcast(intent);
+ });
+ bt_desktop_dop2.setOnClickListener(view -> {
+ Intent intent = new Intent("setDefaultLauncher");
+ intent.putExtra("package", "com.aoleyunos.dop2");
+ intent.putExtra("className", "com.aoleyunos.dop2.activity.main.MainActivity");
+ intent.setPackage("com.android.settings");
+ sendBroadcast(intent);
+ });
+ bt_desktop_aoleyun.setOnClickListener(view -> {
+ Intent intent = new Intent("setDefaultLauncher");
+ intent.putExtra("package", "com.aoleyunos.os");
+ intent.putExtra("className", "com.aoleyunos.os.Launcher");
+ intent.setPackage("com.android.settings");
+ sendBroadcast(intent);
+ });
+
+ bt_sd_on.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_sdcard_forbid_on", 0));
+ bt_sd_off.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_sdcard_forbid_on", 1));
+
+ bt_developer_on.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_Developeroptions", 0));
+ bt_developer_off.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_Developeroptions", 1));
+
+ bt_navigation_on.setOnClickListener(view -> {
+ Intent navIntent = new Intent("aole_show_NavigationBar").setPackage("com.android.systemui");
+ sendBroadcast(navIntent);
+ });
+ bt_navigation_off.setOnClickListener(view -> {
+ Intent navIntent = new Intent("aole_hide_NavigationBar").setPackage("com.android.systemui");
+ sendBroadcast(navIntent);
+ });
+
+ bt_status_on.setOnClickListener(view -> {
+ Intent navIntent = new Intent("aole_show_statusBar").setPackage("com.android.systemui");
+ sendBroadcast(navIntent);
+ });
+ bt_status_off.setOnClickListener(view -> {
+ Intent navIntent = new Intent("aole_hide_statusBar").setPackage("com.android.systemui");
+ sendBroadcast(navIntent);
+ });
+
+ bt_hotspot_on.setOnClickListener(view -> {
+ Settings.System.putInt(getContentResolver(), "aole_hotspot_forbid_on", 0);
+ });
+ bt_hotspot_off.setOnClickListener(view -> {
+ Settings.System.putInt(getContentResolver(), "aole_hotspot_forbid_on", 1);
+ Intent intent = new Intent("aole_hotspot_close");
+ intent.setPackage("com.android.settings");
+ sendStickyBroadcast(intent);
+ });
+
+ bt_bht_on.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_bht_forbid_on", 0));
+ bt_bht_off.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_bht_forbid_on", 1));
+ bt_bt_on.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_bt_forbid_on", 0));
+ bt_bt_off.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_bt_forbid_on", 1));
+ bt_bhtvideo_on.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_bhtvideo_forbid_on", 0));
+ bt_bhtvideo_off.setOnClickListener(view -> Settings.System.putInt(getContentResolver(), "aole_bhtvideo_forbid_on", 1));
+
+
+ }
+}
diff --git a/app/src/main/res/layout/activity_aoleyun_test.xml b/app/src/main/res/layout/activity_aoleyun_test.xml
new file mode 100644
index 0000000..b3e75b7
--- /dev/null
+++ b/app/src/main/res/layout/activity_aoleyun_test.xml
@@ -0,0 +1,361 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file