Skip to content

Commit f298415

Browse files
committed
How about TestDPC in blue?
Tested sync auth (DO + WP) + QR DO + manual setup WP flow. Change-Id: Ia904cb5bcd90f4d6d8a8d0d55c21d45f9c5cbf35
1 parent 8076038 commit f298415

23 files changed

+477
-714
lines changed

app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ dependencies {
8383
implementation 'com.android.support:recyclerview-v7:27.0.2'
8484
implementation 'com.android.support:support-v13:27.0.2'
8585
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
86-
implementation 'com.google.android.gms:play-services-safetynet:+'
8786
implementation(name: 'setup-wizard-lib-platform-release', ext: 'aar')
8887
implementation 'org.bouncycastle:bcpkix-jdk15on:1.56'
8988
implementation 'org.bouncycastle:bcprov-jdk15on:1.56'
18.4 KB
Binary file not shown.

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545

4646
<activity
4747
android:name=".SetupManagementActivity"
48+
android:theme="@style/SuwThemeGlifV3.Light"
4849
android:label="@string/setup_app_name"
4950
android:taskAffinity="">
5051
</activity>
@@ -62,22 +63,17 @@
6263
<activity
6364
android:name=".AddAccountActivity"
6465
android:label="@string/app_name"
65-
android:theme="@style/SetupTheme"/>
66+
android:theme="@style/SuwThemeGlifV3.Light"/>
6667

6768
<activity
68-
android:name=".EnableProfileActivity"
69+
android:name=".FinalizeActivity"
6970
android:label="@string/app_name"
70-
android:theme="@style/SetupTheme"/>
71-
72-
<activity
73-
android:name=".EnableDeviceOwnerActivity"
74-
android:label="@string/app_name"
75-
android:theme="@style/SetupTheme"/>
71+
android:theme="@style/SuwThemeGlifV3.Light"/>
7672

7773
<activity
7874
android:name=".cosu.EnableCosuActivity"
7975
android:label="@string/app_name"
80-
android:theme="@style/SetupTheme"/>
76+
android:theme="@style/SuwThemeGlifV3.Light"/>
8177

8278
<activity
8379
android:name=".policy.locktask.KioskModeActivity"
@@ -117,17 +113,6 @@
117113
</intent-filter>
118114
</receiver>
119115

120-
<receiver android:name=".FirstAccountReadyBroadcastReceiver"
121-
android:exported="true"
122-
android:enabled="true">
123-
<intent-filter>
124-
<action android:name="com.google.android.work.action.FIRST_ACCOUNT_READY"/>
125-
</intent-filter>
126-
<intent-filter>
127-
<action android:name="com.afwsamples.testdpc.FIRST_ACCOUNT_READY_TIMEOUT"/>
128-
</intent-filter>
129-
</receiver>
130-
131116
<receiver android:name=".BootReceiver"
132117
android:exported="false">
133118
<intent-filter>

app/src/main/java/com/afwsamples/testdpc/AddAccountActivity.java

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
import android.widget.RadioGroup;
3636
import android.widget.Toast;
3737

38-
import com.android.setupwizardlib.SetupWizardLayout;
39-
import com.android.setupwizardlib.view.NavigationBar;
38+
import com.android.setupwizardlib.GlifLayout;
4039

4140
import java.io.IOException;
4241

@@ -45,7 +44,7 @@
4544
* It is responsible for adding an account to the managed profile (Profile Owner) or managed device
4645
* (Device Owner).
4746
*/
48-
public class AddAccountActivity extends Activity implements NavigationBar.NavigationBarListener {
47+
public class AddAccountActivity extends Activity {
4948

5049
private static final String TAG = "AddAccountActivity";
5150
private static final String GOOGLE_ACCOUNT_TYPE = "com.google";
@@ -70,10 +69,8 @@ protected void onCreate(Bundle savedInstanceState) {
7069
mAdminComponentName = DeviceAdminReceiver.getComponentName(this);
7170

7271
setContentView(R.layout.activity_add_account);
73-
SetupWizardLayout layout = (SetupWizardLayout) findViewById(R.id.setup_wizard_layout);
74-
layout.getNavigationBar().setNavigationBarListener(this);
75-
NavigationBar navigationBar = layout.getNavigationBar();
76-
navigationBar.getBackButton().setEnabled(false);
72+
GlifLayout layout = findViewById(R.id.setup_wizard_layout);
73+
layout.findViewById(R.id.next_button).setOnClickListener(this::onNavigateNext);
7774

7875
Bundle extras = getIntent().getExtras();
7976
if (extras != null) {
@@ -145,9 +142,8 @@ private void restoreUserRestrictions() {
145142
}
146143
}
147144

148-
@Override
149-
public void onNavigateNext() {
150-
RadioGroup addAccountOptions = (RadioGroup) findViewById(R.id.add_account_options);
145+
public void onNavigateNext(View nextButton) {
146+
RadioGroup addAccountOptions = findViewById(R.id.add_account_options);
151147
switch (addAccountOptions.getCheckedRadioButtonId()) {
152148
case R.id.add_account:
153149
addAccount(null);
@@ -168,14 +164,10 @@ public void onNavigateNext() {
168164
break;
169165
case R.id.add_account_skip:
170166
if (mNextActivityIntent != null) {
171-
mNextActivityIntent.putExtra(EnableProfileActivity.EXTRA_ENABLE_PROFILE_NOW, true);
172167
startActivity(mNextActivityIntent);
173168
}
174169
finish();
175170
break;
176171
}
177172
}
178-
179-
@Override
180-
public void onNavigateBack() {}
181173
}

app/src/main/java/com/afwsamples/testdpc/EnableDeviceOwnerActivity.java

Lines changed: 0 additions & 81 deletions
This file was deleted.

app/src/main/java/com/afwsamples/testdpc/EnableProfileActivity.java

Lines changed: 0 additions & 189 deletions
This file was deleted.

0 commit comments

Comments
 (0)