2024-01-10 18:54:00 +01:00
|
|
|
/* Copyright (C) 2019-2024 Andreas Shimokawa, José Rebelo, Petr Vaněk
|
2019-04-21 21:18:08 +02:00
|
|
|
|
|
|
|
This file is part of Gadgetbridge.
|
|
|
|
|
|
|
|
Gadgetbridge is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Gadgetbridge 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 Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
2024-01-10 18:54:00 +01:00
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
2019-04-21 21:18:08 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.activities.devicesettings;
|
|
|
|
|
|
|
|
import androidx.preference.PreferenceFragmentCompat;
|
|
|
|
|
2023-07-27 00:08:13 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.activities.AbstractSettingsActivityV2;
|
2019-04-21 21:18:08 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
|
|
|
|
2023-07-27 00:08:13 +02:00
|
|
|
public class DeviceSettingsActivity extends AbstractSettingsActivityV2 {
|
2022-06-19 16:03:37 +02:00
|
|
|
public static final String MENU_ENTRY_POINT = "MENU_ENTRY_POINT";
|
2019-04-21 21:18:08 +02:00
|
|
|
|
2022-06-19 16:03:37 +02:00
|
|
|
public enum MENU_ENTRY_POINTS {
|
|
|
|
DEVICE_SETTINGS,
|
|
|
|
AUTH_SETTINGS,
|
|
|
|
APPLICATION_SETTINGS
|
|
|
|
}
|
2019-04-21 21:18:08 +02:00
|
|
|
|
|
|
|
@Override
|
2023-07-27 00:08:13 +02:00
|
|
|
protected String fragmentTag() {
|
|
|
|
return DeviceSpecificSettingsFragment.FRAGMENT_TAG;
|
2023-07-23 23:27:11 +02:00
|
|
|
}
|
|
|
|
|
2022-06-04 00:07:36 +02:00
|
|
|
@Override
|
2023-07-27 00:08:13 +02:00
|
|
|
protected PreferenceFragmentCompat newFragment() {
|
|
|
|
final GBDevice device = getIntent().getParcelableExtra(GBDevice.EXTRA_DEVICE);
|
|
|
|
final MENU_ENTRY_POINTS menu_entry = (MENU_ENTRY_POINTS) getIntent().getSerializableExtra(MENU_ENTRY_POINT);
|
2022-06-04 00:07:36 +02:00
|
|
|
|
2023-07-27 00:08:13 +02:00
|
|
|
return DeviceSpecificSettingsFragment.newInstance(device, menu_entry);
|
2022-06-04 00:07:36 +02:00
|
|
|
}
|
|
|
|
}
|