Loading AndroidManifest.xml +0 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,6 @@ android:launchMode="singleInstance" android:taskAffinity="" android:showOnLockScreen="true" android:screenOrientation="nosensor" android:configChanges="orientation|screenSize|keyboardHidden|keyboard|navigation"/> <activity android:name="ScreensaverActivity" Loading src/com/android/deskclock/AlarmAlertFullScreen.java +10 −14 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig private int mVolumeBehavior; boolean mFullscreenStyle; private GlowPadView mGlowPadView; private boolean mIsDocked = false; // Parameters for the GlowPadView "ping" animation; see triggerPing(). private static final int PING_MESSAGE_WHAT = 101; Loading Loading @@ -132,16 +131,18 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON); } updateLayout(); // Check the docking status , if the device is docked , do not limit rotation IntentFilter ifilter = new IntentFilter(Intent.ACTION_DOCK_EVENT); Intent dockStatus = registerReceiver(null, ifilter); if (dockStatus != null) { mIsDocked = dockStatus.getIntExtra(Intent.EXTRA_DOCK_STATE, -1) != Intent.EXTRA_DOCK_STATE_UNDOCKED; // In order to allow tablets to freely rotate and phones to stick // with "nosensor" (use default device orientation) we have to have // the manifest start with an orientation of unspecified" and only limit // to "nosensor" for phones. Otherwise we get behavior like in b/8728671 // where tablets start off in their default orientation and then are // able to freely rotate. if (!getResources().getBoolean(R.bool.config_rotateAlarmAlert)) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR); } updateLayout(); // Register to get the alarm killed/snooze/dismiss intent. IntentFilter filter = new IntentFilter(Alarms.ALARM_KILLED); filter.addAction(Alarms.ALARM_SNOOZE_ACTION); Loading Loading @@ -311,11 +312,6 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig mGlowPadView.setDirectionDescriptionsResourceId(R.array.dismiss_direction_descriptions); } mPingEnabled = true; // The activity is locked to the default orientation as a default set in the manifest // Override this settings if the device is docked or config set it differently if (getResources().getBoolean(R.bool.config_rotateAlarmAlert) || mIsDocked) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); } } @Override Loading Loading
AndroidManifest.xml +0 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,6 @@ android:launchMode="singleInstance" android:taskAffinity="" android:showOnLockScreen="true" android:screenOrientation="nosensor" android:configChanges="orientation|screenSize|keyboardHidden|keyboard|navigation"/> <activity android:name="ScreensaverActivity" Loading
src/com/android/deskclock/AlarmAlertFullScreen.java +10 −14 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig private int mVolumeBehavior; boolean mFullscreenStyle; private GlowPadView mGlowPadView; private boolean mIsDocked = false; // Parameters for the GlowPadView "ping" animation; see triggerPing(). private static final int PING_MESSAGE_WHAT = 101; Loading Loading @@ -132,16 +131,18 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig | WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON); } updateLayout(); // Check the docking status , if the device is docked , do not limit rotation IntentFilter ifilter = new IntentFilter(Intent.ACTION_DOCK_EVENT); Intent dockStatus = registerReceiver(null, ifilter); if (dockStatus != null) { mIsDocked = dockStatus.getIntExtra(Intent.EXTRA_DOCK_STATE, -1) != Intent.EXTRA_DOCK_STATE_UNDOCKED; // In order to allow tablets to freely rotate and phones to stick // with "nosensor" (use default device orientation) we have to have // the manifest start with an orientation of unspecified" and only limit // to "nosensor" for phones. Otherwise we get behavior like in b/8728671 // where tablets start off in their default orientation and then are // able to freely rotate. if (!getResources().getBoolean(R.bool.config_rotateAlarmAlert)) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR); } updateLayout(); // Register to get the alarm killed/snooze/dismiss intent. IntentFilter filter = new IntentFilter(Alarms.ALARM_KILLED); filter.addAction(Alarms.ALARM_SNOOZE_ACTION); Loading Loading @@ -311,11 +312,6 @@ public class AlarmAlertFullScreen extends Activity implements GlowPadView.OnTrig mGlowPadView.setDirectionDescriptionsResourceId(R.array.dismiss_direction_descriptions); } mPingEnabled = true; // The activity is locked to the default orientation as a default set in the manifest // Override this settings if the device is docked or config set it differently if (getResources().getBoolean(R.bool.config_rotateAlarmAlert) || mIsDocked) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); } } @Override Loading