timeshift can be negative on watch
This commit is contained in:
parent
fe532598c4
commit
8716f57978
1 changed files with 5 additions and 3 deletions
|
@ -29,7 +29,7 @@ public class CPPActivity extends ViewSelectorActivity {
|
||||||
PlusMinusEditText editTimeshift;
|
PlusMinusEditText editTimeshift;
|
||||||
|
|
||||||
int percentage = -1;
|
int percentage = -1;
|
||||||
int timeshift = -1;
|
int timeshift = -25;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -39,10 +39,12 @@ public class CPPActivity extends ViewSelectorActivity {
|
||||||
percentage = extras.getInt("percentage", -1);
|
percentage = extras.getInt("percentage", -1);
|
||||||
timeshift = extras.getInt("timeshift", -1);
|
timeshift = extras.getInt("timeshift", -1);
|
||||||
|
|
||||||
if (percentage ==-1 || timeshift ==-1){
|
if (percentage ==-1 || timeshift ==-25){
|
||||||
finish(); return;
|
finish(); return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(timeshift < 0) timeshift += 24;
|
||||||
|
|
||||||
setContentView(R.layout.grid_layout);
|
setContentView(R.layout.grid_layout);
|
||||||
final Resources res = getResources();
|
final Resources res = getResources();
|
||||||
final GridViewPager pager = (GridViewPager) findViewById(R.id.pager);
|
final GridViewPager pager = (GridViewPager) findViewById(R.id.pager);
|
||||||
|
@ -130,4 +132,4 @@ public class CPPActivity extends ViewSelectorActivity {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue