-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Mahmud0808/shizuku
Add rootless theming support using Shizuku
- Loading branch information
Showing
44 changed files
with
1,157 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
app/src/main/aidl/com/drdisagree/colorblendr/service/IShizukuConnection.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.drdisagree.colorblendr.service; | ||
|
||
interface IShizukuConnection { | ||
void destroy() = 16777114; | ||
void exit() = 1; | ||
void applyFabricatedColors(String jsonString) = 2; | ||
void removeFabricatedColors() = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
app/src/main/java/com/drdisagree/colorblendr/extension/ThemeOverlayPackage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.drdisagree.colorblendr.extension; | ||
|
||
import static com.drdisagree.colorblendr.common.Const.MONET_SEED_COLOR; | ||
import static com.drdisagree.colorblendr.common.Const.MONET_STYLE_ORIGINAL_NAME; | ||
|
||
import android.graphics.Color; | ||
import android.util.Log; | ||
|
||
import com.drdisagree.colorblendr.config.RPrefs; | ||
import com.drdisagree.colorblendr.utils.ColorUtil; | ||
|
||
import org.json.JSONObject; | ||
|
||
public class ThemeOverlayPackage { | ||
|
||
private static final String TAG = ThemeOverlayPackage.class.getSimpleName(); | ||
private static final String THEME_STYLE = "android.theme.customization.theme_style"; | ||
private static final String COLOR_SOURCE = "android.theme.customization.color_source"; | ||
private static final String SYSTEM_PALETTE = "android.theme.customization.system_palette"; | ||
|
||
public static JSONObject getThemeCustomizationOverlayPackages() { | ||
JSONObject object = new JSONObject(); | ||
|
||
try { | ||
object.putOpt( | ||
THEME_STYLE, | ||
RPrefs.getString(MONET_STYLE_ORIGINAL_NAME, "TONAL_SPOT") | ||
); | ||
object.putOpt(COLOR_SOURCE, "preset"); | ||
object.putOpt( | ||
SYSTEM_PALETTE, | ||
ColorUtil.intToHexColorNoHash(RPrefs.getInt(MONET_SEED_COLOR, Color.BLUE)) | ||
); | ||
} catch (Exception e) { | ||
Log.e(TAG, "getThemeCustomizationOverlayPackages:", e); | ||
} | ||
|
||
return object; | ||
} | ||
} |
Oops, something went wrong.