universal7885: SamsungParts: Match latest source changes

This commit is contained in:
Soo-Hwan Na 2021-11-19 20:00:15 +09:00 committed by roynatech2544
commit 1d39eb76e8
No known key found for this signature in database
GPG key ID: 9675C32163D88D30
10 changed files with 29 additions and 122 deletions

View file

@ -17,21 +17,6 @@
android:theme="@style/CustomOptionsTheme"
android:fullBackupOnly="true"
android:allowBackup="true">
<receiver
android:name=".BootReceiver"
android:defaultToDeviceProtectedStorage="true"
android:directBootAware="true"
android:enabled="true"
android:exported="true">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="com.android.settings.action.EXTRA_SETTINGS" />
</intent-filter>
</receiver>
<activity
android:name=".DeviceSettingsActivity"
android:exported="true"
@ -64,7 +49,6 @@
android:name="com.eurekateam.samsungextras.speaker.ClearSpeakerActivity"
android:exported="true"
android:label="@string/clear_speaker_title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
@ -74,7 +58,6 @@
android:name="com.eurekateam.samsungextras.flashlight.FlashLightActivity"
android:exported="true"
android:label="@string/flashlight_title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
@ -100,18 +83,7 @@
</intent-filter>
</activity>
<service
android:name=".SamsungPartsTile"
android:enabled="true"
android:icon="@drawable/ic_device"
android:label="@string/advanced_settings"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
android:exported="true">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE"/>
</intent-filter>
</service>
<service
android:name=".DolbyTile"
android:name=".dolby.DolbyTile"
android:enabled="true"
android:icon="@drawable/ic_speaker_cleaner_icon"
android:label="@string/dolby_title"
@ -122,11 +94,11 @@
</intent-filter>
</service>
<service
android:name=".FPSInfoService"
android:name=".fps.FPSInfoService"
android:exported="false">
</service>
<service
android:name=".FPSTileService"
android:name=".fps.FPSTileService"
android:icon="@drawable/ic_fps_info"
android:label="@string/fps_info_title"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"

View file

@ -13,7 +13,7 @@ extern "C"
JNIEXPORT void JNICALL
Java_com_eurekateam_samsungextras_interfaces_GPU_setGPU(JNIEnv *env, jclass clazz, jint enable) {
android::sp<IGpu> service = IGpu::getService();
if (enable == 1){
if (enable == 1){
service->setGpuWritable(Enable::ENABLE);
}else{
service->setGpuWritable(Enable::DISABLE);

View file

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z" />
</vector>

View file

@ -15,5 +15,7 @@
<color name="disabled_text_color">#66000000</color>
<color name="homepage_parts_background">#FFFF6700</color>
<color name="red">#FF0000</color>
<color name="green">#00FF00</color>
<color name="blue">#0000FF</color>
</resources>

View file

@ -20,7 +20,6 @@
<!-- Display category -->
<string name="display_category">Display</string>
<!-- FPS Info -->
<string name="fps_info_title">FPS info overlay</string>
<string name="fps_info_summary">Show overlay with current frames per second</string>
@ -48,9 +47,6 @@
<string name="dolby_profile_game_1">Game 1 Profile</string>
<string name="dolby_profile_game_2">Game 2 Profile</string>
<string name="dolby_profile_special_audio">Special Audio Profile</string>
<!-- Eureka Kernel features category -->
<string name="eureka_kernel_features">Eureka Kernel Features</string>
@ -62,8 +58,13 @@
Use this feature to adjust low or high flashlight brightness. Ranges from 0 to 10.</string>
<!-- GPU Category -->
<string name="gpu_category">GPU</string>
<string name="misc_category">Misc</string>
<!-- Inout Devices Settings -->
<string name="input_ctrl_title">Input Devices Control</string>
<string name="input_ctrl_summary">Control sensor\'s power. Can be used to save battery.</string>
<string name="input_ctrl_description">Manage Sensor\'s Power here.
If you are really low on battery, perhaps this settings can help</string>
<!-- GPU TMU -->
<string name="gpuexynos_title">Exynos GPU (Mali) Throttling</string>
<string name="gpuexynos_summary">Disable/Enable GPU Throttling</string>

View file

@ -49,8 +49,8 @@
</Preference>
</PreferenceCategory>
<PreferenceCategory
android:key="gpu"
android:title="@string/gpu_category">
android:key="misc"
android:title="@string/misc_category">
<SwitchPreference
android:key="gpuexynos_settings"
android:title="@string/gpuexynos_title"
@ -69,7 +69,7 @@
android:persistent="true">
<intent
android:action="android.intent.action.MAIN"
android:targetClass="com.eurekateam.samsungextras.fastcharge.FastChargeActivity"
android:targetClass="com.eurekateam.samsungextras.battery.BatteryActivity"
android:targetPackage="com.eurekateam.samsungextras" />
</Preference>

View file

@ -1,42 +0,0 @@
/*
* Copyright (C) 2020 The Xiaomi-SM6250 Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.eurekateam.samsungextras
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import androidx.preference.PreferenceManager
import com.eurekateam.samsungextras.fps.FPSInfoService
import com.eurekateam.samsungextras.interfaces.GPU
import com.eurekateam.samsungextras.main.DeviceSettings
class BootReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
if (intent.action.equals(Intent.ACTION_BOOT_COMPLETED, ignoreCase = true)) {
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context)
val fpsenabled = sharedPrefs.getBoolean(DeviceSettings.PREF_KEY_FPS_INFO, false)
if (fpsenabled) {
context.startService(Intent(context, FPSInfoService::class.java))
}
val gpuenabled = sharedPrefs.getBoolean(DeviceSettings.PREF_GPUEXYNOS, true)
if (gpuenabled) {
GPU.GPU = 1
}else{
GPU.GPU = 0
}
}
}
}

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.eurekateam.samsungextras.main
package com.eurekateam.samsungextras
import android.content.Intent
import android.os.Bundle
@ -22,7 +22,6 @@ import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.PreferenceManager
import androidx.preference.SwitchPreference
import com.eurekateam.samsungextras.R
import com.eurekateam.samsungextras.battery.BatteryActivity
import com.eurekateam.samsungextras.flashlight.FlashLightActivity
import com.eurekateam.samsungextras.fps.FPSInfoService

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.eurekateam.samsungextras.main
package com.eurekateam.samsungextras
import android.os.Bundle
import android.view.MenuItem

View file

@ -1,36 +0,0 @@
/*
* Copyright (C) 2013 The OmniROM Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.eurekateam.samsungextras
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import androidx.preference.PreferenceManager
import com.eurekateam.samsungextras.fps.FPSInfoService
import com.eurekateam.samsungextras.main.DeviceSettings
class Startup : BroadcastReceiver() {
override fun onReceive(context: Context, bootintent: Intent) {
val enabled: Boolean
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context)
enabled = sharedPrefs.getBoolean(DeviceSettings.PREF_KEY_FPS_INFO, false)
if (enabled) {
context.startService(Intent(context, FPSInfoService::class.java))
}
}
}