Job Scheduler TARE page implementation
A Job Scheduler policy page is needed in the TARE developer options settings to allow developers to both view and edit the current values of all the factors under the job scheduler policy. The page uses a dropdown so that the user can easily switch between the different policies. For the factors with subfactors, the user simply clicks on the factor and the subfactors wil pop up under it. Bug: 191877052 Test: Manual (open Settings > System > Developer Options > TARE > JobScheduler and verify all factors are there) Change-Id: Icea6cda5e4b59d1736f85defcb9532839c3720f5
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
|
||||
package com.android.settings.development.tare;
|
||||
|
||||
import static com.android.settings.development.tare.DropdownActivity.EXTRA_POLICY;
|
||||
import static com.android.settings.development.tare.DropdownActivity.POLICY_ALARM_MANAGER;
|
||||
import static com.android.settings.development.tare.DropdownActivity.POLICY_JOB_SCHEDULER;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@@ -66,6 +70,15 @@ public class TareHomePage extends Activity {
|
||||
|
||||
/** Opens up the AlarmManager TARE policy page with its factors to view and edit */
|
||||
public void launchAlarmManagerPage(View v) {
|
||||
startActivity(new Intent(getApplicationContext(), DropdownActivity.class));
|
||||
Intent i = new Intent(getApplicationContext(), DropdownActivity.class);
|
||||
i.putExtra(EXTRA_POLICY, POLICY_ALARM_MANAGER);
|
||||
startActivity(i);
|
||||
}
|
||||
|
||||
/** Opens up the JobScheduler TARE policy page with its factors to view and edit */
|
||||
public void launchJobSchedulerPage(View v) {
|
||||
Intent i = new Intent(getApplicationContext(), DropdownActivity.class);
|
||||
i.putExtra(EXTRA_POLICY, POLICY_JOB_SCHEDULER);
|
||||
startActivity(i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user