Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4bc06e3 authored by Christopher Jakob's avatar Christopher Jakob
Browse files

Use correct icon for quicksettings tile

- It will be tinted by the system automatically

refs #31
parent b920f8b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@
        <service
            android:name=".helpers.MyTileService"
            android:label="@string/app_launcher_name"
            android:icon="@mipmap/ic_launcher"
            android:icon="@drawable/img_widget_preview"
            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
            <intent-filter>
                <action android:name="android.service.quicksettings.action.QS_TILE" />
+4 −0
Original line number Diff line number Diff line
package com.simplemobiletools.flashlight.helpers

import android.os.Build
import android.service.quicksettings.Tile
import android.service.quicksettings.TileService
import android.support.annotation.RequiresApi

@@ -8,5 +9,8 @@ import android.support.annotation.RequiresApi
class MyTileService : TileService() {
    override fun onClick() {
        MyCameraImpl.newInstance(this).toggleFlashlight()

        qsTile.state = if (MyCameraImpl.isFlashlightOn) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE
        qsTile.updateTile()
    }
}
 No newline at end of file