Change control semantics in transcode settings
Change global transcode enable toggle preference to global disable toggle preference. Change app slection for skipping transcode to app selection for enabling transcode, by default transcoding would be disabled for all apps. Test: Manual, Roboelectric unit tests Change-Id: I44f4d1b24fac70a4560e8b3a12d505bd2da26f20
This commit is contained in:
@@ -22,7 +22,7 @@ import android.os.SystemProperties;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
/**
|
||||
* The controller for the "Enable transcode for all apps" switch on the transcode settings
|
||||
* The controller for the "Disable transcoding for all apps" switch on the transcode settings
|
||||
* screen.
|
||||
*/
|
||||
public class TranscodeGlobalTogglePreferenceController extends TogglePreferenceController {
|
||||
@@ -41,12 +41,12 @@ public class TranscodeGlobalTogglePreferenceController extends TogglePreferenceC
|
||||
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
return SystemProperties.getBoolean(TRANSCODE_ENABLED_PROP_KEY, false);
|
||||
return !SystemProperties.getBoolean(TRANSCODE_ENABLED_PROP_KEY, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setChecked(boolean isChecked) {
|
||||
SystemProperties.set(TRANSCODE_ENABLED_PROP_KEY, String.valueOf(isChecked));
|
||||
SystemProperties.set(TRANSCODE_ENABLED_PROP_KEY, String.valueOf(!isChecked));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user