Switch off Calendar UI fo regional preferences
- Due to unsupported calendar type in java lib, it may happen unexpected exception. Hence switch off this function till we find a better way to improve. Bug: b/270650444 Test: Manual test. Change-Id: If380dbe5d98b915f3e288eb668df573ef2971ae2
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
package com.android.settings.regionalpreferences;
|
package com.android.settings.regionalpreferences;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.SystemProperties;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
|
||||||
import com.android.settings.core.BasePreferenceController;
|
import com.android.settings.core.BasePreferenceController;
|
||||||
@@ -27,6 +28,8 @@ import java.util.Locale;
|
|||||||
* A controller for the entry of Calendar types' page
|
* A controller for the entry of Calendar types' page
|
||||||
*/
|
*/
|
||||||
public class CalendarTypeController extends BasePreferenceController {
|
public class CalendarTypeController extends BasePreferenceController {
|
||||||
|
private static final String CALENDAR_FEATURE_PROPERTY =
|
||||||
|
"i18n-feature-locale-preference-calendar";
|
||||||
private static final String TAG = CalendarTypeController.class.getSimpleName();
|
private static final String TAG = CalendarTypeController.class.getSimpleName();
|
||||||
public CalendarTypeController(Context context, String preferenceKey) {
|
public CalendarTypeController(Context context, String preferenceKey) {
|
||||||
super(context, preferenceKey);
|
super(context, preferenceKey);
|
||||||
@@ -45,7 +48,8 @@ public class CalendarTypeController extends BasePreferenceController {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getAvailabilityStatus() {
|
public int getAvailabilityStatus() {
|
||||||
return AVAILABLE;
|
return SystemProperties.getBoolean(CALENDAR_FEATURE_PROPERTY, false)
|
||||||
|
? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user